text
stringlengths
1.3k
3.62M
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (** In this file, we prove properties about hedges. These properties are in section 6.1 of the paper "On Bisimulations for the Spi-Calculus" by J. Borgström and U. Nestmann. However, we consider here an extended message language. *) (** Author: Sébastien Briais ([email protected]) *) Unset Standard Proposition Elimination Names. (** We assume to have a (countably infinite) set of names. *) Hypothesis Nam : Set. (** We define three operators for building messages. *) Inductive op : Set := | Pub : op | Priv : op | Hash : op. (** Equality of operators is decidable. *) Lemma op_eq_dec : forall o1 o2 : op, {o1 = o2} + {o1 <> o2}. simple destruct o1; simple destruct o2; try auto; try (right; red in |- *; intro; inversion H). Qed. (** The inversion of an operator. *) Definition inv_op (o : op) : op := match o with | Pub => Priv | Priv => Pub | _ => o end. (** A message is either a name, or an encrypted message, or a pair of messages, or an operator applied to a message. *) Inductive Msg : Set := | MNam : Nam -> Msg | MEnc : Msg -> Msg -> Msg | MPair : Msg -> Msg -> Msg | Mop : op -> Msg -> Msg. (** Inversion of a message. This is to manage public/private keys. *) Definition inv (M : Msg) : Msg := match M with | Mop op M => Mop (inv_op op) M | _ => M end. (** The inversion is involutive. *) Lemma inv_invol : forall M : Msg, inv (inv M) = M. (* Goal: forall M : Msg, @eq Msg (inv (inv M)) M *) simple induction M; simpl in |- *; trivial. (* Goal: forall (o : op) (m : Msg) (_ : @eq Msg (inv (inv m)) m), @eq Msg (Mop (inv_op (inv_op o)) m) (Mop o m) *) simple destruct o; simpl in |- *; trivial. Qed. (** A hedge is a set of pairs of message. *) Definition hedge := Msg -> Msg -> Prop. Require Import Classical_Prop. (** In classical logic, it is possible to say if (M,N) is in h or not. *) Lemma hedge_mem_dec : forall (h : hedge) (M N : Msg), h M N \/ ~ h M N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (h M N) (not (h M N)) *) apply (classic (h M N)). Qed. (** g is included in h iff whenever (M,N) is in g then (M,N) is in h *) Definition inclusion (g h : hedge) := forall M N : Msg, g M N -> h M N. (** g = h iff g is included in h and h is included in g *) Definition equal (g h : hedge) := inclusion g h /\ inclusion h g. (** inclusion is reflexive, ... *) Lemma inclusion_refl : forall h : hedge, inclusion h h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: le_h g h *) trivial. Qed. (** ...transitive, ... *) Lemma inclusion_trans : forall f g h : hedge, inclusion f g -> inclusion g h -> inclusion f h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (reduce g) m2 m0 *) (* Goal: forall (m m0 : Msg) (_ : h (MPair m m0) N) (_ : and (g (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis g m N1)) (not (synthesis g m0 N2)) | Mop o m1 => True end), and (h (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis h m N1)) (not (synthesis h m0 N2)) | Mop o m1 => True end *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) apply H0. (* Goal: le_h g h *) apply H; trivial. Qed. (** ...and antisymmetric: inclusion is an order! *) Lemma inclusion_antisym : forall f g : hedge, inclusion f g -> inclusion g f -> equal f g. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** equality is reflexive, ... *) Lemma equal_refl : forall h : hedge, equal h h. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (inclusion h h) (inclusion h h) *) split; apply inclusion_refl. Qed. (** ...symmetric, ... *) Lemma equal_sym : forall g h : hedge, equal g h -> equal h g. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** ...and transitive: equality is an equivalence relation! *) Lemma equal_trans : forall f g h : hedge, equal f g -> equal g h -> equal f h. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; apply inclusion_trans with g; trivial. Qed. (** union and intersection of hedges *) Definition union (g h : hedge) (M N : Msg) := g M N \/ h M N. Definition inter (g h : hedge) (M N : Msg) := g M N /\ h M N. (** union is symmetric *) Lemma union_sym : forall g h : hedge, equal (union g h) (union h g). (* Goal: inclusion (inter g h) (union g h) *) unfold union in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** intersection is symmetric *) Lemma inter_sym : forall g h : hedge, equal (inter g h) (inter h g). (* Goal: inclusion (inter g h) (fun M N : Msg => or (g M N) (h M N)) *) unfold inter in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** g is included in the union of g and h *) Lemma hedge_left_union : forall g h : hedge, inclusion g (union g h). (* Goal: inclusion (inter g h) (union g h) *) unfold union in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** h is included in the union of g and h *) Lemma hedge_right_union : forall g h : hedge, inclusion h (union g h). (* Goal: inclusion (inter g h) (union g h) *) unfold union in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** the intersection of g and h is included in g *) Lemma inter_hedge_left : forall g h : hedge, inclusion (inter g h) g. (* Goal: inclusion (inter g h) (fun M N : Msg => or (g M N) (h M N)) *) unfold inter in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** the intersection of g and h is included in h *) Lemma inter_hedge_right : forall g h : hedge, inclusion (inter g h) h. (* Goal: inclusion (inter g h) (fun M N : Msg => or (g M N) (h M N)) *) unfold inter in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if f is included in h and g is included in h then the union of f and g is included in h *) Lemma union_intro : forall f g h : hedge, inclusion f h -> inclusion g h -> inclusion (union f g) h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: inclusion (inter g h) (union g h) *) unfold union in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: h M N *) case H1. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) apply H. (* Goal: synthesis (reduce g) m2 m0 *) (* Goal: forall (m m0 : Msg) (_ : h (MPair m m0) N) (_ : and (g (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis g m N1)) (not (synthesis g m0 N2)) | Mop o m1 => True end), and (h (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis h m N1)) (not (synthesis h m0 N2)) | Mop o m1 => True end *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) apply H0. Qed. (** the intersection of g and h is included into the union of g and h *) Lemma inter_inclusion_union : forall g h : hedge, inclusion (inter g h) (union g h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (inter g h) (union g h) *) unfold union in |- *. (* Goal: inclusion (inter g h) (fun M N : Msg => or (g M N) (h M N)) *) unfold inter in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** The synthesis S(h) of h : it contains all the messages that can be synthetised by the hedge. *) Inductive synthesis (h : hedge) : hedge := | SynInc : forall M N : Msg, h M N -> synthesis h M N | SynEnc : forall M N K L : Msg, synthesis h M N -> synthesis h K L -> synthesis h (MEnc M K) (MEnc N L) | SynPair : forall M1 N1 M2 N2 : Msg, synthesis h M1 N1 -> synthesis h M2 N2 -> synthesis h (MPair M1 M2) (MPair N1 N2) | SynOp : forall (o : op) (M N : Msg), synthesis h M N -> synthesis h (Mop o M) (Mop o N). (** If (M,N) is in S(h) and M is a name then (M,N) is in h *) Theorem nam_left_syn : forall (h : hedge) (a : Nam) (N : Msg), synthesis h (MNam a) N -> h (MNam a) N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: le_h g h *) trivial. Qed. (** If (M,N) is in S(h) and N is a name then (M,N) is in h *) Theorem nam_right_syn : forall (h : hedge) (M : Msg) (b : Nam), synthesis h M (MNam b) -> h M (MNam b). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: le_h g h *) trivial. Qed. (** h is included in S(h) *) Lemma h_incl_syn : forall h : hedge, inclusion h (synthesis h). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: le_h g h *) trivial. Qed. (** g <= h if S(g) is included in S(h) *) Definition le_h (g h : hedge) := inclusion (synthesis g) (synthesis h). (** g ~ h if g <= h and h <= g *) Definition equiv_h (g h : hedge) := le_h g h /\ le_h h g. (** <= is reflexive, ... *) Lemma le_h_refl : forall h : hedge, le_h h h. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. Qed. (** ... transitive, ... *) Lemma le_h_trans : forall f g h : hedge, le_h f g -> le_h g h -> le_h f h. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply inclusion_trans with (synthesis g); trivial. Qed. (** and 'antysymmetric' for ~ *) Lemma le_h_antisym : forall g h : hedge, le_h g h -> le_h h g -> equiv_h g h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** ~ is reflexive, ... *) Lemma equiv_refl : forall h : hedge, equiv_h h h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (le_h h h) (le_h h h) *) split; apply le_h_refl. Qed. (** ...transitive, ... *) Lemma equiv_h_trans : forall f g h : hedge, equiv_h f g -> equiv_h g h -> equiv_h f h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; apply le_h_trans with g; trivial. Qed. (** ...and symmetric. *) Lemma equiv_h_sym : forall g h : hedge, equiv_h g h -> equiv_h h g. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if g <= h then g is included in S(h) *) Lemma le_h_impl_incl_syn : forall g h : hedge, le_h g h -> inclusion g (synthesis h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply inclusion_trans with (synthesis g); trivial. (* Goal: inclusion h (synthesis h) *) apply h_incl_syn. Qed. (** if g is included in S(h) then g <= h *) Lemma incl_syn_impl_le_h : forall g h : hedge, inclusion g (synthesis h) -> le_h g h. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H0 as [M N H0| M N K L H0_1 HrecH0_1 H0_0 HrecH0_0| M1 N1 M2 N2 H0_1 HrecH0_1 H0_0 HrecH0_0| o M N H0 HrecH0]. (* Goal: le_h g h *) apply H; trivial. (* Goal: le_h g h *) apply SynEnc; trivial. (* Goal: le_h g h *) apply SynPair; trivial. (* Goal: le_h g h *) apply SynOp; trivial. Qed. (** g <= h iff g is included in S(h) *) Theorem le_h_iff_incl_syn : forall g h : hedge, le_h g h <-> inclusion g (synthesis h). (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: inclusion g (synthesis h) *) (* Goal: inclusion (transpose (synthesis h)) (synthesis (transpose h)) *) apply le_h_impl_incl_syn. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. Qed. (** if g is included in h then g <= h *) Theorem inclusion_impl_le_h : forall g h : hedge, inclusion g h -> le_h g h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. (* Goal: le_h g h *) apply inclusion_trans with h; trivial. (* Goal: inclusion h (synthesis h) *) apply h_incl_syn. Qed. (** if g = h then g ~ h *) Lemma equal_impl_equiv_h : forall g h : hedge, equal g h -> equiv_h g h. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) apply inclusion_impl_le_h; trivial. (* Goal: le_h g h *) apply inclusion_impl_le_h; trivial. Qed. (** if f <= h and g <= h then (union f g) <= h *) Theorem le_h_le_h_impl_union_le_h : forall f g h : hedge, le_h f h -> le_h g h -> le_h (union f g) h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. (* Goal: le_h g h *) apply union_intro; apply le_h_impl_incl_syn; trivial. Qed. (** if g1 <= h1 and g2 <= h2 then (union g1 g2) <= (union h1 h2) *) Theorem le_h_le_h_impl_le_h_union : forall g1 g2 h1 h2 : hedge, le_h g1 h1 -> le_h g2 h2 -> le_h (union g1 g2) (union h1 h2). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (union (irreducible h) g) (irreducible (union h g)) *) (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_le_h_impl_union_le_h. (* Goal: le_h g h *) apply le_h_trans with h1; trivial. (* Goal: le_h h1 (union h1 h2) *) (* Goal: le_h g2 (union h1 h2) *) apply inclusion_impl_le_h; apply hedge_left_union. (* Goal: le_h g h *) apply le_h_trans with h2; trivial. (* Goal: le_h h2 (union h1 h2) *) apply inclusion_impl_le_h; apply hedge_right_union. Qed. (** we define how to analyse 'one time' a hedge h: all the pairs are splitted and the encrypted messages are decrypted if the keys are in the synthesis of h *) Inductive analysis (h : hedge) : hedge := | AnaInc : forall M N : Msg, h M N -> analysis h M N | AnaSplitL : forall M1 M2 N1 N2 : Msg, analysis h (MPair M1 M2) (MPair N1 N2) -> analysis h M1 N1 | AnaSplitR : forall M1 M2 N1 N2 : Msg, analysis h (MPair M1 M2) (MPair N1 N2) -> analysis h M2 N2 | AnaDec : forall M N K L : Msg, analysis h (MEnc M K) (MEnc N L) -> synthesis h (inv K) (inv L) -> analysis h M N. (** if g is included in h then (analysis g) is included in (analysis h) *) Lemma inclusion_analysis_inclusion : forall g h : hedge, inclusion g h -> inclusion (analysis g) (analysis h). (* Goal: forall (g h : hedge) (_ : inclusion g h), inclusion (analysis g) (analysis h) *) intros g h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H0 as [M N H0| M1 M2 N1 N2 H0 HrecH0| M1 M2 N1 N2 H0 HrecH0| M N K L H0 HrecH0 H1]. (* Goal: analysis h M N *) apply AnaInc. (* Goal: le_h g h *) apply H; trivial. (* Goal: analysis h M1 N1 *) (* Goal: analysis h M2 N2 *) (* Goal: analysis h M N *) apply (AnaSplitL h M1 M2 N1 N2). (* Goal: le_h g h *) trivial. (* Goal: analysis h M2 N2 *) (* Goal: analysis h M N *) apply (AnaSplitR h M1 M2 N1 N2). (* Goal: le_h g h *) trivial. (* Goal: analysis h M N *) apply (AnaDec h M N K L). (* Goal: le_h g h *) trivial. (* Goal: synthesis h (inv K) (inv L) *) generalize (inclusion_impl_le_h g h H). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. Qed. (** We define an infinite sequence (analysis_seq h n) where the n-th term is the n-th analysis of h *) Fixpoint analysis_seq (h : hedge) (n : nat) {struct n} : hedge := match n with | O => h | S n => analysis (analysis_seq h n) end. Require Import Arith. (** the n-th analysis of h is included in the (n+1)-th analysis of h *) Lemma analysis_seq_grow_S : forall (n : nat) (h : hedge), inclusion (analysis_seq h n) (analysis_seq h (S n)). (* Goal: forall (n : nat) (h : hedge), inclusion (analysis_seq h n) (analysis_seq h (S n)) *) simple induction n. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis h M N *) apply AnaInc. (* Goal: le_h g h *) trivial. Qed. (** the n-th analysis of h is included in the (n+p)-th analysis of h *) Lemma analysis_seq_grows : forall (p n : nat) (h : hedge), inclusion (analysis_seq h n) (analysis_seq h (p + n)). (* Goal: forall (p n : nat) (h : hedge), inclusion (analysis_seq h n) (analysis_seq h (Init.Nat.add p n)) *) simple induction p. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_seq h n0) (analysis_seq h (Init.Nat.add (S n) n0)) *) replace (S n + n0) with (S (n + n0)); try auto with arith. (* Goal: le_h g h *) apply inclusion_trans with (analysis_seq h (n + n0)); trivial. (* Goal: inclusion (analysis_seq h (Init.Nat.add n n0)) (analysis_seq h (S (Init.Nat.add n n0))) *) apply analysis_seq_grow_S. Qed. (** if n <= m then the n-th analysis of h is included in the m-th analysis of h *) Lemma analysis_seq_increase : forall (n m : nat) (h : hedge), n <= m -> inclusion (analysis_seq h n) (analysis_seq h m). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_seq h n) (analysis_seq h m) *) cut (exists p : nat, m = p + n). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (x : nat) (_ : @eq nat m (Init.Nat.add x n)), inclusion (analysis_seq h n) (analysis_seq h m) *) (* Goal: @ex nat (fun p : nat => @eq nat m (Init.Nat.add p n)) *) intro p. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_seq h n) (analysis_seq h m) *) (* Goal: @ex nat (fun p : nat => @eq nat m (Init.Nat.add p n)) *) rewrite H1. (* Goal: inclusion (analysis_seq h O) (analysis_seq h (Init.Nat.add n O)) *) (* Goal: forall (h' : hedge) (_ : and (inclusion h h') (stable_analysis h')), inclusion (analysis_seq h n) h' *) apply analysis_seq_grows. (* Goal: @ex nat (fun p : nat => @eq nat m (Init.Nat.add p n)) *) exists (m - n). (* Goal: @eq nat m (Init.Nat.add (Init.Nat.sub m n) n) *) rewrite plus_comm. (* Goal: @eq nat m (Nat.add n (Init.Nat.sub m n)) *) apply le_plus_minus. (* Goal: le_h g h *) trivial. Qed. (** reduce remove from h all the redundancy: a pair (M,N) is kept in (reduce h) iff it cannot be 'strictly' synthetised by h *) Definition reduce (h : hedge) (M N : Msg) := h M N /\ match M with | MEnc M' K => match N with | MEnc N' L => ~ synthesis h M' N' \/ ~ synthesis h K L | _ => True end | MPair M1 M2 => match N with | MPair N1 N2 => ~ synthesis h M1 N1 \/ ~ synthesis h M2 N2 | _ => True end | Mop opM M' => match N with | Mop opN N' => opM <> opN \/ ~ synthesis h M' N' | _ => True end | _ => True end. (** (reduce h) is included in h *) Lemma red_incl_h : forall h : hedge, inclusion (reduce h) h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** h <= (reduce h) *) Lemma h_le_h_red : forall h : hedge, le_h h (reduce h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (M N : Msg) (_ : synthesis h M N), synthesis (reduce h) M N *) simple induction M. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MEnc m m0) N), synthesis (reduce h) (MEnc m m0) N *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intro M'. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (MEnc M' m) N), synthesis (reduce h) (MEnc M' m) N *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intro K. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (N : Msg) (_ : synthesis h (Mop oM M') N), synthesis (reduce h) (Mop oM M') N *) simple destruct N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: and (h (MEnc M' K) (MEnc N' L)) (or (not (synthesis h M' N')) (not (synthesis h K L))) *) (* Goal: forall _ : not (synthesis h M' N'), synthesis (reduce h) (MEnc M' K) (MEnc N' L) *) (* Goal: forall (m m0 : Msg) (_ : synthesis h (MEnc M' K) (MPair m m0)), synthesis (reduce h) (MEnc M' K) (MPair m m0) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MEnc M' K) (Mop o m)), synthesis (reduce h) (MEnc M' K) (Mop o m) *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) inversion H1. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall (m m0 : Msg) (_ : synthesis h (MEnc M' K) (MEnc m m0)), synthesis (reduce h) (MEnc M' K) (MEnc m m0) *) (* Goal: forall (m m0 : Msg) (_ : synthesis h (MEnc M' K) (MPair m m0)), synthesis (reduce h) (MEnc M' K) (MPair m m0) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MEnc M' K) (Mop o m)), synthesis (reduce h) (MEnc M' K) (Mop o m) *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intros N' L. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (reduce h) (Mop oN M') (Mop oN N') *) (* Goal: forall _ : not (@eq op oM oN), synthesis (reduce h) (Mop oM M') (Mop oN N') *) case (hedge_mem_dec (synthesis h) M' N'). (* Goal: forall _ : synthesis h M' N', synthesis (reduce h) (MEnc M' K) (MEnc N' L) *) (* Goal: forall _ : not (synthesis h M' N'), synthesis (reduce h) (MEnc M' K) (MEnc N' L) *) (* Goal: forall (m m0 : Msg) (_ : synthesis h (MEnc M' K) (MPair m m0)), synthesis (reduce h) (MEnc M' K) (MPair m m0) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MEnc M' K) (Mop o m)), synthesis (reduce h) (MEnc M' K) (Mop o m) *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) case (hedge_mem_dec (synthesis h) K L). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_seq h (Nat.max n1 n2)) (MEnc M K) (MEnc N L) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) apply SynEnc. (* Goal: le_h g h *) apply H; trivial. (* Goal: le_h g h *) apply H0; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: and (h (MEnc M' K) (MEnc N' L)) (or (not (synthesis h M' N')) (not (synthesis h K L))) *) (* Goal: forall _ : not (synthesis h M' N'), synthesis (reduce h) (MEnc M' K) (MEnc N' L) *) (* Goal: forall (m m0 : Msg) (_ : synthesis h (MEnc M' K) (MPair m m0)), synthesis (reduce h) (MEnc M' K) (MPair m m0) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MEnc M' K) (Mop o m)), synthesis (reduce h) (MEnc M' K) (Mop o m) *) (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) inversion H1. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) split; tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (m0 : Msg) (_ : forall (N : Msg) (_ : synthesis h m0 N), synthesis (reduce h) m0 N) (N : Msg) (_ : synthesis h (MPair m m0) N), synthesis (reduce h) (MPair m m0) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intro M1. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (MPair M1 m) N), synthesis (reduce h) (MPair M1 m) N *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intro M2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (N : Msg) (_ : synthesis h (Mop oM M') N), synthesis (reduce h) (Mop oM M') N *) simple destruct N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (m m0 : Msg) (_ : synthesis h (MPair M1 M2) (MPair m m0)), synthesis (reduce h) (MPair M1 M2) (MPair m m0) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MPair M1 M2) (Mop o m)), synthesis (reduce h) (MPair M1 M2) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intros N1 N2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (reduce h) (MPair M1 M2) (MPair N1 N2) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MPair M1 M2) (Mop o m)), synthesis (reduce h) (MPair M1 M2) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) case (hedge_mem_dec (synthesis h) M1 N1). (* Goal: forall _ : synthesis h M1 N1, synthesis (reduce h) (MPair M1 M2) (MPair N1 N2) *) (* Goal: forall _ : not (synthesis h M1 N1), synthesis (reduce h) (MPair M1 M2) (MPair N1 N2) *) (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (MPair M1 M2) (Mop o m)), synthesis (reduce h) (MPair M1 M2) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) case (hedge_mem_dec (synthesis h) M2 N2). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_seq h (Nat.max n1 n2)) (MPair M1 M2) (MPair N1 N2) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) apply SynPair. (* Goal: le_h g h *) apply H; trivial. (* Goal: le_h g h *) apply H0; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H1; tauto. (* Goal: forall (o : op) (m : Msg) (_ : forall (N : Msg) (_ : synthesis h m N), synthesis (reduce h) m N) (N : Msg) (_ : synthesis h (Mop o m) N), synthesis (reduce h) (Mop o m) N *) intros oM M'. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (N : Msg) (_ : synthesis h (Mop oM M') N), synthesis (reduce h) (Mop oM M') N *) simple destruct N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H0; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H0; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H0; tauto. (* Goal: forall (o : op) (m : Msg) (_ : synthesis h (Mop oM M') (Mop o m)), synthesis (reduce h) (Mop oM M') (Mop o m) *) intros oN N'. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (reduce h) (Mop oM M') (Mop oN N') *) case (op_eq_dec oM oN). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) rewrite e in H0. (* Goal: h (Mop o0 m0) (Mop o m) *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) rewrite e. (* Goal: synthesis (reduce h) (Mop oN M') (Mop oN N') *) (* Goal: forall _ : not (@eq op oM oN), synthesis (reduce h) (Mop oM M') (Mop oN N') *) case (hedge_mem_dec (synthesis h) M' N'). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (analysis_seq h n) (Mop o M) (Mop o N) *) apply SynOp. (* Goal: le_h g h *) apply H; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) unfold reduce in |- *; simpl in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H0; tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) inversion H0; tauto. Qed. (** (reduce h) ~ h *) Lemma h_equiv_h_red : forall h : hedge, equiv_h h (reduce h). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h h (reduce h) *) apply h_le_h_red. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def h) *) (* Goal: stable_analysis (analysis_def h) *) apply red_incl_h. Qed. (** if g is included in h and h <= g then (reduce g) is included in (reduce h) *) Lemma inclusion_le_h_reduce_inclusion : forall g h : hedge, inclusion g h -> le_h h g -> inclusion (reduce g) (reduce h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: forall (g h : hedge) (_ : forall (M N : Msg) (_ : g M N), h M N) (_ : forall (M N : Msg) (_ : synthesis h M N), synthesis g M N) (M N : Msg) (_ : and (g M N) match M with | MNam n => True | MEnc M' K => match N with | MNam n => True | MEnc N' L => or (not (synthesis g M' N')) (not (synthesis g K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match N with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis g M1 N1)) (not (synthesis g M2 N2)) | Mop o m => True end | Mop opM M' => match N with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis g M' N')) end end), and (h M N) match M with | MNam n => True | MEnc M' K => match N with | MNam n => True | MEnc N' L => or (not (synthesis h M' N')) (not (synthesis h K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match N with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis h M1 N1)) (not (synthesis h M2 N2)) | Mop o m => True end | Mop opM M' => match N with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis h M' N')) end end *) intros g h H H0. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall (_ : and (g M N) match M with | MNam n => True | MEnc M' K => match N with | MNam n => True | MEnc N' L => or (not (synthesis g M' N')) (not (synthesis g K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match N with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis g M1 N1)) (not (synthesis g M2 N2)) | Mop o m => True end | Mop opM M' => match N with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis g M' N')) end end) (_ : synthesis h M N), h M N *) case M. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H1; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) case N; intros; elim H1; auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) split; auto. (* Goal: or (not (synthesis h m1 m)) (not (synthesis h m2 m0)) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) case H3. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) intro; left; red in |- *; intro; apply H4; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) intro; right; red in |- *; intro; apply H4; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) case N; intros; elim H1; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) split; auto. (* Goal: or (not (synthesis h m1 m)) (not (synthesis h m2 m0)) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) case H3. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) intro; left; red in |- *; intro; apply H4; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) intro; right; red in |- *; intro; apply H4; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) case N; intros; elim H1; auto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) split; auto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case H3; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) right; red in |- *; intro; apply H4; auto. Qed. Lemma equal_reduce_equal : forall g h : hedge, equal g h -> equal (reduce g) (reduce h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: inclusion (reduce (analysis_def (reduce (analysis_def h)))) (reduce (analysis_def h)) *) apply inclusion_le_h_reduce_inclusion. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply inclusion_impl_le_h; tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply inclusion_le_h_reduce_inclusion; try tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply inclusion_impl_le_h; tauto. Qed. (** if (reduce g) is included in h and h <= (reduce g) then (reduce g) is included in (reduce h) *) Lemma inclusion_le_h_impl_inclusion_red : forall g h : hedge, inclusion (reduce g) h -> le_h h (reduce g) -> inclusion (reduce g) (reduce h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: match N with | MNam n => True | MEnc M' K => match M with | MNam n => True | MEnc N' L => or (not (synthesis h M' N')) (not (synthesis h K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match M with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis h M1 N1)) (not (synthesis h M2 N2)) | Mop o m => True end | Mop opM M' => match M with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis h M' N')) end end *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) generalize H1. (* Goal: forall _ : reduce g M N, reduce h M N *) generalize (H M N H1). (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case M; try tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: le_h g h *) split; trivial. (* Goal: or (not (synthesis h m1 m)) (not (synthesis h m2 m0)) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) case H5. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) apply H6. (* Goal: synthesis g m0 m *) generalize (inclusion_impl_le_h (reduce g) g (red_incl_h g)). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible h) M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply H8. (* Goal: synthesis (reduce g) m2 m0 *) (* Goal: forall (m m0 : Msg) (_ : h (MPair m m0) N) (_ : and (g (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis g m N1)) (not (synthesis g m0 N2)) | Mop o m1 => True end), and (h (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis h m N1)) (not (synthesis h m0 N2)) | Mop o m1 => True end *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) apply H0. (* Goal: le_h g h *) trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) right; red in |- *; intro; apply H6. (* Goal: synthesis g m0 m *) generalize (inclusion_impl_le_h (reduce g) g (red_incl_h g)). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible h) M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply H8. (* Goal: synthesis (reduce g) m2 m0 *) (* Goal: forall (m m0 : Msg) (_ : h (MPair m m0) N) (_ : and (g (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis g m N1)) (not (synthesis g m0 N2)) | Mop o m1 => True end), and (h (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis h m N1)) (not (synthesis h m0 N2)) | Mop o m1 => True end *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) apply H0. (* Goal: le_h g h *) trivial. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H3; intros. (* Goal: or (not (synthesis h m1 m)) (not (synthesis h m2 m0)) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) case H5. (* Goal: False *) left; red in |- *; intro; apply H6. (* Goal: synthesis g m0 m *) generalize (inclusion_impl_le_h (reduce g) g (red_incl_h g)). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: False *) right; red in |- *; intro; apply H6. (* Goal: synthesis g m0 m *) generalize (inclusion_impl_le_h (reduce g) g (red_incl_h g)). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; trivial. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case H5; try tauto. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) apply H6. (* Goal: synthesis g m0 m *) generalize (inclusion_impl_le_h (reduce g) g (red_incl_h g)). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. Qed. (** reduce is idempotent *) Lemma reduce_idempotent : forall h : hedge, equal (reduce h) (reduce (reduce h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def h) *) (* Goal: stable_analysis (analysis_def h) *) split; try apply red_incl_h. (* Goal: inclusion (reduce (analysis_def h)) (reduce (analysis_def (reduce (analysis_def h)))) *) apply inclusion_le_h_impl_inclusion_red. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. (* Goal: le_h g g *) apply le_h_refl. Qed. (** if (reduce g) ~ h then (reduce g) is included in h *) Lemma red_equiv_impl_red_incl : forall g h : hedge, equiv_h (reduce g) h -> inclusion (reduce g) h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: h M N *) generalize (le_h_impl_incl_syn (reduce g) h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: h M N *) generalize (H3 M N H0). (* Goal: forall _ : synthesis h M N, h M N *) generalize H0. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: forall (_ : and (g M N) match M with | MNam n => True | MEnc M' K => match N with | MNam n => True | MEnc N' L => or (not (synthesis g M' N')) (not (synthesis g K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match N with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis g M1 N1)) (not (synthesis g M2 N2)) | Mop o m => True end | Mop opM M' => match N with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis g M' N')) end end) (_ : synthesis h M N), h M N *) case M. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply nam_left_syn; trivial. (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) case N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply nam_right_syn; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg (Mop o N) (Mop o0 N0) *) inversion H5. (* Goal: le_h g h *) trivial. (* Goal: h (Mop o m0) (Mop o m) *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) case H7. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) cut False; try tauto. (* Goal: False *) (* Goal: forall (o : op) (m m0 m1 : Msg) (_ : and (g (MPair m0 m1) (Mop o m)) True) (_ : synthesis h (MPair m0 m1) (Mop o m)), h (MPair m0 m1) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) apply H14. generalize (le_h_trans h (reduce g) g H2 (inclusion_impl_le_h (reduce g) g (red_incl_h g))). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) cut False; try tauto. (* Goal: False *) (* Goal: forall (o : op) (m m0 m1 : Msg) (_ : and (g (MPair m0 m1) (Mop o m)) True) (_ : synthesis h (MPair m0 m1) (Mop o m)), h (MPair m0 m1) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) apply H14. generalize (le_h_trans h (reduce g) g H2 (inclusion_impl_le_h (reduce g) g (red_incl_h g))). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) case N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: h (MPair m1 m2) (MPair m m0) *) (* Goal: forall (o : op) (m m0 m1 : Msg) (_ : and (g (MPair m0 m1) (Mop o m)) True) (_ : synthesis h (MPair m0 m1) (Mop o m)), h (MPair m0 m1) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) case H13. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut False. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: False *) (* Goal: forall (o : op) (m m0 m1 : Msg) (_ : and (g (MPair m0 m1) (Mop o m)) True) (_ : synthesis h (MPair m0 m1) (Mop o m)), h (MPair m0 m1) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) apply H14. generalize (le_h_trans h (reduce g) g H2 (inclusion_impl_le_h (reduce g) g (red_incl_h g))). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) cut False; try tauto. (* Goal: False *) (* Goal: forall (o : op) (m m0 m1 : Msg) (_ : and (g (MPair m0 m1) (Mop o m)) True) (_ : synthesis h (MPair m0 m1) (Mop o m)), h (MPair m0 m1) (Mop o m) *) (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) apply H14. generalize (le_h_trans h (reduce g) g H2 (inclusion_impl_le_h (reduce g) g (red_incl_h g))). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (o : op) (m : Msg) (_ : and (g (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis g m N')) end) (_ : synthesis h (Mop o m) N), h (Mop o m) N *) case N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) case (op_eq_dec o0 o). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: h (Mop o0 m0) (Mop o m) *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) rewrite e. (* Goal: h (Mop o m0) (Mop o m) *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) rewrite e in H5. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: h (Mop o m0) (Mop o m) *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) case H7. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) cut False; try tauto. (* Goal: False *) (* Goal: forall _ : not (@eq op o0 o), h (Mop o0 m0) (Mop o m) *) apply H12. generalize (le_h_trans h (reduce g) g H2 (inclusion_impl_le_h (reduce g) g (red_incl_h g))). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h g h *) inversion H5; trivial. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if g <= h then (reduce g) <= (reduce h) *) Lemma red_stable_le_h : forall g h : hedge, le_h g h -> le_h (reduce g) (reduce h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (reduce g) (reduce h) *) apply le_h_trans with h. (* Goal: le_h g h *) apply le_h_trans with g; trivial. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def h) *) (* Goal: stable_analysis (analysis_def h) *) apply red_incl_h. (* Goal: le_h h (reduce h) *) apply h_le_h_red. Qed. (** h is stable under analysis iff (analysis h) is included in h *) Definition stable_analysis (h : hedge) := inclusion (analysis h) h. (** if h is stable under analysis then h = (analysis h) (i.e. h is analysed) *) Lemma stable_closed : forall h : hedge, stable_analysis h -> equal h (analysis h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h g h *) split; trivial. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis h M N *) apply AnaInc. (* Goal: le_h g h *) trivial. Qed. (** if h is stable under analysis then (analysis h) is stable under analysis *) Lemma stable_impl_ana_stable : forall h : hedge, stable_analysis h -> stable_analysis (analysis h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: inclusion (analysis (analysis h)) (analysis h) *) apply inclusion_analysis_inclusion. (* Goal: le_h g h *) unfold stable_analysis in H; trivial. Qed. (** if the n-th analysis of h is stable under analysis then so are the (n+p)-th analysis of h *) Lemma stable_ana_stable : forall (h : hedge) (n : nat), stable_analysis (analysis_seq h n) -> forall p : nat, stable_analysis (analysis_seq h (p + n)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction p as [| p Hrecp]. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: le_h g h *) trivial. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: stable_analysis (analysis (analysis_seq h (Init.Nat.add p n))) *) apply stable_impl_ana_stable. (* Goal: le_h g h *) trivial. Qed. (** if the n-th analysis of h is stable under analysis then all the following analysis are equal to the n-th analysis *) Lemma stable_ana_const : forall (h : hedge) (n : nat), stable_analysis (analysis_seq h n) -> forall p : nat, equal (analysis_seq h n) (analysis_seq h (p + n)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction p as [| p Hrecp]. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: equal (analysis_seq h n) (analysis_seq h n) *) (* Goal: equal (analysis_seq h n) (analysis_seq h (Init.Nat.add (S p) n)) *) apply equal_refl. (* Goal: equal (analysis_seq h n) (analysis_seq h (Init.Nat.add (S p) n)) *) apply equal_trans with (analysis_seq h (p + n)). (* Goal: le_h g h *) trivial. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: equal (analysis_seq h (Init.Nat.add p n)) (analysis (analysis_seq h (Init.Nat.add p n))) *) apply stable_closed. (* Goal: stable_analysis (analysis_seq h (Init.Nat.add p n)) *) apply stable_ana_stable. (* Goal: le_h g h *) trivial. Qed. (** h could be an analysis of g iff g is included in h and h is stable under analysis *) Definition analysis_cond (g h : hedge) := inclusion g h /\ stable_analysis h. (** if h could be an analysis of g then h contains the n-th analysis of g for all n *) Lemma analysis_seq_incl_analysis_cond : forall g h : hedge, analysis_cond g h -> forall n : nat, inclusion (analysis_seq g n) h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction n as [| n Hrecn]. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: inclusion h (analysis_def h) *) unfold analysis_cond in H. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: inclusion (analysis (analysis_seq g n)) h *) generalize (inclusion_analysis_inclusion (analysis_seq g n) h Hrecn). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h g h *) apply inclusion_trans with (analysis h); trivial. (* Goal: inclusion h (analysis_def h) *) unfold analysis_cond in H. (* Goal: inclusion (analysis h) h *) unfold stable_analysis in H. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** h is an analysis of g if h could be an analysis of g and if for all other candidates h' which could be an analysis of g, h is included in h' *) Definition is_analysis (g h : hedge) := analysis_cond g h /\ (forall h' : hedge, analysis_cond g h' -> inclusion h h'). (** if h is an analysis of g then h contains the n-th analysis of g for all n *) Lemma analysis_seq_incl_analysis : forall g h : hedge, is_analysis g h -> forall n : nat, inclusion (analysis_seq g n) h. (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_seq h n) h' *) apply analysis_seq_incl_analysis_cond. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if h is an analysis of g and h' is an analysis of g then h = h' (and so h is the analysis of g) *) Lemma analysis_unique : forall g h h' : hedge, is_analysis g h -> is_analysis g h' -> equal h h'. (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) apply H4; trivial. (* Goal: le_h g h *) apply H2; trivial. Qed. (** if h is the analysis of g and h' is the analysis of h then h' is the analysis of g *) Lemma analysis_trans : forall g h h' : hedge, is_analysis g h -> is_analysis h h' -> is_analysis g h'. (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) elim H1. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) split; trivial. (* Goal: le_h g h *) apply inclusion_trans with h; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion h' h'0 *) apply inclusion_trans with h. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) apply H2. (* Goal: le_h g h *) split; trivial. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply H4; tauto. Qed. (** if h is the analysis of g and h' is the analysis of h then h = h' *) Lemma analysis_analysed : forall g h h' : hedge, is_analysis g h -> is_analysis h h' -> equal h h'. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply analysis_unique with g; trivial. (* Goal: le_h g h *) apply analysis_trans with h; trivial. Qed. (** if the n-th analysis of h is stable under analysis then the n-th analysis of h is the analysis of h *) Lemma analysis_seq_approx_analysis : forall (h : hedge) (n : nat), stable_analysis (analysis_seq h n) -> is_analysis h (analysis_seq h n). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) split; trivial. (* Goal: inclusion h (analysis_seq h n) *) (* Goal: forall (h' : hedge) (_ : and (inclusion h h') (stable_analysis h')), inclusion (analysis_seq h n) h' *) apply inclusion_trans with (analysis_seq h 0). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. (* Goal: inclusion (analysis_seq h O) (analysis_seq h n) *) (* Goal: forall (h' : hedge) (_ : and (inclusion h h') (stable_analysis h')), inclusion (analysis_seq h n) h' *) replace n with (n + 0); try auto with arith. (* Goal: inclusion (analysis_seq h O) (analysis_seq h (Init.Nat.add n O)) *) (* Goal: forall (h' : hedge) (_ : and (inclusion h h') (stable_analysis h')), inclusion (analysis_seq h n) h' *) apply analysis_seq_grows. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_seq h n) h' *) apply analysis_seq_incl_analysis_cond. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: le_h g h *) trivial. Qed. (** we define the analysis A(h) of h as being the infinite union of the sequence (analysis_seq h) *) Definition analysis_def (h : hedge) (M N : Msg) := exists n : nat, analysis_seq h n M N. Require Import Max. (** technical lemma required to show that the analysis of h is indeed the analysis of h *) Lemma synthesis_analysis_seq : forall (h : hedge) (M N : Msg), synthesis (analysis_def h) M N -> exists n : nat, synthesis (analysis_seq h n) M N. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (M N : Msg) (_ : analysis_def h M N), h' M N *) unfold analysis_def in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H as [M N H| M N K L H1 HrecH1 H0 HrecH0| M1 N1 M2 N2 H1 HrecH1 H0 HrecH0| o M N H HrecH]. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (x : nat) (_ : analysis_seq h x M N), h' M N *) intro n. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) exists n. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: le_h g h *) trivial. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MEnc M K) (MEnc N L)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) elim HrecH1. (* Goal: forall (x : nat) (_ : analysis_seq h x (MEnc M K) (MEnc N L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n1. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MEnc M K) (MEnc N L)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) elim HrecH0. (* Goal: forall (x : nat) (_ : synthesis (analysis_seq h x) (inv K) (inv L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) exists (max n1 n2). (* Goal: synthesis (analysis_seq h (Nat.max n1 n2)) (MEnc M K) (MEnc N L) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) apply SynEnc. generalize (inclusion_impl_le_h (analysis_seq h n1) (analysis_seq h (max n1 n2)) (analysis_seq_increase n1 (max n1 n2) h (le_max_l n1 n2))). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; auto. generalize (inclusion_impl_le_h (analysis_seq h n2) (analysis_seq h (max n1 n2)) (analysis_seq_increase n2 (max n1 n2) h (le_max_r n1 n2))). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; auto. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MEnc M K) (MEnc N L)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) elim HrecH0; elim HrecH1. (* Goal: forall (x : nat) (_ : analysis_seq h x (MEnc M K) (MEnc N L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n1. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (x : nat) (_ : synthesis (analysis_seq h x) (inv K) (inv L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (MPair M1 M2) (MPair N1 N2)) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) exists (max n1 n2). (* Goal: synthesis (analysis_seq h (Nat.max n1 n2)) (MPair M1 M2) (MPair N1 N2) *) (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) apply SynPair. generalize (inclusion_impl_le_h (analysis_seq h n1) (analysis_seq h (max n1 n2)) (analysis_seq_increase n1 (max n1 n2) h (le_max_l n1 n2))). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; auto. generalize (inclusion_impl_le_h (analysis_seq h n2) (analysis_seq h (max n1 n2)) (analysis_seq_increase n2 (max n1 n2) h (le_max_r n1 n2))). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; auto. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) elim HrecH. (* Goal: forall (x : nat) (_ : analysis_seq h x M N), h' M N *) intro n. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => synthesis (analysis_seq h n) (Mop o M) (Mop o N)) *) exists n. (* Goal: synthesis (analysis_seq h n) (Mop o M) (Mop o N) *) apply SynOp. (* Goal: le_h g h *) trivial. Qed. (** A(h) is indeed the analysis of h: it shows that for all h the analysis of h exists *) Lemma analysis_is_analysis : forall h : hedge, is_analysis h (analysis_def h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (M N : Msg) (_ : analysis_def h M N), h' M N *) unfold analysis_def in |- *. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: stable_analysis (analysis_def h) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) exists 0. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: le_h g h *) trivial. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : analysis_def h M N), h' M N *) unfold analysis_def in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H as [M N H| M1 M2 N1 N2 H HrecH| M1 M2 N1 N2 H HrecH| M N K L H HrecH H0]. (* Goal: le_h g h *) trivial. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) elim HrecH. (* Goal: forall (x : nat) (_ : analysis_seq h x M N), h' M N *) intro n. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => analysis_seq h n M2 N2) *) (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) exists (S n). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: analysis (analysis_seq h n) M1 N1 *) (* Goal: @ex nat (fun n : nat => analysis_seq h n M2 N2) *) (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) apply (AnaSplitL (analysis_seq h n) M1 M2 N1 N2). (* Goal: analysis h M N *) apply AnaInc. (* Goal: le_h g h *) trivial. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) elim HrecH. (* Goal: forall (x : nat) (_ : analysis_seq h x M N), h' M N *) intro n. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => analysis_seq h n M2 N2) *) (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) exists (S n). (* Goal: analysis_seq h (S n) M2 N2 *) (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) apply (AnaSplitR (analysis_seq h n) M1 M2 N1 N2). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) elim HrecH. (* Goal: forall (x : nat) (_ : analysis_seq h x (MEnc M K) (MEnc N L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n1. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) generalize (synthesis_analysis_seq h (inv K) (inv L) H0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H2. (* Goal: forall (x : nat) (_ : synthesis (analysis_seq h x) (inv K) (inv L)), @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) intro n2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex nat (fun n : nat => analysis_seq h n M N) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) exists (S (max n1 n2)). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: analysis (analysis_seq h (Nat.max n1 n2)) M N *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) apply (AnaDec (analysis_seq h (max n1 n2)) M N K L). (* Goal: analysis h M N *) apply AnaInc. (* Goal: analysis_seq h (Nat.max n1 n2) (MEnc M K) (MEnc N L) *) (* Goal: synthesis (analysis_seq h (Nat.max n1 n2)) (inv K) (inv L) *) (* Goal: forall (h' : hedge) (_ : analysis_cond h h'), inclusion (analysis_def h) h' *) generalize (analysis_seq_increase n1 (max n1 n2) h (le_max_l n1 n2)). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. generalize (inclusion_impl_le_h (analysis_seq h n2) (analysis_seq h (max n1 n2)) (analysis_seq_increase n2 (max n1 n2) h (le_max_r n1 n2))). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : analysis_def h M N), h' M N *) unfold analysis_def in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (x : nat) (_ : analysis_seq h x M N), h' M N *) intro n. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: h' M N *) generalize (analysis_seq_incl_analysis_cond h h' H n). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. Qed. (** the irreducibles I(h) of h is (reduce (A(h))) *) Definition irreducible (h : hedge) := reduce (analysis_def h). (** here follows three lemma that make clear the definition of the irreducibles of h *) Lemma irreducible_enc : forall (h : hedge) (M N K L : Msg), irreducible h (MEnc M K) (MEnc N L) <-> analysis_def h (MEnc M K) (MEnc N L) /\ (~ synthesis (analysis_def h) M N \/ ~ synthesis (analysis_def h) K L). (* Goal: forall (h : hedge) (M N K L : Msg), iff (irreducible h (MEnc M K) (MEnc N L)) (and (analysis_def h (MEnc M K) (MEnc N L)) (or (not (synthesis (analysis_def h) M N)) (not (synthesis (analysis_def h) K L)))) *) intros h M N K L. (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Lemma irreducible_op : forall (h : hedge) (oM oN : op) (M N : Msg), irreducible h (Mop oM M) (Mop oN N) <-> analysis_def h (Mop oM M) (Mop oN N) /\ (oM <> oN \/ ~ synthesis (analysis_def h) M N). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Lemma irreducible_pair : forall (h : hedge) (M1 N1 M2 N2 : Msg), ~ irreducible h (MPair M1 M2) (MPair N1 N2). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) cut (analysis_def h M1 N1 /\ analysis_def h M2 N2). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H2. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) case H1; intro H5; apply H5; trivial. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: and (analysis_def h M1 N1) (analysis_def h M2 N2) *) cut (is_analysis h (analysis_def h)); try apply analysis_is_analysis. (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H2. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (analysis_def h M1 N1) (analysis_def h M2 N2) *) unfold stable_analysis in H6. (* Goal: and (analysis_def h M1 N1) (analysis_def h M2 N2) *) unfold inclusion in H6. (* Goal: False *) split; apply H6. (* Goal: le_h g h *) apply (AnaSplitL (analysis_def h) M1 M2 N1 N2); apply AnaInc; trivial. (* Goal: le_h g h *) apply (AnaSplitR (analysis_def h) M1 M2 N1 N2); apply AnaInc; trivial. Qed. (** h is irreducible iff h = I(h) *) Definition is_irreducible (h : hedge) := equal h (irreducible h). (** h <= A(h) *) Theorem h_le_h_ana_h : forall h : hedge, le_h h (analysis_def h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion h (analysis_def h) *) unfold is_analysis in H. (* Goal: inclusion h (analysis_def h) *) unfold analysis_cond in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** A(h) ~ I(h) *) Theorem ana_h_equiv_irr_h : forall h : hedge, equiv_h (analysis_def h) (irreducible h). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: equiv_h h (reduce h) *) (* Goal: equiv_h h (irreducible h) *) apply h_equiv_h_red. Qed. (** h <= I(h) *) Theorem h_le_h_irr_h : forall h : hedge, le_h h (irreducible h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h (irreducible g) (irreducible h) *) apply le_h_trans with (analysis_def h). (* Goal: le_h h (analysis_def h) *) (* Goal: le_h (analysis_def h) h *) (* Goal: equiv_h (analysis_def h) (irreducible h) *) apply h_le_h_ana_h. (* Goal: synthesis h M N *) generalize (ana_h_equiv_irr_h h). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** A(I(h)) is included in A(h) *) Lemma ana_irr_incl_ana : forall h : hedge, inclusion (analysis_def (irreducible h)) (analysis_def h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def (irreducible h)) (analysis_def h) *) generalize (analysis_is_analysis (irreducible h)). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) apply H1. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def h) *) (* Goal: stable_analysis (analysis_def h) *) apply red_incl_h. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** I(I(h)) is included in I(h) *) Lemma irr_irr_incl_irr : forall h : hedge, inclusion (irreducible (irreducible h)) (irreducible h). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (reduce (analysis_def (reduce (analysis_def h)))) (reduce (analysis_def h)) *) apply inclusion_le_h_reduce_inclusion. (* Goal: le_h (analysis_def h) (analysis_def (reduce (analysis_def h))) *) replace (reduce (analysis_def h)) with (irreducible h). (* Goal: inclusion (analysis_def (irreducible h)) (analysis_def h) *) (* Goal: le_h (analysis_def h) (reduce (analysis_def h)) *) apply ana_irr_incl_ana. (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: le_h g h *) trivial. (* Goal: le_h (analysis_def h) (analysis_def (reduce (analysis_def h))) *) replace (reduce (analysis_def h)) with (irreducible h). (* Goal: le_h (analysis_def h) (analysis_def (irreducible h)) *) (* Goal: @eq (forall (_ : Msg) (_ : Msg), Prop) (irreducible h) (reduce (analysis_def h)) *) apply le_h_trans with (irreducible h). (* Goal: le_h (analysis_def h) (irreducible h) *) generalize ana_h_equiv_irr_h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) elim (H h); tauto. (* Goal: le_h h (analysis_def h) *) (* Goal: le_h (analysis_def h) h *) (* Goal: equiv_h (analysis_def h) (irreducible h) *) apply h_le_h_ana_h. (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: le_h g h *) trivial. Qed. (* I(h) is included in I(I(h)) *) Lemma irr_incl_irr_irr : forall h : hedge, inclusion (irreducible h) (irreducible (irreducible h)). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (reduce (analysis_def h)) (reduce (analysis_def (reduce (analysis_def h)))) *) apply inclusion_le_h_impl_inclusion_red. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def (reduce (analysis_def h))) *) (* Goal: le_h (analysis_def (reduce (analysis_def h))) (reduce (analysis_def h)) *) generalize (analysis_is_analysis (reduce (analysis_def h))). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h (irreducible g) (irreducible h) *) apply le_h_trans with (analysis_def h). (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: le_h (analysis_def h) (reduce (analysis_def h)) *) fold (irreducible h) in |- *. (* Goal: inclusion (analysis_def (irreducible h)) (analysis_def h) *) (* Goal: le_h (analysis_def h) (reduce (analysis_def h)) *) apply ana_irr_incl_ana. (* Goal: le_h (analysis_def h) (reduce (analysis_def h)) *) fold (irreducible h) in |- *. (* Goal: le_h (analysis_def h) (irreducible h) *) generalize ana_h_equiv_irr_h. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim (H h); auto. Qed. (** I(h) is irreducible *) Theorem irreducible_is_irreducible : forall h : hedge, is_irreducible (irreducible h). (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion (irreducible h) (irreducible (irreducible h))) (inclusion (irreducible (irreducible h)) (irreducible h)) *) generalize (irr_incl_irr_irr h). (* Goal: forall _ : inclusion (irreducible h) (irreducible (irreducible h)), and (inclusion (irreducible h) (irreducible (irreducible h))) (inclusion (irreducible (irreducible h)) (irreducible h)) *) generalize (irr_irr_incl_irr h). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if g ~ h and g is irreducible then g is included in h *) Theorem equiv_irr_impl_incl : forall g h : hedge, equiv_h g h -> is_irreducible g -> inclusion g h. (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion g h *) apply inclusion_trans with (reduce (analysis_def g)). (* Goal: inclusion g (reduce (analysis_def g)) *) (* Goal: inclusion (reduce (analysis_def g)) h *) unfold equal in H0. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: inclusion (reduce h) (irreducible h) *) apply red_equiv_impl_red_incl. (* Goal: equiv_h (reduce (analysis_def g)) h *) apply equiv_h_trans with g. (* Goal: equiv_h (reduce (analysis_def g)) g *) (* Goal: equiv_h g h *) apply equal_impl_equiv_h. (* Goal: equal (transpose (irreducible h)) (irreducible (transpose h)) *) apply equal_sym. (* Goal: le_h g h *) trivial. (* Goal: le_h g h *) trivial. Qed. (** if g ~ h, g is irreducible and h is irreducible then g = h *) Theorem equiv_irr_irr_impl_equal : forall g h : hedge, equiv_h g h -> is_irreducible g -> is_irreducible h -> equal g h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) apply equiv_irr_impl_incl; trivial. (* Goal: le_h g h *) apply equiv_irr_impl_incl; trivial. (* Goal: le_h g h *) apply equiv_h_sym; trivial. Qed. (** h <= (analysis h) *) Lemma h_le_h_analysis : forall h : hedge, le_h h (analysis h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis h M N *) apply AnaInc. (* Goal: le_h g h *) trivial. Qed. (** S(S(h)) = S(h) *) Lemma synthesis_idempotent : forall h : hedge, equal (synthesis h) (synthesis (synthesis h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) generalize (incl_syn_impl_le_h (synthesis h) h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) apply H. (* Goal: inclusion (synthesis h) (synthesis h) *) apply inclusion_refl. Qed. (** if h is stable under analysis then so is S(h) *) Lemma stable_ana_impl_stable_syn_ana : forall h : hedge, stable_analysis h -> stable_analysis (synthesis h). (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H0 as [M N H0| M1 M2 N1 N2 H0 HrecH0| M1 M2 N1 N2 H0 HrecH0| M N K L H0 HrecH0 H1]; (* Goal: le_h g h *) trivial. (* Goal: le_h g h *) inversion HrecH0; trivial. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) apply H. (* Goal: analysis h M1 N1 *) (* Goal: analysis h M2 N2 *) (* Goal: analysis h M N *) apply (AnaSplitL h M1 M2 N1 N2). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: le_h g h *) inversion HrecH0; trivial. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) apply H. (* Goal: analysis h M2 N2 *) (* Goal: analysis h M N *) apply (AnaSplitR h M1 M2 N1 N2). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: le_h g h *) inversion HrecH0; trivial. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: inclusion (synthesis (synthesis h)) (synthesis h) *) apply H. (* Goal: le_h g h *) apply (AnaDec h M N K L); trivial. (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: synthesis h M N *) generalize (synthesis_idempotent h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply H7; trivial. Qed. (** if g <= h then A(g) <= A(h) *) Lemma le_h_ana_le_h : forall g h : hedge, le_h g h -> le_h (analysis_def g) (analysis_def h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (analysis_def g) (analysis_def h) *) generalize (le_h_impl_incl_syn g h H). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. (* Goal: analysis_def g M' N0 *) generalize (analysis_is_analysis g). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) elim H1. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: inclusion g (synthesis (analysis_def h)) *) (* Goal: stable_analysis (synthesis (analysis_def h)) *) apply inclusion_trans with (synthesis h). (* Goal: le_h g h *) trivial. (* Goal: inclusion (synthesis h) (synthesis (analysis_def h)) *) (* Goal: stable_analysis (synthesis (analysis_def h)) *) generalize h_le_h_ana_h. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: le_h g h *) trivial. (* Goal: stable_analysis (synthesis (analysis_def h)) *) apply stable_ana_impl_stable_syn_ana. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if g <= h then I(g) <= I(h) *) Theorem le_h_irr_le_h : forall g h : hedge, le_h g h -> le_h (irreducible g) (irreducible h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (irreducible g) (irreducible h) *) apply le_h_trans with (analysis_def h). (* Goal: le_h (irreducible g) (analysis_def h) *) (* Goal: le_h (analysis_def h) (irreducible h) *) apply le_h_trans with (analysis_def g). (* Goal: synthesis (irreducible g) M' N0 *) generalize (ana_h_equiv_irr_h g). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) unfold equiv_h in |- *; tauto. (* Goal: le_h g h *) apply le_h_ana_le_h; trivial. (* Goal: synthesis h M N *) generalize (ana_h_equiv_irr_h h). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) unfold equiv_h in |- *; tauto. Qed. (** if g ~ h then I(g) = I(h) *) Theorem equiv_h_impl_irr_unique : forall g h : hedge, equiv_h g h -> equal (irreducible g) (irreducible h). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: equal (irreducible (union (irreducible h) g)) (irreducible (union h g)) *) apply equiv_irr_irr_impl_equal; try apply irreducible_is_irreducible. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H; intros. (* Goal: le_h g h *) split; apply le_h_irr_le_h; trivial. Qed. (** I(union I(h) g) = I(union h g) *) Theorem update_irr : forall g h : hedge, equal (irreducible (union (irreducible h) g)) (irreducible (union h g)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: equal (irreducible (union (irreducible h) g)) (irreducible (union h g)) *) apply equiv_irr_irr_impl_equal; try apply irreducible_is_irreducible. (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h (irreducible (union (irreducible h) g)) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_trans with (irreducible (irreducible (union h g))). (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_irr_le_h. (* Goal: le_h (union (irreducible h) g) (irreducible (union h g)) *) (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_le_h_impl_union_le_h. (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_irr_le_h. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: inclusion h (union h g) *) (* Goal: le_h g (irreducible (union h g)) *) (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply hedge_left_union. (* Goal: le_h g (irreducible (union h g)) *) (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_trans with (irreducible g). (* Goal: le_h h (irreducible h) *) (* Goal: le_h g g *) apply h_le_h_irr_h. (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_irr_le_h. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: inclusion g (union h g) *) (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply hedge_right_union. (* Goal: le_h (irreducible (irreducible (union h g))) (irreducible (union h g)) *) (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) generalize (irreducible_is_irreducible (union h g)). (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h (irreducible (union h g)) (irreducible (union (irreducible h) g)) *) apply le_h_irr_le_h. (* Goal: le_h (union h g) (union (irreducible h) g) *) apply le_h_le_h_impl_le_h_union. (* Goal: le_h h (irreducible h) *) (* Goal: le_h g g *) apply h_le_h_irr_h. (* Goal: le_h g g *) apply le_h_refl. Qed. (** we define afterwards the notion of left consistency: we define first several predicates on hedges *) (** if (M,N) is in h and M is a name then N is a name *) Definition name_left_name (h : hedge) := forall M N : Msg, h M N -> forall a : Nam, M = MNam a -> exists b : Nam, N = MNam b. (** if (M,N) and (M',N') are in h and M = M' then N = N' *) Definition injective_left (h : hedge) := forall M N : Msg, h M N -> forall M' N' : Msg, h M' N' -> M = M' -> N = N'. (** if op(M) is in the left projection of h then M is not in the left projection of S(h) *) Definition op_synthesis_left (h : hedge) := forall (o : op) (M N : Msg), h M N -> forall M' : Msg, M = Mop o M' -> forall N' : Msg, ~ synthesis h M' N'. (** if {M}K is in the left projection of h then either M or K are not in the left projection of S(h) *) Definition enc_synthesis_left (h : hedge) := forall M N : Msg, h M N -> forall M' K : Msg, M = MEnc M' K -> forall N' L : Msg, ~ synthesis h M' N' \/ ~ synthesis h K L. (** the left projection of h does not contain any pair *) Definition pair_free_left (h : hedge) := forall M1 M2 N : Msg, ~ h (MPair M1 M2) N. (** if ({M}K,N') is in h and (inv K) is in the left projection of S(h) then N' = {N}L, (inv K,inv L) is in S(h) and (M,N) is in S(h) *) Definition enc_analysis_left (h : hedge) := forall M N : Msg, h M N -> forall M' K : Msg, M = MEnc M' K -> forall L : Msg, synthesis h (inv K) (inv L) -> exists N' : Msg, N = MEnc N' L /\ synthesis h M' N'. (** if (M,N) is in h and (inv M,N') is in h then N'=(inv N) *) Definition injective_inv_left (h : hedge) := forall M N : Msg, h M N -> forall M' N' : Msg, h M' N' -> M' = inv M -> N' = inv N. (** left consistency of h *) Definition is_left_consistent (h : hedge) : Prop := name_left_name h /\ injective_left h /\ op_synthesis_left h /\ pair_free_left h /\ enc_synthesis_left h /\ enc_analysis_left h /\ injective_inv_left h. Definition weak_left_consistent (h : hedge) := name_left_name h /\ injective_left h /\ op_synthesis_left h /\ pair_free_left h /\ enc_synthesis_left h /\ enc_analysis_left h. Theorem inj_left_syn : forall h : hedge, injective_left h -> enc_synthesis_left h -> op_synthesis_left h -> pair_free_left h -> injective_left (synthesis h). (* Goal: forall _ : injective_left (synthesis h), @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold injective_left in |- *. (* Goal: enc_synthesis_left g *) (* Goal: enc_analysis_left g *) unfold enc_synthesis_left in |- *. (* Goal: op_synthesis_left g *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold op_synthesis_left in |- *. (* Goal: pair_free_left g *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) unfold pair_free_left in |- *. (* Goal: forall (h : hedge) (_ : injective_left h) (_ : enc_synthesis_left h) (_ : op_synthesis_left h) (_ : pair_free_left h) (_ : injective_inv_left h), injective_inv_left (synthesis h) *) intro h. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (M N : Msg) (_ : synthesis h M N) (M' N' : Msg) (_ : synthesis h M' N') (_ : @eq Msg M M'), @eq Msg N N' *) intros M N H3. induction H3 as [M N H3| M N K L H3_1 HrecH3_1 H3_0 HrecH3_0| M1 N1 M2 N2 H3_1 HrecH3_1 H3_0 HrecH3_0| o M N H3 HrecH3]; intros M' N' H4; [ induction H4 as [M0 N0 H4| M0 N0 K L H4_1 HrecH4_1 H4_0 HrecH4_0| M1 N1 M2 N2 H4_1 HrecH4_1 H4_0 HrecH4_0| o M0 N0 H4 HrecH4] | induction H4 as [M0 N0 H3| M0 N0 K0 L0 H4_1 HrecH4_1 H4_0 HrecH4_0| M1 N1 M2 N2 H4_1 HrecH4_1 H4_0 HrecH4_0| o M0 N0 H4 HrecH4] | induction H4 as [M N H3| M N K L H4_1 HrecH4_1 H4_0 HrecH4_0| M0 N0 M3 N3 H4_1 HrecH4_1 H4_0 HrecH4_0| o M N H4 HrecH4] | induction H4 as [M0 N0 H4| M0 N0 K L H4_1 HrecH4_1 H4_0 HrecH4_0| M1 N1 M2 N2 H4_1 HrecH4_1 H4_0 HrecH4_0| o0 M0 N0 H4 HrecH4] ]. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N N0 *) (* Goal: forall _ : @eq Msg M (MEnc M0 K), @eq Msg N (MEnc N0 L) *) (* Goal: forall _ : @eq Msg M (MPair M1 M2), @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg M (Mop o M0), @eq Msg N (Mop o N0) *) (* Goal: forall _ : @eq Msg (MEnc M K) M0, @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) exact (H M N H3 M0 N0 H4 H5). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N (MEnc N0 L) *) (* Goal: forall _ : @eq Msg M (MPair M1 M2), @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg M (Mop o M0), @eq Msg N (Mop o N0) *) (* Goal: forall _ : @eq Msg (MEnc M K) M0, @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut (~ synthesis h M0 N0 \/ ~ synthesis h K L). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case H5; intro H6; red in H6; tauto. (* Goal: or (not (synthesis h M0 N0)) (not (synthesis h K L)) *) (* Goal: forall _ : @eq Msg M (MPair M1 M2), @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg M (Mop o M0), @eq Msg N (Mop o N0) *) (* Goal: forall _ : @eq Msg (MEnc M K) M0, @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) apply (H0 M N H3 M0 K H4). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg M (Mop o M0), @eq Msg N (Mop o N0) *) (* Goal: forall _ : @eq Msg (MEnc M K) M0, @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite H4 in H3. (* Goal: @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut False. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h g h *) apply (H2 M1 M2 N); trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N (Mop o N0) *) (* Goal: forall _ : @eq Msg (MEnc M K) M0, @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut (~ synthesis h M0 N0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h g h *) apply (H1 o M N H3 M0 H5); trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MEnc N L) N0 *) (* Goal: forall _ : @eq Msg (MEnc M K) (MEnc M0 K0), @eq Msg (MEnc N L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut (~ synthesis h M N \/ ~ synthesis h K L). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case H5; intro H6; red in H6; tauto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) apply (H0 M0 N0 H3 M K); auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite (HrecH3_1 M0 N0 H4_1 H5). (* Goal: @eq Msg (MEnc N0 L) (MEnc N0 L0) *) (* Goal: forall _ : @eq Msg (MEnc M K) (MPair M1 M2), @eq Msg (MEnc N L) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (Mop o M0), @eq Msg (MEnc N L) (Mop o N0) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) M, @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite (HrecH3_0 K0 L0 H4_0 H6). (* Goal: le_h g h *) trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite <- H4 in H3. (* Goal: @eq Msg (MPair N1 N2) N *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut False. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: False *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MEnc M K), @eq Msg (MPair N1 N2) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (MPair M0 M3), @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) apply (H2 M1 M2 N H3). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: @eq Msg (MPair N1 N2) (MPair N0 N3) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (Mop o M), @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite (HrecH3_1 M0 N0 H4_1 H5). (* Goal: le_h g h *) rewrite (HrecH3_0 M3 N3 H4_0 H6); trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (Mop o N) *) (* Goal: forall _ : @eq Msg (Mop o M) M0, @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H3. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N) N0 *) (* Goal: forall _ : @eq Msg (Mop o M) (MEnc M0 K), @eq Msg (Mop o N) (MEnc N0 L) *) (* Goal: forall _ : @eq Msg (Mop o M) (MPair M1 M2), @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) cut (~ synthesis h M N). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) apply (H1 o M0 N0 H4 M); auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H4. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) inversion H4. (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) case (op_eq_dec o o0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : @eq Msg (Mop o M) (Mop o0 M0), @eq Msg (Mop o N) (Mop o0 N0) *) (* Goal: forall (_ : not (@eq op o o0)) (_ : @eq Msg (Mop o M) (Mop o0 M0)), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite <- e. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N) (Mop o0 N0) *) inversion H5. (* Goal: @eq Msg (Mop o N) (Mop o N0) *) (* Goal: forall (_ : not (@eq op o o0)) (_ : @eq Msg (Mop o M) (Mop o0 M0)), @eq Msg (Mop o N) (Mop o0 N0) *) rewrite (HrecH3 M0 N0 H4 H7). (* Goal: le_h g h *) trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg (Mop o N) (Mop o0 N0) *) inversion H5. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Theorem inj_inv_left_syn : forall h : hedge, injective_left h -> enc_synthesis_left h -> op_synthesis_left h -> pair_free_left h -> injective_inv_left h -> injective_inv_left (synthesis h). (* Goal: forall (h : hedge) (_ : injective_left h) (_ : enc_synthesis_left h) (_ : op_synthesis_left h) (_ : pair_free_left h) (_ : injective_inv_left h), injective_inv_left (synthesis h) *) intro h. (* Goal: forall (_ : injective_left h) (_ : enc_synthesis_left h) (_ : op_synthesis_left h) (_ : pair_free_left h) (_ : injective_inv_left h), injective_inv_left (synthesis h) *) intros H0 H1 H2 H3 H4. (* Goal: injective_inv_left (synthesis h) *) generalize (inj_left_syn h H0 H1 H2 H3). (* Goal: forall _ : injective_left (synthesis h), injective_inv_left (synthesis h) *) intro H4bis. (* Goal: injective_inv_left (synthesis h) *) unfold injective_left in H0. (* Goal: injective_inv_left (synthesis h) *) unfold enc_synthesis_left in H1. (* Goal: injective_inv_left (synthesis h) *) unfold op_synthesis_left in H2. (* Goal: injective_inv_left (synthesis h) *) unfold pair_free_left in H3. (* Goal: injective_inv_left (synthesis h) *) unfold injective_inv_left in H4. (* Goal: injective_inv_left (synthesis h) *) unfold injective_left in H4bis. (* Goal: forall _ : injective_inv_left (synthesis h), @eq Msg N' (inv N) *) unfold injective_inv_left in |- *. (* Goal: forall (M N : Msg) (_ : synthesis h M N) (M' N' : Msg) (_ : synthesis h M' N') (_ : @eq Msg M' (inv M)), @eq Msg N' (inv N) *) intros M N H5. induction H5 as [M N H| M N K L H5_1 HrecH5_1 H5_0 HrecH5_0| M1 N1 M2 N2 H5_1 HrecH5_1 H5_0 HrecH5_0| o M N H5 HrecH5]; intros M' N' H6; [ induction H6 as [M0 N0 H5| M0 N0 K L H6_1 HrecH6_1 H6_0 HrecH6_0| M1 N1 M2 N2 H6_1 HrecH6_1 H6_0 HrecH6_0| o M0 N0 H6 HrecH6] | induction H6 as [M0 N0 H| M0 N0 K0 L0 H6_1 HrecH6_1 H6_0 HrecH6_0| M1 N1 M2 N2 H6_1 HrecH6_1 H6_0 HrecH6_0| o M0 N0 H6 HrecH6] | induction H6 as [M N H| M N K L H6_1 HrecH6_1 H6_0 HrecH6_0| M0 N0 M3 N3 H6_1 HrecH6_1 H6_0 HrecH6_0| o M N H6 HrecH6] | induction H6 as [M0 N0 H| M0 N0 K L H6_1 HrecH6_1 H6_0 HrecH6_0| M1 N1 M2 N2 H6_1 HrecH6_1 H6_0 HrecH6_0| o0 M0 N0 H6 HrecH6] ]. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N0 (inv N) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv M), @eq Msg (MEnc N0 L) (inv N) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv M), @eq Msg (MPair N1 N2) (inv N) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv M), @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4 M N H M0 N0 H5 H6). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MEnc N0 L) (inv N) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv M), @eq Msg (MPair N1 N2) (inv N) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv M), @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (M = inv (MEnc M0 K)). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case (H1 M N H M0 K H6 N0 L); intro; tauto. (* Goal: @eq Msg M (inv (Mop o M0)) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) rewrite H5. symmetry in |- *. (* Goal: @eq Msg (inv (inv L)) L *) apply inv_invol. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (inv N) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv M), @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (M = inv (MPair M1 M2)). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N1 N2) (inv N) *) (* Goal: @eq Msg M (inv (MPair M1 M2)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv M), @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) rewrite H6 in H. (* Goal: @eq Msg (MPair N1 N2) (inv N) *) (* Goal: @eq Msg M (inv (MPair M1 M2)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv M), @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) generalize (H3 M1 M2 N). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: @eq Msg M (inv (Mop o M0)) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) rewrite H5. symmetry in |- *. (* Goal: @eq Msg (inv (inv L)) L *) apply inv_invol. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N0) (inv N) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (M = inv (Mop o M0)). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o N0) (inv N) *) (* Goal: @eq Msg M (inv (Mop o M0)) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) generalize (H2 (inv_op o) M N H M0 H7 N0). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: @eq Msg M (inv (Mop o M0)) *) (* Goal: forall _ : @eq Msg M0 (inv (MEnc M K)), @eq Msg N0 (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) rewrite H5. symmetry in |- *. (* Goal: @eq Msg (inv (inv L)) L *) apply inv_invol. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall _ : @eq Msg M0 (MEnc M K), @eq Msg N0 (MEnc N L) *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h M0 N0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N0 (MEnc N L) *) (* Goal: synthesis h M0 N0 *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MEnc M K) (MEnc N L)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N0 (MEnc N L) *) (* Goal: synthesis h (MEnc M K) (MEnc N L) *) (* Goal: synthesis h M0 N0 *) (* Goal: forall _ : @eq Msg (MEnc M0 K0) (inv (MEnc M K)), @eq Msg (MEnc N0 L0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4bis M0 N0 H5 (MEnc M K) (MEnc N L) H7 H6). (* Goal: le_h g h *) apply SynEnc; trivial. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: @eq Msg (MEnc N0 L0) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MEnc M0 K0) (MEnc N0 L0)); try (apply SynEnc; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MEnc N0 L0) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MEnc M K) (MEnc N L)); try (apply SynEnc; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MEnc N0 L0) (MEnc N L) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (MEnc M K)), @eq Msg (MPair N1 N2) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg (Mop o M0) (inv (MEnc M K)), @eq Msg (Mop o N0) (inv (MEnc N L)) *) (* Goal: forall _ : @eq Msg M (inv (MPair M1 M2)), @eq Msg N (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4bis (MEnc M0 K0) (MEnc N0 L0) H5 (MEnc M K) (MEnc N L) H8 H). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall _ : @eq Msg M (MPair M1 M2), @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h M N); try (apply SynInc; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N0 N3) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MPair M1 M2) (MPair N1 N2)); try (apply SynPair; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (MEnc M K) (inv (MPair M1 M2)), @eq Msg (MEnc N L) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (MPair M0 M3) (inv (MPair M1 M2)), @eq Msg (MPair N0 N3) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4bis M N H5 (MPair M1 M2) (MPair N1 N2) H6 H7). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N0 N3) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MPair M1 M2) (MPair N1 N2)); try (apply SynPair; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N0 N3) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h (MPair M0 M3) (MPair N0 N3)); try (apply SynPair; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (MPair N0 N3) (MPair N1 N2) *) (* Goal: forall _ : @eq Msg (Mop o M) (inv (MPair M1 M2)), @eq Msg (Mop o N) (inv (MPair N1 N2)) *) (* Goal: forall _ : @eq Msg M0 (inv (Mop o M)), @eq Msg N0 (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4bis (MPair M0 M3) (MPair N0 N3) H6 (MPair M1 M2) (MPair N1 N2) H5 H). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall _ : @eq Msg M0 (Mop (inv_op o) M), @eq Msg N0 (Mop (inv_op o) N) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) cut (synthesis h M0 N0); try (apply SynInc; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. cut (synthesis h (Mop (inv_op o) M) (Mop (inv_op o) N)); try (apply SynOp; trivial). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N0 (Mop (inv_op o) N) *) (* Goal: forall _ : @eq Msg (MEnc M0 K) (inv (Mop o M)), @eq Msg (MEnc N0 L) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (MPair M1 M2) (inv (Mop o M)), @eq Msg (MPair N1 N2) (inv (Mop o N)) *) (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) apply (H4bis M0 N0 H6 (Mop (inv_op o) M) (Mop (inv_op o) N) H7 H8). (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: forall _ : @eq Msg (Mop o0 M0) (inv (Mop o M)), @eq Msg (Mop o0 N0) (inv (Mop o N)) *) simpl in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg (Mop o0 N0) (Mop (inv_op o) N) *) inversion H. (* Goal: @eq Msg (Mop (inv_op o) N0) (Mop (inv_op o) N) *) cut (N0 = N). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h g h *) rewrite H7; trivial. (* Goal: @eq Msg N0 N *) apply (H4bis M0 N0 H6 M N H5 H9). Qed. (** the transposition of h is the hedge where all the pairs (M,N) are reversed in (N,M) *) Definition transpose (h : hedge) (M N : Msg) := h N M. (** h is consistent if h is left consistent and if (transpose h) is left consistent (h is right consistent) *) Definition is_consistent (h : hedge) := is_left_consistent h /\ is_left_consistent (transpose h). Definition no_pairs (h : hedge) := forall M1 M2 N1 N2 : Msg, ~ h (MPair M1 M2) (MPair N1 N2). Definition no_syn_ops (h : hedge) := forall (o : op) (M N : Msg), h (Mop o M) (Mop o N) -> ~ synthesis h M N. Definition no_syn_cyph (h : hedge) := forall M N K L : Msg, h (MEnc M K) (MEnc N L) -> ~ synthesis h M N \/ ~ synthesis h K L. Definition cyph_dec (h : hedge) := forall M N K L : Msg, h (MEnc M K) (MEnc N L) -> synthesis h (inv K) (inv L) -> synthesis h M N. (** we show in the following that a hedge is irreducible iff it satisfies these conditions *) Definition cond_irr (h : hedge) := no_pairs h /\ no_syn_ops h /\ no_syn_cyph h /\ cyph_dec h. Lemma left_consistent_impl_cond_irr_strong : forall h : hedge, name_left_name h /\ injective_left h /\ op_synthesis_left h /\ pair_free_left h /\ enc_synthesis_left h /\ enc_analysis_left h -> cond_irr h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) elim H1. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) elim H7. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (h : hedge) (_ : is_irreducible h), cond_irr h *) unfold cond_irr in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_pairs h *) (* Goal: and (no_syn_ops h) (and (no_syn_cyph h) (cyph_dec h)) *) unfold no_pairs in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (h (MPair M1 M2) (MPair N1 N2)) *) (* Goal: and (no_syn_ops h) (and (no_syn_cyph h) (cyph_dec h)) *) unfold pair_free_left in H6. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_ops h) (and (no_syn_cyph h) (cyph_dec h)) *) apply (H6 M1 M2 (MPair N1 N2)). (* Goal: le_h g h *) trivial. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_syn_ops h *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) unfold op_synthesis_left in H4. (* Goal: no_syn_ops h *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) unfold no_syn_ops in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply (H4 o (Mop o M) (Mop o N)); trivial. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_syn_cyph h *) (* Goal: cyph_dec h *) unfold no_syn_cyph in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis h M N)) (not (synthesis h K L)) *) (* Goal: cyph_dec h *) unfold enc_synthesis_left in H8. (* Goal: le_h g h *) apply (H8 (MEnc M K) (MEnc N L)); trivial. (* Goal: cyph_dec h *) unfold cyph_dec in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) unfold enc_analysis_left in H9. (* Goal: synthesis h M N *) generalize (H9 (MEnc M K) (MEnc N L) H10 M K). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) cut (exists N' : Msg, MEnc N L = MEnc N' L /\ synthesis h M N'). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N' (inv N) *) elim H13. (* Goal: forall (x : Msg) (_ : and (@eq Msg N (MEnc x L)) (synthesis h M' x)), @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) intro N'. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis h M N *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N L) (MEnc N' L)) (synthesis h M N')) *) elim H14. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion H15; trivial. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) apply H12; auto. Qed. Lemma left_consistent_impl_cond_irr : forall h : hedge, is_left_consistent h -> cond_irr h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: cond_irr h *) apply left_consistent_impl_cond_irr_strong. (* Goal: and (name_left_name h) (and (injective_left h) (and (op_synthesis_left h) (and (pair_free_left h) (and (enc_synthesis_left h) (enc_analysis_left h))))) *) unfold is_left_consistent in H. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** a consistent hedge satisfies the conditions above *) Lemma consistent_impl_cond_irr : forall h : hedge, is_consistent h -> cond_irr h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : is_consistent h) (_ : le_h g h), is_consistent g *) unfold is_consistent in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: cond_irr h *) apply left_consistent_impl_cond_irr. (* Goal: le_h g h *) trivial. Qed. Lemma cond_irr_impl_le_h_ana : forall h : hedge, cond_irr h -> le_h (analysis_def h) h. (* Goal: forall (h : hedge) (_ : is_irreducible h), cond_irr h *) unfold cond_irr in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) apply H2. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: le_h g h *) trivial. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H3 as [M N H3| M1 M2 N1 N2 H3 HrecH3| M1 M2 N1 N2 H3 HrecH3| M N K L H3 HrecH3 H4]; (* Goal: le_h g h *) trivial. (* Goal: le_h g h *) inversion HrecH3; trivial. (* Goal: and (h (MPair m1 m2) (MPair m m0)) (or (not (synthesis h m1 m)) (not (synthesis h m2 m0))) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) unfold no_pairs in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M2 N2 *) (* Goal: synthesis h M N *) generalize (H7 M1 M2 N1 N2). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h g h *) inversion HrecH3; trivial. (* Goal: and (h (MPair m1 m2) (MPair m m0)) (or (not (synthesis h m1 m)) (not (synthesis h m2 m0))) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) unfold no_pairs in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M2 N2 *) (* Goal: synthesis h M N *) generalize (H7 M1 M2 N1 N2). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: synthesis h M N *) generalize (synthesis_idempotent h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) unfold inclusion in H7. (* Goal: synthesis h M N *) generalize (H7 (inv K) (inv L) H4). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis h M N *) unfold cyph_dec in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) elim H10. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) elim H12. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) inversion HrecH3; trivial. (* Goal: le_h g h *) apply (H14 M N K L); trivial. Qed. Lemma cond_irr_impl_equiv_h_irr : forall h : hedge, cond_irr h -> equiv_h h (irreducible h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: equiv_h h (irreducible h) *) apply equiv_h_trans with (analysis_def h). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h h (analysis_def h) *) (* Goal: le_h (analysis_def h) h *) (* Goal: equiv_h (analysis_def h) (irreducible h) *) apply h_le_h_ana_h. (* Goal: le_h g h *) apply cond_irr_impl_le_h_ana; trivial. (* Goal: equiv_h (analysis_def h) (irreducible h) *) apply ana_h_equiv_irr_h. Qed. (** if h satisfies cond_irr then I(h) is included in h *) Lemma cond_irr_impl_irr_incl_h : forall h : hedge, cond_irr h -> inclusion (irreducible h) h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (irreducible h) h *) apply equiv_irr_impl_incl. (* Goal: equiv_h (reduce h) h *) (* Goal: equiv_h h (irreducible h) *) apply equiv_h_sym. (* Goal: equiv_h h (irreducible h) *) apply cond_irr_impl_equiv_h_irr. (* Goal: le_h g h *) trivial. (* Goal: is_irreducible (irreducible h) *) apply irreducible_is_irreducible. Qed. Lemma cond_irr_impl_stable_reduce : forall h : hedge, cond_irr h -> equal h (reduce h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: inclusion (reduce (analysis_def h)) (analysis_def h) *) (* Goal: stable_analysis (analysis_def h) *) split; try apply red_incl_h. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case M; try tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) unfold cond_irr in H. (* Goal: and (h (MEnc m1 m2) (MEnc m m0)) (or (not (synthesis h m1 m)) (not (synthesis h m2 m0))) *) (* Goal: forall (m m0 : Msg) (_ : h (MPair m m0) N), and (h (MPair m m0) N) match N with | MNam n => True | MEnc m1 m2 => True | MPair N1 N2 => or (not (synthesis h m N1)) (not (synthesis h m0 N2)) | Mop o m1 => True end *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) unfold no_syn_cyph in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H2. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; trivial. (* Goal: le_h g h *) apply H5; trivial. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) unfold cond_irr in H. (* Goal: and (h (MPair m1 m2) (MPair m m0)) (or (not (synthesis h m1 m)) (not (synthesis h m2 m0))) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) unfold no_pairs in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (h (MPair m1 m2) (MPair m m0)) (or (not (synthesis h m1 m)) (not (synthesis h m2 m0))) *) (* Goal: forall (o : op) (m : Msg) (_ : h (Mop o m) N), and (h (Mop o m) N) match N with | MNam n => True | MEnc m0 m1 => True | MPair m0 m1 => True | Mop opN N' => or (not (@eq op o opN)) (not (synthesis h m N')) end *) generalize (H1 m1 m2 m m0). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; trivial. (* Goal: or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) case (op_eq_dec o0 o). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) rewrite e in H0. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) unfold cond_irr in H. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) unfold no_syn_ops in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H2; intros. (* Goal: not (synthesis h m0 m) *) (* Goal: forall _ : not (@eq op o0 o), or (not (@eq op o0 o)) (not (synthesis h m0 m)) *) apply (H3 o). (* Goal: le_h g h *) trivial. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if h satisfies cond_irr then h is included in I(h) *) Lemma cond_irr_impl_h_incl_irr : forall h : hedge, cond_irr h -> inclusion h (irreducible h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion h (irreducible h) *) apply inclusion_trans with (reduce h). (* Goal: inclusion h (reduce h) *) (* Goal: inclusion (reduce h) (irreducible h) *) generalize (cond_irr_impl_stable_reduce h H). (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) unfold equal in |- *; tauto. (* Goal: inclusion (reduce h) (irreducible h) *) apply red_equiv_impl_red_incl. (* Goal: equiv_h (reduce h) (irreducible h) *) apply equiv_h_trans with h. (* Goal: equiv_h (reduce h) h *) (* Goal: equiv_h h (irreducible h) *) apply equiv_h_sym. (* Goal: equiv_h h (reduce h) *) (* Goal: equiv_h h (irreducible h) *) apply h_equiv_h_red. (* Goal: equiv_h h (irreducible h) *) apply cond_irr_impl_equiv_h_irr. (* Goal: le_h g h *) trivial. Qed. (** if h satisfies cond_irr then h is irreducible *) Lemma cond_irr_impl_irreducible : forall h : hedge, cond_irr h -> is_irreducible h. (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) apply cond_irr_impl_h_incl_irr; trivial. (* Goal: le_h g h *) apply cond_irr_impl_irr_incl_h; trivial. Qed. (** if h is irreducible then h satisfies cond_irr *) Lemma irreducible_impl_cond_irr : forall h : hedge, is_irreducible h -> cond_irr h. (* Goal: forall (h : hedge) (_ : is_irreducible h), cond_irr h *) unfold cond_irr in |- *. (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_pairs h *) (* Goal: and (no_syn_ops h) (and (no_syn_cyph h) (cyph_dec h)) *) unfold no_pairs in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_ops h) (and (no_syn_cyph h) (cyph_dec h)) *) apply (irreducible_pair h M1 N1 M2 N2). (* Goal: le_h g h *) apply H0; trivial. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_syn_ops h *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) unfold no_syn_ops in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) generalize (irreducible_op h o o M N). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) generalize (H0 (Mop o M) (Mop o N) H2). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) generalize (H5 H7). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) elim H8. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) case H10. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (no_syn_cyph h) (cyph_dec h) *) apply H11. (* Goal: synthesis (analysis_def h) (inv K) (inv L) *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) generalize (h_le_h_ana_h h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: no_syn_cyph h *) (* Goal: cyph_dec h *) unfold no_syn_cyph in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis h M N)) (not (synthesis h K L)) *) (* Goal: cyph_dec h *) generalize (irreducible_enc h M N K L). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis h M N)) (not (synthesis h K L)) *) (* Goal: cyph_dec h *) generalize (H4 (H0 (MEnc M K) (MEnc N L) H2)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: or (not (synthesis h M N)) (not (synthesis h K L)) *) (* Goal: cyph_dec h *) elim H6. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis h M N)) (not (synthesis h K L)) *) (* Goal: cyph_dec h *) case H8. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: cyph_dec h *) apply H9. (* Goal: synthesis (analysis_def h) (inv K) (inv L) *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) generalize (h_le_h_ana_h h). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; unfold inclusion in |- *; auto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: cyph_dec h *) apply H9. (* Goal: synthesis (analysis_def h) (inv K) (inv L) *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) generalize (h_le_h_ana_h h). (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold le_h in |- *; unfold inclusion in |- *; auto. (* Goal: cyph_dec h *) unfold cyph_dec in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) generalize (H0 (MEnc M K) (MEnc N L) H2). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) generalize (ana_h_equiv_irr_h h). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) elim H7. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) cut (inclusion (synthesis (irreducible h)) (synthesis h)). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply H10. (* Goal: synthesis (irreducible h) M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) unfold inclusion in H8. (* Goal: synthesis (irreducible h) M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply H8. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) elim H11. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) elim H12. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) unfold inclusion in H15. (* Goal: analysis_def h M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply H15. (* Goal: analysis (analysis_def h) M N *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) apply (AnaDec (analysis_def h) M N K L). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: synthesis (analysis_def h) (inv K) (inv L) *) (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) generalize (h_le_h_ana_h h). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: inclusion (synthesis (irreducible h)) (synthesis h) *) fold (le_h (irreducible h) h) in |- *. (* Goal: le_h (irreducible h) h *) apply inclusion_impl_le_h. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** h is irreducible iff it satisfies cond_irr *) Theorem irreducible_iff_cond_irr : forall h : hedge, cond_irr h <-> is_irreducible h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: is_irreducible h *) apply cond_irr_impl_irreducible. (* Goal: forall _ : is_irreducible h, cond_irr h *) apply irreducible_impl_cond_irr. Qed. (** a consistent hedge is irreducible *) Theorem consistent_impl_irreducible : forall h : hedge, is_consistent h -> is_irreducible h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_irreducible h *) apply cond_irr_impl_irreducible. (* Goal: cond_irr h *) apply consistent_impl_cond_irr. (* Goal: le_h g h *) trivial. Qed. (** if g ~ h, g is consistent and h is consistent then g = h *) Theorem equiv_consistent_consistent_equal : forall g h : hedge, equiv_h g h -> is_consistent g -> is_consistent h -> equal g h. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. apply equiv_irr_irr_impl_equal; try apply consistent_impl_irreducible; (* Goal: le_h g h *) trivial. Qed. (** if g is included in h then (transpose g) is included in (transpose h) *) Lemma inclusion_transpose_inclusion : forall g h : hedge, inclusion g h -> inclusion (transpose g) (transpose h). (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply H; trivial. Qed. (** if g = h then (transpose g)=(transpose h) *) Lemma equal_transpose_equal : forall g h : hedge, equal g h -> equal (transpose g) (transpose h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply inclusion_transpose_inclusion; tauto. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply inclusion_transpose_inclusion; tauto. Qed. (** transposition is involutive *) Lemma transpose_invol : forall h : hedge, equal h (transpose (transpose h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** (transpose S(h))=S(transpose h) *) Lemma synthesis_transpose_transpose_synthesis : forall h : hedge, equal (synthesis (transpose h)) (transpose (synthesis h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H as [M N H| M N K L H1 HrecH1 H0 HrecH0| M1 N1 M2 N2 H1 HrecH1 H0 HrecH0| o M N H HrecH]. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: le_h g h *) apply SynEnc; trivial. (* Goal: le_h g h *) apply SynPair; trivial. (* Goal: le_h g h *) apply SynOp; trivial. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. induction H as [M N H| M N K L H1 HrecH1 H0 HrecH0| M1 N1 M2 N2 H1 HrecH1 H0 HrecH0| o M N H HrecH]. (* Goal: le_h g h *) apply SynInc; trivial. (* Goal: le_h g h *) apply SynEnc; trivial. (* Goal: le_h g h *) apply SynPair; trivial. (* Goal: le_h g h *) apply SynOp; trivial. Qed. (** if g <= h then (transpose g) <= (transpose h) *) Lemma le_h_transpose_le_h : forall g h : hedge, le_h g h -> le_h (transpose g) (transpose h). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h (transpose g) (transpose h) *) apply incl_syn_impl_le_h. (* Goal: inclusion (transpose g) (synthesis (transpose h)) *) apply inclusion_trans with (transpose (synthesis h)). (* Goal: inclusion (transpose (analysis_def h)) (transpose (transpose (analysis_def (transpose h)))) *) (* Goal: inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) apply inclusion_transpose_inclusion. (* Goal: inclusion g (synthesis h) *) (* Goal: inclusion (transpose (synthesis h)) (synthesis (transpose h)) *) apply le_h_impl_incl_syn. (* Goal: le_h g h *) trivial. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Lemma irr_le_h_left_consistent_impl_left_consistent_weak : forall g h : hedge, is_irreducible g -> is_left_consistent h -> le_h g h -> weak_left_consistent g. (* Goal: forall h : hedge, iff (and (and (name_left_name h) (and (injective_left h) (and (op_synthesis_left h) (and (pair_free_left h) (and (enc_synthesis_left h) (enc_analysis_left h)))))) (injective_inv_left h)) (is_left_consistent h) *) unfold is_left_consistent in |- *. (* Goal: forall h : hedge, iff (and (weak_left_consistent h) (injective_inv_left h)) (is_left_consistent h) *) unfold weak_left_consistent in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H0; intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H3; intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H5; intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H7; intros. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H9; intros. (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (inj_left_syn h H4 H10 H6 H8). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: name_left_name g *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) unfold name_left_name in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) unfold inclusion in H15. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) generalize (H15 M N H13). (* Goal: forall _ : synthesis h M N, @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) rewrite H14. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) generalize (nam_left_syn h a N H16). (* Goal: forall _ : h (MNam a) N, @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) rewrite <- H14. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) unfold name_left_name in H2. (* Goal: @ex Nam (fun b : Nam => @eq Msg N (MNam b)) *) (* Goal: and (injective_left g) (and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)))) *) apply (H2 M N H17 a H14). (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall _ : injective_left (synthesis h), @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold injective_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (H16 M N H13). (* Goal: forall _ : synthesis h M N, @eq Msg N N' *) (* Goal: and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g))) *) generalize (H16 M' N' H14). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) unfold injective_left in H12. (* Goal: @eq Msg N N' *) (* Goal: and (op_synthesis_left g) (and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g))) *) apply (H12 M N H18 M' N' H17 H15). (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: op_synthesis_left g *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold op_synthesis_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) generalize (H15 M N H13). (* Goal: forall _ : synthesis h M N, @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) rewrite H14. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) inversion H16. (* Goal: not (synthesis g M' N') *) (* Goal: not (synthesis g M' N') *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold op_synthesis_left in H6. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) rewrite <- H14 in H17. (* Goal: not (synthesis g M' N') *) (* Goal: not (synthesis g M' N') *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (H6 o M N H17 M' H14). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: not (synthesis g M' N') *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) apply (H20 N'). (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in H1; auto. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: False *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (H1 M' N' H21). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: forall _ : not (synthesis (analysis_def g) K L0), or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) cut (N' = N0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) rewrite <- H23 in H18. (* Goal: synthesis g M' N0 *) rewrite H14 in H13. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) rewrite <- H18 in H13. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (irreducible_op g). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) elim (H24 o o M' N'). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) unfold is_irreducible in H. (* Goal: synthesis g M' N0 *) unfold equal in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (H25 (H27 (Mop o M') (Mop o N') H13)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) elim H29. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case H31; try tauto. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) apply H32. (* Goal: synthesis (irreducible g) M' N0 *) generalize (h_le_h_ana_h g). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) generalize (inj_left_syn h H4 H10 H6 H8). (* Goal: forall _ : injective_left (synthesis h), @eq Msg N' N0 *) (* Goal: and (pair_free_left g) (and (enc_synthesis_left g) (enc_analysis_left g)) *) unfold injective_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) apply (H23 M' N' H22 M' N0 H20); trivial. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: pair_free_left g *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) unfold pair_free_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) generalize (H14 (MPair M1 M2) N H13). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) inversion H15. (* Goal: False *) (* Goal: False *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) unfold pair_free_left in H8. (* Goal: le_h g h *) apply (H8 M1 M2 N); trivial. (* Goal: False *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) rewrite <- H19 in H13. (* Goal: False *) (* Goal: and (enc_synthesis_left g) (enc_analysis_left g) *) generalize (irreducible_pair g M1 N1 M2 N2). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) apply H21. (* Goal: synthesis g M' N0 *) unfold is_irreducible in H. (* Goal: synthesis g M' N0 *) unfold equal in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: enc_synthesis_left g *) (* Goal: enc_analysis_left g *) unfold enc_synthesis_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) generalize (H15 M N H13). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) rewrite H14 in H16. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) inversion H16. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) rewrite <- H14 in H17. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) unfold enc_synthesis_left in H10. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) generalize (H10 M N H17 M' K H14). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) case (H20 N' L). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) apply H21. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) apply H21. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in H1; auto. (* Goal: synthesis g M' N0 *) rewrite H14 in H13. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) rewrite <- H20 in H13. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) elim (irreducible_enc g M' N0 K L0). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) unfold is_irreducible in H. (* Goal: synthesis g M' N0 *) unfold equal in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) elim (H22 (H24 (MEnc M' K) (MEnc N0 L0) H13)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) case H27. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: forall _ : not (synthesis (analysis_def g) K L0), or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) cut (N' = N0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: enc_analysis_left g *) apply H28. (* Goal: synthesis (analysis_def g) K L0 *) (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) rewrite <- H30. (* Goal: synthesis (irreducible g) M' N0 *) generalize (h_le_h_ana_h g). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: @eq Msg N' N0 *) (* Goal: forall _ : not (synthesis (analysis_def g) K L0), or (not (synthesis g M' N')) (not (synthesis g K L)) *) (* Goal: enc_analysis_left g *) generalize (H1 M' N' H29). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) unfold injective_left in H12. (* Goal: le_h g h *) apply (H12 M' N' H30 M' N0 H19); trivial. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: enc_analysis_left g *) apply H28. (* Goal: synthesis g (inv K) (inv L0) *) cut (L = L0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (analysis_def g) K L0 *) (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) rewrite <- H30. (* Goal: synthesis (irreducible g) M' N0 *) generalize (h_le_h_ana_h g). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) generalize (H1 K L H29). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) (* Goal: enc_analysis_left g *) unfold injective_left in H12. (* Goal: le_h g h *) apply (H12 K L H30 K L0 H21); trivial. (* Goal: enc_analysis_left g *) unfold enc_analysis_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (le_h_impl_incl_syn g h H1). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) generalize (H16 M N H13). (* Goal: forall _ : synthesis h M N, @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) rewrite H14. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) inversion H17. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) generalize (H1 (inv K) (inv L) H15). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N' (inv N) *) elim H11. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) unfold enc_analysis_left in H22. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) rewrite <- H14 in H18. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim (H22 M N H18 M' K H14 L H21). (* Goal: forall (x : Msg) (_ : and (@eq Msg N (MEnc x L)) (synthesis h M' x)), @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) intro N'. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg N (MEnc N' L)) (synthesis g M' N')) *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) exists N'. (* Goal: and (@eq Msg N (MEnc N' L)) (synthesis g M' N') *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim H24. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) split; trivial. (* Goal: synthesis g M' N0 *) rewrite H14 in H13. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) rewrite H25 in H13. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim (irreducible_enc g M' N' K L). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) unfold is_irreducible in H. (* Goal: synthesis g M' N0 *) unfold equal in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim (H27 (H29 (MEnc M' K) (MEnc N' L) H13)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible g) M' N0 *) generalize (ana_h_equiv_irr_h g). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim H33. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) unfold le_h in H34. (* Goal: synthesis g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) unfold inclusion in H34. (* Goal: synthesis g M' N0 *) fold (inclusion (irreducible g) g) in H30. (* Goal: synthesis g M' N0 *) generalize (inclusion_impl_le_h (irreducible g) g H30). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (irreducible g) M' N0 *) apply H36. (* Goal: synthesis (irreducible g) M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) apply H34. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: analysis_def g M' N0 *) generalize (analysis_is_analysis g). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) elim H37. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N0 *) elim H38. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) apply H41. (* Goal: analysis (analysis_def g) M' N' *) (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) apply (AnaDec (analysis_def g) M' N' K L). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: synthesis (irreducible g) M' N0 *) generalize (h_le_h_ana_h g). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) unfold inclusion in |- *; auto. (* Goal: @ex Msg (fun N' : Msg => and (@eq Msg (MEnc N0 L0) (MEnc N' L)) (synthesis g M' N')) *) exists N0. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: synthesis g (inv K) (inv L0) *) cut (L = L0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: le_h g h *) rewrite H23; trivial. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) generalize (H1 (inv K) (inv L) H15). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H11; intros. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) generalize (inj_inv_left_syn h H4 H10 H6 H8 H25). (* Goal: forall _ : injective_inv_left (synthesis h), @eq Msg N' (inv N) *) unfold injective_inv_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) generalize (H26 K L0 H22 (inv K) (inv L) H23). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) cut (inv K = inv K); trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) generalize (H27 H28). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) (* Goal: synthesis g M' N0 *) cut (inv (inv L) = inv (inv L0)). (* Goal: forall _ : @eq Msg L (inv (inv L0)), @eq Msg L L0 *) (* Goal: @eq Msg (inv (inv L)) (inv (inv L0)) *) (* Goal: synthesis g M' N0 *) rewrite inv_invol. (* Goal: forall _ : @eq Msg L (inv (inv L0)), @eq Msg L L0 *) (* Goal: @eq Msg (inv (inv L)) (inv (inv L0)) *) (* Goal: synthesis g M' N0 *) rewrite inv_invol. (* Goal: le_h g h *) trivial. (* Goal: le_h g h *) rewrite H29; trivial. (* Goal: synthesis g M' N0 *) generalize H. (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis g M' N0 *) elim H23. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) rewrite H14 in H13. (* Goal: synthesis g M' N0 *) rewrite <- H21 in H13. (* Goal: synthesis g M' N0 *) generalize (irreducible_enc g). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) elim (H26 M' N0 K L0). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) unfold is_irreducible in H. (* Goal: synthesis g M' N0 *) unfold equal in H. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) elim (H27 (H29 (MEnc M' K) (MEnc N0 L0) H13)). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) fold (inclusion (irreducible g) g) in H30. (* Goal: synthesis g M' N0 *) generalize (inclusion_impl_le_h (irreducible g) g H30). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis g M' N0 *) apply H33. (* Goal: synthesis (irreducible g) M' N0 *) generalize (h_le_h_ana_h g). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible g) M' N0 *) generalize (ana_h_equiv_irr_h g). (* Goal: forall _ : equiv_h (analysis_def g) (irreducible g), synthesis (irreducible g) M' N0 *) unfold equiv_h in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (irreducible g) M' N0 *) elim H35. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible g) M' N0 *) apply H36. (* Goal: synthesis (analysis_def g) M' N0 *) apply SynInc. (* Goal: analysis_def g M' N0 *) generalize (analysis_is_analysis g). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N0 *) elim H38. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N0 *) elim H39. (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def g M' N0 *) apply H42. (* Goal: analysis (analysis_def g) M' N0 *) apply (AnaDec (analysis_def g) M' N0 K L0). (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: synthesis (analysis_def g) (inv K) (inv L0) *) apply H37. (* Goal: synthesis (irreducible g) (inv K) (inv L0) *) fold (inclusion g (irreducible g)) in H29. (* Goal: synthesis (irreducible g) (inv K) (inv L0) *) generalize (inclusion_impl_le_h g (irreducible g) H29). (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (irreducible g) (inv K) (inv L0) *) apply H43. (* Goal: synthesis g (inv K) (inv L0) *) cut (L = L0). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis g (inv K) (inv L0) *) (* Goal: @eq Msg L L0 *) rewrite <- H44. (* Goal: le_h g h *) trivial. (* Goal: match N with | MNam n => True | MEnc M' K => match M with | MNam n => True | MEnc N' L => or (not (synthesis h M' N')) (not (synthesis h K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match M with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis h M1 N1)) (not (synthesis h M2 N2)) | Mop o m => True end | Mop opM M' => match M with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis h M' N')) end end *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) generalize H1. (* Goal: forall _ : le_h g h, @eq Msg L L0 *) unfold le_h in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg L L0 *) generalize (H44 (inv K) (inv L) H15). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N' (inv N) *) elim H11. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg L L0 *) generalize (inj_inv_left_syn h H4 H10 H6 H8 H47). (* Goal: forall _ : injective_inv_left (synthesis h), @eq Msg N' (inv N) *) unfold injective_inv_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg L L0 *) generalize (H48 K L0 H22 (inv K) (inv L) H45). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: le_h g h *) cut (inv K = inv K); trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) generalize (H49 H50). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg L L0 *) rewrite <- inv_invol. (* Goal: @eq Msg L (inv (inv L0)) *) rewrite <- H51. symmetry in |- *. (* Goal: @eq Msg (inv (inv L)) L *) apply inv_invol. Qed. Lemma weak_left_consistent_inj_inv_left_iff_left_consistent : forall h : hedge, weak_left_consistent h /\ injective_inv_left h <-> is_left_consistent h. (* Goal: forall h : hedge, iff (and (weak_left_consistent h) (injective_inv_left h)) (is_left_consistent h) *) unfold weak_left_consistent in |- *. (* Goal: forall h : hedge, iff (and (and (name_left_name h) (and (injective_left h) (and (op_synthesis_left h) (and (pair_free_left h) (and (enc_synthesis_left h) (enc_analysis_left h)))))) (injective_inv_left h)) (is_left_consistent h) *) unfold is_left_consistent in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** if g <= h, g is irreducible and h is left consistent then g is left consistent *) Theorem irr_le_h_left_consistent_impl_left_consistent : forall g h : hedge, is_irreducible g -> is_left_consistent h -> le_h g h -> is_left_consistent g. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: is_left_consistent g *) generalize (irr_le_h_left_consistent_impl_left_consistent_weak g h H H0 H1). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: is_left_consistent g *) elim (weak_left_consistent_inj_inv_left_iff_left_consistent g). (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: le_h g h *) split; trivial. (* Goal: forall _ : injective_inv_left (synthesis h), @eq Msg N' (inv N) *) unfold injective_inv_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) unfold is_left_consistent in H0. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) elim H9. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) elim H11. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) elim H13. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) elim H15. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) unfold le_h in H1. (* Goal: @eq Msg N' (inv N) *) unfold inclusion in H1. (* Goal: @eq Msg N' (inv N) *) generalize (H1 M N (SynInc g M N H5)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N' (inv N) *) generalize (H1 M' N' (SynInc g M' N' H6)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: @eq Msg N' (inv N) *) elim H17. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) generalize (inj_inv_left_syn h H10 H16 H12 H14 H21). (* Goal: forall _ : injective_inv_left (synthesis h), @eq Msg N' (inv N) *) unfold injective_inv_left in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: @eq Msg N' (inv N) *) apply (H22 M N H18 M' N' H19 H7). Qed. (** some lemma about transposition and operation on hedges *) Lemma reduce_transpose_transpose_reduce : forall h : hedge, equal (reduce (transpose h)) (transpose (reduce h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: le_h g h *) trivial. (* Goal: match N with | MNam n => True | MEnc M' K => match M with | MNam n => True | MEnc N' L => or (not (synthesis h M' N')) (not (synthesis h K L)) | MPair m m0 => True | Mop o m => True end | MPair M1 M2 => match M with | MNam n => True | MEnc m m0 => True | MPair N1 N2 => or (not (synthesis h M1 N1)) (not (synthesis h M2 N2)) | Mop o m => True end | Mop opM M' => match M with | MNam n => True | MEnc m m0 => True | MPair m m0 => True | Mop opN N' => or (not (@eq op opM opN)) (not (synthesis h M' N')) end end *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) generalize H1. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case M; try tauto; case N; try tauto. (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) fold (transpose h) in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) case H2. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: not (synthesis h m m1) *) (* Goal: forall _ : not (synthesis (transpose h) m2 m0), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (m m0 m1 m2 : Msg) (_ : or (not (synthesis (fun M N : Msg => h N M) m1 m)) (not (synthesis (fun M N : Msg => h N M) m2 m0))), or (not (synthesis h m m1)) (not (synthesis h m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis (fun M N : Msg => h N M) m0 m))), or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) red in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H7. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: le_h g h *) trivial. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold equal in |- *; unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H7. (* Goal: le_h g h *) unfold transpose in |- *; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) case H2. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold equal in |- *; unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H5; intros. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H7. (* Goal: le_h g h *) unfold transpose in |- *; trivial. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold equal in |- *; unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) elim H5; intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H7. (* Goal: le_h g h *) unfold transpose in |- *; trivial. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis h m m0)) *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) case H2. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: le_h g h *) rewrite H4; trivial. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: False *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H3. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold equal in |- *; unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) elim H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) m0 m *) (* Goal: inclusion (transpose (reduce h)) (reduce (transpose h)) *) apply H7. (* Goal: le_h g h *) unfold transpose in |- *; trivial. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall _ : reduce h N M, reduce (fun M N : Msg => h N M) M N *) unfold reduce in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) split; try tauto. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: transpose h M N *) elim H1. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: synthesis h (inv L) (inv K) *) (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) unfold transpose in H2. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) case N; try tauto; case M; try tauto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) case H4. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: analysis_def (fun M N : Msg => h N M) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply H5. (* Goal: le_h g h *) apply H2; trivial. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: analysis_def (fun M N : Msg => h N M) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply H5. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) case H4. (* Goal: forall _ : not (synthesis h m1 m), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall _ : not (synthesis h m2 m0), or (not (synthesis (fun M N : Msg => h N M) m m1)) (not (synthesis (fun M N : Msg => h N M) m0 m2)) *) (* Goal: forall (o : op) (m : Msg) (o0 : op) (m0 : Msg) (_ : or (not (@eq op o0 o)) (not (synthesis h m0 m))), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) left. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) apply H5; auto. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: analysis_def (fun M N : Msg => h N M) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply H5. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) case H4. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) left; auto. (* Goal: forall _ : not (synthesis h m0 m), or (not (@eq op o o0)) (not (synthesis (fun M N : Msg => h N M) m m0)) *) right. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) red in |- *; intro. (* Goal: analysis_def (fun M N : Msg => h N M) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply H5. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. Qed. Lemma analysis_transpose_transpose_analysis : forall h : hedge, equal (analysis (transpose h)) (transpose (analysis h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. induction H as [M N H| M1 M2 N1 N2 H HrecH| M1 M2 N1 N2 H HrecH| M N K L H HrecH H0]. (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: analysis h N1 M1 *) (* Goal: analysis h N2 M2 *) (* Goal: analysis h N M *) (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) apply (AnaSplitL h N1 N2 M1 M2). (* Goal: le_h g h *) trivial. (* Goal: analysis h N2 M2 *) (* Goal: analysis h N M *) (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) apply (AnaSplitR h N1 N2 M1 M2). (* Goal: le_h g h *) trivial. (* Goal: analysis h N M *) (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) apply (AnaDec h N M L K). (* Goal: le_h g h *) trivial. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) elim H1. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis h (inv L) (inv K) *) (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) unfold transpose in H2. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: forall (M N : Msg) (_ : analysis h N M), analysis (fun M0 N0 : Msg => h N0 M0) M N *) intros M N. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. induction H as [M N H| M1 M2 N1 N2 H HrecH| M1 M2 N1 N2 H HrecH| M N K L H HrecH H0]. (* Goal: le_h g h *) apply AnaInc; trivial. (* Goal: le_h g h *) apply (AnaSplitL (fun M N : Msg => h N M) N1 N2 M1 M2); trivial. (* Goal: le_h g h *) apply (AnaSplitR (fun M N : Msg => h N M) N1 N2 M1 M2); trivial. (* Goal: le_h g h *) apply (AnaDec (fun M N : Msg => h N M) N M L K); trivial. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) generalize (synthesis_transpose_transpose_synthesis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: transpose h M N *) elim H1. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: synthesis (fun M N : Msg => h N M) (inv L) (inv K) *) unfold transpose in H3. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. Qed. Lemma stable_impl_transpose_stable : forall h : hedge, stable_analysis h -> stable_analysis (transpose h). (* Goal: forall (h : hedge) (_ : stable_analysis h), stable_analysis (transpose h) *) unfold stable_analysis in |- *. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) generalize (analysis_transpose_transpose_analysis h). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: transpose h M N *) elim H1. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: transpose h M N *) generalize (H2 M N H0). (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. Qed. Lemma ana_transpose_incl_transpose_ana : forall h : hedge, inclusion (analysis_def (transpose h)) (transpose (analysis_def h)). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) generalize (analysis_is_analysis (transpose h)). (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) elim H0. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) apply H2. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) elim H4. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (_ : forall (M N : Msg) (_ : h M N), analysis_def h M N) (_ : stable_analysis (analysis_def h)), analysis_def h N M *) (* Goal: stable_analysis (transpose (analysis_def h)) *) auto. (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply stable_impl_transpose_stable. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Lemma transpose_ana_transpose_incl_ana : forall h : hedge, inclusion (transpose (analysis_def (transpose h))) (analysis_def h). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (transpose (analysis_def (transpose h))) (analysis_def h) *) apply inclusion_trans with (transpose (transpose (analysis_def h))). (* Goal: inclusion (transpose (analysis_def h)) (transpose (transpose (analysis_def (transpose h)))) *) (* Goal: inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) apply inclusion_transpose_inclusion. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) (* Goal: inclusion (transpose (analysis_def h)) (analysis_def (transpose h)) *) apply ana_transpose_incl_transpose_ana. (* Goal: inclusion (transpose (transpose (analysis_def h))) (analysis_def h) *) generalize (transpose_invol (analysis_def h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. Lemma ana_incl_transpose_ana_transpose : forall h : hedge, inclusion (analysis_def h) (transpose (analysis_def (transpose h))). (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) generalize (analysis_is_analysis h). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) elim H. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) apply H1. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) generalize (analysis_is_analysis (transpose h)). (* Goal: forall _ : is_analysis (transpose h) (analysis_def (transpose h)), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold is_analysis in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H2. (* Goal: forall (_ : analysis_cond (transpose h) (analysis_def (transpose h))) (_ : forall (h' : hedge) (_ : analysis_cond (transpose h) h'), inclusion (analysis_def (transpose h)) h'), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold analysis_cond in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) elim H3. (* Goal: forall (_ : inclusion (transpose h) (analysis_def (transpose h))) (_ : stable_analysis (analysis_def (transpose h))), and (inclusion h (transpose (analysis_def (transpose h)))) (stable_analysis (transpose (analysis_def (transpose h)))) *) unfold inclusion in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: forall (M N : Msg) (_ : h M N), transpose (analysis_def (transpose h)) M N *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in |- *. (* Goal: forall (M N : Msg) (_ : h M N), analysis_def (fun M0 N0 : Msg => h N0 M0) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) unfold transpose in H5. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: analysis_def (fun M N : Msg => h N M) N M *) (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply H5. (* Goal: le_h g h *) trivial. (* Goal: stable_analysis (transpose (analysis_def (transpose h))) *) apply stable_impl_transpose_stable. (* Goal: le_h g h *) trivial. Qed. (** A(transpose h)=transpose A(h) *) Lemma ana_transpose_transpose_ana : forall h : hedge, equal (analysis_def (transpose h)) (transpose (analysis_def h)). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: inclusion (analysis_def (transpose h)) (transpose (analysis_def h)) *) (* Goal: inclusion (transpose (analysis_def h)) (analysis_def (transpose h)) *) apply ana_transpose_incl_transpose_ana. apply inclusion_trans with (transpose (transpose (analysis_def (transpose h)))). (* Goal: inclusion (transpose (analysis_def h)) (transpose (transpose (analysis_def (transpose h)))) *) (* Goal: inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) apply inclusion_transpose_inclusion. (* Goal: inclusion (analysis_def h) (transpose (analysis_def (transpose h))) *) (* Goal: inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) apply ana_incl_transpose_ana_transpose. (* Goal: inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) generalize (transpose_invol (analysis_def (transpose h))). (* Goal: forall _ : equal (analysis_def (transpose h)) (transpose (transpose (analysis_def (transpose h)))), inclusion (transpose (transpose (analysis_def (transpose h)))) (analysis_def (transpose h)) *) unfold equal in |- *. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. Qed. (** I(transpose h)=transpose I(h) *) Lemma irr_transpose_transpose_irr : forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)). (* Goal: forall h : hedge, equal (irreducible (transpose h)) (transpose (irreducible h)) *) unfold irreducible in |- *. (* Goal: forall h : hedge, equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) intro. (* Goal: equal (reduce (analysis_def (transpose h))) (transpose (reduce (analysis_def h))) *) apply equal_trans with (reduce (transpose (analysis_def h))). (* Goal: equal (reduce (analysis_def (transpose h))) (reduce (transpose (analysis_def h))) *) (* Goal: equal (reduce (transpose (analysis_def h))) (transpose (reduce (analysis_def h))) *) apply equal_reduce_equal. (* Goal: equal (analysis_def (transpose h)) (transpose (analysis_def h)) *) (* Goal: equal (reduce (transpose (analysis_def h))) (transpose (reduce (analysis_def h))) *) apply ana_transpose_transpose_ana. (* Goal: equal (reduce (transpose (analysis_def h))) (transpose (reduce (analysis_def h))) *) apply reduce_transpose_transpose_reduce. Qed. (** if h is irreducible then (transpose h) is irreducible *) Lemma is_irreducible_transpose_is_irreducible : forall h : hedge, is_irreducible h -> is_irreducible (transpose h). (* Goal: forall (h : hedge) (_ : is_irreducible h), is_irreducible (transpose h) *) unfold is_irreducible in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: equal (transpose h) (irreducible (transpose h)) *) apply equal_trans with (transpose (irreducible h)). (* Goal: equal (transpose h) (transpose (irreducible h)) *) (* Goal: equal (transpose (irreducible h)) (irreducible (transpose h)) *) apply equal_transpose_equal. (* Goal: le_h g h *) trivial. (* Goal: equal (transpose (irreducible h)) (irreducible (transpose h)) *) apply equal_sym. (* Goal: equal (irreducible (transpose h)) (transpose (irreducible h)) *) apply irr_transpose_transpose_irr. Qed. (** if g <= h, g is irreducible and h is consistent then g is consistent *) Theorem irr_le_h_consistent_impl_consistent : forall g h : hedge, is_irreducible g -> is_consistent h -> le_h g h -> is_consistent g. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : is_consistent h) (_ : le_h g h), is_consistent g *) unfold is_consistent in |- *. (* Goal: forall (g h : hedge) (_ : is_irreducible g) (_ : and (is_left_consistent h) (is_left_consistent (transpose h))) (_ : le_h g h), and (is_left_consistent g) (is_left_consistent (transpose g)) *) intros. (* Goal: and (is_left_consistent g) (is_left_consistent (transpose g)) *) split. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) apply irr_le_h_left_consistent_impl_left_consistent with h; tauto. (* Goal: is_left_consistent (transpose g) *) apply irr_le_h_left_consistent_impl_left_consistent with (transpose h). (* Goal: le_h g h *) apply is_irreducible_transpose_is_irreducible; trivial. (* Goal: is_left_consistent (transpose h) *) (* Goal: le_h (transpose g) (transpose h) *) tauto. (* Goal: le_h (transpose g) (transpose h) *) apply le_h_transpose_le_h. (* Goal: le_h g h *) trivial. Qed.
Require Export c_completeness. Set Implicit Arguments. Module Type hilbert_mod (B: base_mod) (S: sound_mod B) (C: complete_mod B S). Import B S C. (** * Hilbert style calculus*) Reserved Notation "Γ ⊢H A" (at level 80). Inductive AxiomH : PropF -> Prop := | HOrI1 : forall A B , AxiomH (A → A∨B) | HOrI2 : forall A B , AxiomH (B → A∨B) | HAndI : forall A B , AxiomH (A → B → A∧B) | HOrE : forall A B C, AxiomH (A∨B → (A → C) → (B → C) → C) | HAndE1 : forall A B , AxiomH (A∧B → A) | HAndE2 : forall A B , AxiomH (A∧B → B) | HS : forall A B C, AxiomH ((A → B → C) → (A → B) → A → C) | HK : forall A B , AxiomH (A → B → A) | HClas : forall A , AxiomH (¬(¬A) → A) . Inductive Hc : list PropF-> PropF->Prop := | Hass : forall A Γ, In A Γ -> Γ ⊢H A | Hax : forall A Γ, AxiomH A -> Γ ⊢H A | HImpE : forall Γ A B, Γ ⊢H A → B -> Γ ⊢H A -> Γ ⊢H B where "Γ ⊢H A" := (Hc Γ A) : My_scope. Definition ProvH A := [] ⊢H A. Ltac Hmp := eapply HImpE. (*Modus ponens (for H)*) Ltac aK := constructor 2;apply HK. Ltac aS := constructor 2;apply HS. Ltac aC := constructor 2;apply HClas. Ltac is_ax := constructor 2;constructor||assumption. (** * Theorems Hc to Nc *) Lemma Nc_AxiomH : forall A, AxiomH A -> Provable A. (* Goal: None *) induction 1;repeat apply ImpI. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply OrI2;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply AndI;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply OrE;[|eapply ImpE with A|mp]; is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply AndE1;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply AndE2;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) mp;mp;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) apply BotC;apply ImpE with ¬A;is_ass. Qed. Theorem Hc_to_Nc : forall Γ A, Γ ⊢H A -> Γ ⊢ A. (* Goal: None *) induction 1. (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) AddnilL;eapply weakening;apply Nc_AxiomH;assumption. (* Goal: None *) mp;eassumption. Qed. (** Nc to Hc *) Lemma H_weakening : forall Γ Δ A, (forall B, In B Γ -> In B Δ) -> Γ ⊢H A -> Δ ⊢H A. (* Goal: None *) induction 2. (* Goal: Hc Δ A *) (* Goal: Hc Δ A *) (* Goal: Hc Δ B *) constructor;auto. (* Goal: Hc Δ A *) (* Goal: Hc Δ B *) is_ax. (* Goal: Hc Δ B *) Hmp;auto. Qed. Theorem H_Deduction_Theorem : forall Γ A B, A::Γ ⊢H B <-> Γ ⊢H A → B. split;intro. remember (A::Γ). revert Γ Heql. induction H;intros;subst. destruct H. subst. do 2 (Hmp;[|aK]). instantiate (2:=⊥). aS. Hmp;[aK|is_ass]. Hmp;[aK|is_ax]. Hmp;[Hmp;[aS|]|];auto. Hmp;[|is_ass]. eapply H_weakening;[|eassumption]. intros;in_solve. Qed. Ltac HImpI := apply H_Deduction_Theorem. Theorem Nc_to_Hc : forall Γ A, Γ ⊢ A -> Γ ⊢H A. induction 1;try (Hmp;[|eassumption];is_ax;fail). (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. HImpI;assumption. (* Goal: None *) Hmp;eassumption. Hmp;[aC|HImpI;assumption]. Hmp;[Hmp;[is_ax|]|];assumption. Hmp;[Hmp;[Hmp|]|]. (* Goal: Hc Δ A *) (* Goal: Hc Δ B *) is_ax. eassumption. HImpI;assumption. HImpI;assumption. Qed. Theorem Nc_equiv_Hc : forall Γ A, Γ ⊢ A <-> Γ ⊢H A. (* Goal: None *) split;[apply Nc_to_Hc|apply Hc_to_Nc]. Qed. End hilbert_mod.
Require Export e_sequent_calculus. Require Import Plus Le Lt. Set Implicit Arguments. Module Type cut_mod (B: base_mod) (S: sound_mod B) (C: complete_mod B S) (G: sequent_mod B S C). Import B S C G. (** * Cut Elimination We first give some definitions*) Reserved Notation "Γ ⊃c A" (at level 80). Inductive Gcf : list PropF->list PropF->Prop := | Gcax : forall v Γ Δ , In #v Γ -> In #v Δ -> Γ ⊃c Δ | GcBot : forall Γ Δ , In ⊥ Γ -> Γ ⊃c Δ | cAndL : forall A B Γ1 Γ2 Δ, Γ1++A::B::Γ2 ⊃c Δ -> Γ1++A∧B::Γ2 ⊃c Δ | cAndR : forall A B Γ Δ1 Δ2, Γ ⊃c Δ1++A::Δ2 -> Γ ⊃c Δ1++B::Δ2 -> Γ ⊃c Δ1++A∧B::Δ2 | cOrL : forall A B Γ1 Γ2 Δ, Γ1++A::Γ2 ⊃c Δ -> Γ1++B::Γ2 ⊃c Δ -> Γ1++A∨B::Γ2 ⊃c Δ | cOrR : forall A B Γ Δ1 Δ2, Γ ⊃c Δ1++A::B::Δ2 -> Γ ⊃c Δ1++A∨B::Δ2 | cImpL : forall A B Γ1 Γ2 Δ, Γ1++B::Γ2 ⊃c Δ -> Γ1++Γ2 ⊃c A::Δ -> Γ1++A→B::Γ2 ⊃c Δ | cImpR : forall A B Γ Δ1 Δ2, A::Γ ⊃c Δ1++B::Δ2 -> Γ ⊃c Δ1++A→B::Δ2 where "Γ ⊃c Δ" := (Gcf Γ Δ) : My_scope. Notation "Γ =⊃ Δ" := (forall v,Satisfies v Γ->Validates v Δ) (at level 80). Inductive Atomic : Set := | AVar : PropVars -> Atomic | ABot : Atomic . Fixpoint AtomicF (P:Atomic) : PropF := match P with | AVar P => #P | ABot => ⊥ end. Fixpoint size A : nat := match A with | # P => 0 | ⊥ => 0 | B ∨ C => S (size B + size C) | B ∧ C => S (size B + size C) | B → C => S (size B + size C) end. Definition sizel := map_fold_right size plus 0. Definition sizes Γ Δ:= sizel Γ + sizel Δ. (** * Theorems reverse implication*) Theorem G_to_Gcf : forall Γ Δ, Γ ⊃c Δ -> Γ ⊃ Δ. (* Goal: None *) induction 1;[econstructor|constructor|constr..];eassumption. Qed. (** Soundness of Gc *) Theorem G_sound : forall Γ Δ, Γ ⊃ Δ -> Γ =⊃ Δ. (* Goal: None *) intros. apply G_to_Nc in H. apply Soundness_general in H. (* Goal: None *) remember (H v H0). clear -i H0. (* Goal: None *) induction Δ. (* Goal: None *) (* Goal: Gcf Γ Δ *) contradiction. (* Goal: None *) simpl in i. case_eq (TrueQ v a);intro K;rewrite K in *;simpl in *. (* Goal: None *) (* Goal: None *) exists a;split;[in_solve|rewrite K;trivial]. (* Goal: None *) destruct (IHΔ i) as (?&?&?). exists x;split;[in_solve|assumption]. Qed. (** Preparation for the nonstructural induction *) Lemma Atomic_eqdec : forall x y : Atomic, {x = y} + {x <> y}. intros;destruct x;destruct y;try (right;discriminate);try (left;reflexivity); destruct (Varseq_dec p p0); (left;f_equal;assumption)||(right;intro HH;injection HH;contradiction). Qed. Lemma sizes_comm : forall Γ Δ, sizes Γ Δ = sizes Δ Γ. (* Goal: None *) intros;unfold sizes;apply plus_comm;reflexivity. Qed. Lemma sizes_comm_r : forall Γ1 Γ2 A Δ, sizes (Γ1 ++ Γ2) (A :: Δ) = sizes (Γ1 ++ A::Γ2) Δ. (* Goal: None *) intros;induction Γ1;unfold sizes;unfold sizel;simpl. (* Goal: None *) (* Goal: None *) rewrite plus_assoc;f_equal;apply plus_comm. (* Goal: None *) rewrite <- !plus_assoc;f_equal;apply IHΓ1. Qed. Lemma sizes_comm_l : forall Γ1 Γ2 A Δ, sizes (A :: Δ) (Γ1 ++ Γ2) = sizes Δ (Γ1 ++ A::Γ2). (* Goal: None *) intros;rewrite sizes_comm;rewrite sizes_comm_r;apply sizes_comm. Qed. Lemma le_plus_trans_r : forall n m p, n <= m -> n <= p + m. (* Goal: forall (n m p : nat) (_ : le n m), le n (Nat.add p m) *) intros;rewrite plus_comm;apply le_plus_trans;assumption. Qed. Lemma sizes_decr : (forall A B Γ1 Γ2 Δ, sizes (Γ1++A::B::Γ2) Δ < sizes (Γ1++A∧B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++A::Δ2) < sizes Γ (Δ1++A∧B::Δ2))/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++B::Δ2) < sizes Γ (Δ1++A∧B::Δ2))/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++A::Γ2) Δ < sizes (Γ1++A∨B::Γ2) Δ)/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++B::Γ2) Δ < sizes (Γ1++A∨B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes Γ (Δ1++A::B::Δ2) < sizes Γ (Δ1++A∨B::Δ2))/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++B::Γ2) Δ < sizes (Γ1++A→B::Γ2) Δ)/\ (forall A B Γ1 Γ2 Δ, sizes (Γ1++Γ2) (A::Δ) < sizes (Γ1++A→B::Γ2) Δ)/\ (forall A B Γ Δ1 Δ2, sizes (A::Γ)(Δ1++B::Δ2)< sizes Γ (Δ1++A→B::Δ2)). repeat split;intros;try (rewrite sizes_comm_l||rewrite sizes_comm_r); apply plus_lt_compat_l||apply plus_lt_compat_r;induction Γ1||induction Δ1; unfold sizel;simpl;try (apply plus_lt_compat_l;apply IHΓ1||apply IHΔ1); apply le_lt_n_Sm;rewrite <- plus_assoc;try constructor; try apply plus_le_compat_l;apply le_plus_trans_r;constructor. Qed. Lemma size_O_atomic : forall Γ, sizel Γ=0 -> exists l, Γ = map AtomicF l. (* Goal: None *) intros;induction Γ. (* Goal: None *) (* Goal: None *) exists [];reflexivity. destruct a;try (apply plus_is_O in H as (?&_);simpl in H;discriminate); unfold sizel in H;simpl in H; (* Goal: None *) destruct (IHΓ H);[exists (AVar p::x)|exists (ABot::x)];simpl;f_equal;assumption. Qed. Ltac temp4 := try contradiction;do 2 econstructor;repeat ((left;in_solve;fail)||right);in_solve. Lemma bool_false : forall b, b=false -> ~Is_true b. (* Goal: forall (b : bool) (_ : @eq bool b false), not (Is_true b) *) intros;subst;auto. Qed. Lemma size_S : forall n Γ Δ, sizes Γ Δ = S n -> exists A B, In (A→B) Γ \/ In (A→B) Δ \/ In (A∨B) Γ \/ In (A∨B) Δ \/ In (A∧B) Γ \/ In (A∧B) Δ. (* Goal: None *) intros. induction Γ;[unfold sizes in H;simpl in H;induction Δ;[discriminate|]|]; (destruct a;[| |temp4..]);unfold sizel in H;simpl in H; destruct (IHΔ H) as (?&?&[|[|[|[|[]]]]])||destruct (IHΓ H) as (?&?&[|[|[|[|[]]]]]);temp4. Qed. (** The nonstructural induction proof*) Ltac temp5 A B Hy := let C:= fresh "C" with K1 := fresh "K" with K2 := fresh "KK" in intros v L;case_eq (TrueQ v A);case_eq (TrueQ v B);intros K1 K2; try (exists A;split;[in_solve|rewrite K2;simpl;exact I];fail); try (exists B;split;[in_solve|rewrite K1;simpl;exact I];fail); try (exfalso;apply (bool_false K1);apply L;in_solve;fail); try (exfalso;apply (bool_false K2);apply L;in_solve;fail); (destruct (Hy v) as (C&?&?); [intros ? ?;in_solve;try (apply L;in_solve;fail); simpl;try rewrite K1;try rewrite K2;simpl;exact I| in_solve;try (exists C;split;[in_solve|assumption];fail); simpl in *;rewrite K1 in *;rewrite K2 in *;simpl in *;contradiction ]). Theorem Gcf_complete_induction : forall n Γ Δ, sizes Γ Δ <= n -> Γ =⊃ Δ -> Γ ⊃c Δ. (* Goal: None *) induction n;intros. (* Goal: Gcf Γ Δ *) (* Goal: Gcf Γ Δ *) inversion H. apply plus_is_O in H2 as (?&?). (* Goal: Gcf Γ Δ *) (* Goal: Gcf Γ Δ *) apply size_O_atomic in H1 as (?&?);apply size_O_atomic in H2 as (?&?);subst. (* Goal: None *) (* Goal: Gcf Γ Δ *) remember (fun P => if (in_dec Atomic_eqdec (AVar P) x) then true else false) as v. (* Goal: None *) (* Goal: Gcf Γ Δ *) destruct (in_dec Atomic_eqdec ABot x). (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) constructor 2;change ⊥ with (AtomicF ABot);eapply in_map;assumption. (* Goal: None *) (* Goal: Gcf Γ Δ *) destruct (H0 v) as (?&?&?). (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) intros ? ?. apply in_map_iff in H1 as (?&?&?);subst A;simpl;destruct x1. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) rewrite Heqv;simpl. destruct (in_dec Atomic_eqdec (AVar p) x);[exact I|contradiction]. (* Goal: None *) (* Goal: Gcf Γ Δ *) contradiction. (* Goal: None *) (* Goal: Gcf Γ Δ *) apply in_map_iff in H1 as (?&?&?);subst x1. destruct x2. (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) constructor 1 with p. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) change #p with (AtomicF (AVar p));apply in_map. (* Goal: @In Atomic (AVar p) x *) (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) simpl in H2;rewrite Heqv in H2. destruct (in_dec Atomic_eqdec (AVar p));[assumption|contradiction]. (* Goal: None *) (* Goal: None *) (* Goal: Gcf Γ Δ *) change #p with (AtomicF (AVar p)). apply in_map. assumption. (* Goal: None *) (* Goal: Gcf Γ Δ *) contradiction. inversion H;[clear H|apply IHn;assumption];destruct (size_S _ _ H2) as (A&B&[|[|[|[|[]]]]]); apply in_split in H as (?&?&?);subst;constr;apply IHn; try (apply le_S_n;rewrite <- H2;apply sizes_decr);temp5 A B H0. Qed. Theorem Gcf_complete : forall Γ Δ, Γ =⊃ Δ -> Γ ⊃c Δ. (* Goal: None *) intros;eapply Gcf_complete_induction;[constructor|assumption]. Qed. Theorem Cut_elimination : forall Γ Δ, Γ ⊃ Δ -> Γ ⊃c Δ. (* Goal: None *) intros. (* Goal: Gcf Γ Δ *) apply Gcf_complete. (* Goal: None *) apply G_sound. (* Goal: None *) assumption. Qed. Print Assumptions Cut_elimination. End cut_mod.
Require Export a_base Bool. Export ListNotations. Set Implicit Arguments. Module Type sound_mod (X: base_mod). Import X. (** * Definitions definition of Propositional Formulas*) Inductive PropF : Set := | Var : PropVars -> PropF | Bot : PropF | Conj : PropF -> PropF -> PropF | Disj : PropF -> PropF -> PropF | Impl : PropF -> PropF -> PropF . Notation "# P" := (Var P) (at level 1) : My_scope. Notation "A ∨ B" := (Disj A B) (at level 15, right associativity) : My_scope. Notation "A ∧ B" := (Conj A B) (at level 15, right associativity) : My_scope. Notation "A → B" := (Impl A B) (at level 16, right associativity) : My_scope. Notation "⊥" := Bot (at level 0) : My_scope. Definition Neg A := A → ⊥. Notation "¬ A" := (Neg A) (at level 5) : My_scope. Definition Top := ¬⊥. Notation "⊤" := Top (at level 0) : My_scope. Definition BiImpl A B := (A→B)∧(B→A). Notation "A ↔ B" := (BiImpl A B) (at level 17, right associativity) : My_scope. (** Validness *) (** Valuations are maps PropVars -> bool sending ⊥ to false*) Fixpoint TrueQ v A : bool := match A with | # P => v P | ⊥ => false | B ∨ C => (TrueQ v B) || (TrueQ v C) | B ∧ C => (TrueQ v B) && (TrueQ v C) | B → C => (negb (TrueQ v B)) || (TrueQ v C) end. Definition Satisfies v Γ := forall A, In A Γ -> Is_true (TrueQ v A). Definition Models Γ A := forall v,Satisfies v Γ->Is_true (TrueQ v A). Notation "Γ ⊨ A" := (Models Γ A) (at level 80). Definition Valid A := [] ⊨ A. (** Provability *) Reserved Notation "Γ ⊢ A" (at level 80). Inductive Nc : list PropF-> PropF->Prop := | Nax : forall Γ A , In A Γ -> Γ ⊢ A | ImpI : forall Γ A B, A::Γ ⊢ B -> Γ ⊢ A → B | ImpE : forall Γ A B, Γ ⊢ A → B -> Γ ⊢ A -> Γ ⊢ B | BotC : forall Γ A , ¬A::Γ ⊢ ⊥ -> Γ ⊢ A | AndI : forall Γ A B, Γ ⊢ A -> Γ ⊢ B -> Γ ⊢ A∧B | AndE1 : forall Γ A B, Γ ⊢ A∧B -> Γ ⊢ A | AndE2 : forall Γ A B, Γ ⊢ A∧B -> Γ ⊢ B | OrI1 : forall Γ A B, Γ ⊢ A -> Γ ⊢ A∨B | OrI2 : forall Γ A B, Γ ⊢ B -> Γ ⊢ A∨B | OrE : forall Γ A B C, Γ ⊢ A∨B -> A::Γ ⊢ C -> B::Γ ⊢ C -> Γ ⊢ C where "Γ ⊢ A" := (Nc Γ A) : My_scope. Definition Provable A := [] ⊢ A. (**The Theorems we are going to prove*) Definition Prop_Soundness := forall A,Provable A->Valid A. Definition Prop_Completeness := forall A,Valid A->Provable A. (** * Theorems *) Ltac mp := eapply ImpE. Ltac AddnilL := match goal with | |- _ ?Γ _ => change Γ with ([]++Γ) end. Ltac in_solve := intros;repeat (eassumption ||match goal with | H:In _ (_::_) |- _ => destruct H;[subst;try discriminate|] | H:In _ (_++_) |- _ => apply in_app_iff in H as [];subst | |- In _ (_++_) => apply in_app_iff;(left;in_solve;fail)||(right;in_solve;fail) end ||(once constructor;reflexivity) ||constructor 2). Ltac is_ass := once econstructor;in_solve. Ltac case_bool v A := let HA := fresh "H" in (case_eq (TrueQ v A);intro HA;try rewrite HA in *;simpl in *;try trivial;try contradiction). Local Ltac prove_satisfaction := intros ? K;destruct K;[subst;simpl; match goal with | [ H : TrueQ _ _ = _ |- _ ] => rewrite H end;exact I|auto]. Lemma PropFeq_dec : forall (x y : PropF), {x = y}+{x <> y}. induction x;destruct y;try (right;discriminate); try (destruct (IHx1 y1);[destruct (IHx2 y2);[left;f_equal;assumption|]|]; right;injection;intros;contradiction). (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) destruct (Varseq_dec p p0). (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) left;f_equal;assumption. (* Goal: sumbool (@eq PropF (Var p) (Var p0)) (not (@eq PropF (Var p) (Var p0))) *) (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) right;injection;intro;contradiction. (* Goal: sumbool (@eq PropF Bot Bot) (not (@eq PropF Bot Bot)) *) left;reflexivity. Qed. Lemma Excluded_Middle : forall Γ A, Γ ⊢ A∨¬A. (* Goal: forall (Γ : list PropF) (A : PropF), Nc Γ (Disj A (Neg A)) *) intros;apply BotC;mp;[is_ass|apply OrI2;apply ImpI;mp;[is_ass|apply OrI1;is_ass]]. Qed. Lemma weakening2 : forall Γ A, Γ ⊢ A -> forall Δ, (forall B, In B Γ -> In B Δ) -> Δ ⊢ A. induction 1;[constructor|constructor 2|econstructor 3|constructor 4|constructor 5|econstructor 6 |econstructor 7|constructor 8|constructor 9|econstructor 10];try eauto; [apply IHNc..|apply IHNc2|try apply IHNc3];intros;in_solve;eauto. Qed. Lemma weakening : forall Γ Δ A, Γ ⊢ A -> Γ++Δ ⊢ A. (* Goal: forall (Γ Δ : list PropF) (A : PropF) (_ : Nc Γ A), Nc (@app PropF Γ Δ) A *) intros;eapply weakening2;[eassumption|in_solve]. Qed. Lemma deduction : forall Γ A B, Γ ⊢ A → B -> A::Γ ⊢ B. (* Goal: forall (Γ : list PropF) (A B : PropF) (_ : Nc Γ (Impl A B)), Nc (@cons PropF A Γ) B *) intros;eapply ImpE with A;[eapply weakening2;[eassumption|in_solve]|is_ass]. Qed. Lemma prov_impl : forall A B, Provable (A → B)->forall Γ, Γ ⊢ A -> Γ ⊢ B. intros. mp. AddnilL;apply weakening. apply H. assumption. Qed. (* This tactic applies prov_impl in IH (apply prov_impl in IH doesn't work, because I want to keep the Γ quantified)*) Ltac prov_impl_in IH := let H := fresh "K" in try (remember (prov_impl IH) as H eqn:HeqH;clear IH HeqH). (** Soundness *) Theorem Soundness_general : forall A Γ, Γ ⊢ A -> Γ ⊨ A. intros A Γ H0 v;induction H0;simpl;intros;auto; try simpl in IHNc;try simpl in IHNc1;try simpl in IHNc2; case_bool v A;try (case_bool v B;fail); try (apply IHNc||apply IHNc2;prove_satisfaction); case_bool v B;apply IHNc3;prove_satisfaction. Qed. Theorem Soundness : Prop_Soundness. intros ? ? ? ?;eapply Soundness_general;eassumption. Qed. End sound_mod.
Require Export c_completeness. Set Implicit Arguments. Module Type sequent_mod (B: base_mod) (S: sound_mod B) (C: complete_mod B S). Import B S C. (** * Gentzen's Sequent Calculus *) Reserved Notation "Γ ⊃ A" (at level 80). Inductive G : list PropF->list PropF->Prop := | Gax : forall A Γ Δ , In A Γ -> In A Δ -> Γ ⊃ Δ | GBot : forall Γ Δ , In ⊥ Γ -> Γ ⊃ Δ | AndL : forall A B Γ1 Γ2 Δ, Γ1++A::B::Γ2 ⊃ Δ -> Γ1++A∧B::Γ2 ⊃ Δ | AndR : forall A B Γ Δ1 Δ2, Γ ⊃ Δ1++A::Δ2 -> Γ ⊃ Δ1++B::Δ2 -> Γ ⊃ Δ1++A∧B::Δ2 | OrL : forall A B Γ1 Γ2 Δ, Γ1++A::Γ2 ⊃ Δ -> Γ1++B::Γ2 ⊃ Δ -> Γ1++A∨B::Γ2 ⊃ Δ | OrR : forall A B Γ Δ1 Δ2, Γ ⊃ Δ1++A::B::Δ2 -> Γ ⊃ Δ1++A∨B::Δ2 | ImpL : forall A B Γ1 Γ2 Δ, Γ1++B::Γ2 ⊃ Δ -> Γ1++Γ2 ⊃ A::Δ -> Γ1++A→B::Γ2 ⊃ Δ | ImpR : forall A B Γ Δ1 Δ2, A::Γ ⊃ Δ1++B::Δ2 -> Γ ⊃ Δ1++A→B::Δ2 | Cut : forall A Γ Δ , Γ ⊃ A::Δ -> A::Γ ⊃ Δ -> Γ ⊃ Δ where "Γ ⊃ Δ" := (G Γ Δ) : My_scope. (** The disjunction of a list of formulas*) Definition BigOr := fold_right Disj ⊥. Notation "⋁ Δ" := (BigOr Δ) (at level 19). (** Γ ⊢⊢ Δ means that Γ ⊢ A for all A in Δ*) Definition Ncl Γ := map_fold_right (Nc Γ) and True. Notation "Γ ⊢⊢ Δ" := (Ncl Γ Δ) (at level 80). Notation "¬l Γ" := (map Neg Γ) (at level 40). (** * Theorems *) (** Gc to Nc*) Lemma NegAnd_impl_OrNeg : forall Γ A B, Γ ⊢ ¬(A∧B) -> Γ ⊢ ¬A∨¬B. (* Goal: None *) do 3 intro;apply prov_impl. apply ImpI;apply BotC;apply ImpE with (A ∧ B); [is_ass|apply AndI;apply BotC;(apply ImpE with (¬A ∨ ¬B);[is_ass|])]. (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. (* Goal: None *) apply OrI2;is_ass. Qed. Lemma Nc_list_weakening : forall Γ1 Γ2 Δ, (forall B, In B Γ1 -> In B Γ2) -> Γ1 ⊢⊢ Δ -> Γ2 ⊢⊢ Δ. (* Goal: None *) intros;induction Δ. (* Goal: None *) (* Goal: None *) trivial. (* Goal: None *) destruct H0;split. (* Goal: None *) (* Goal: None *) eapply weakening2;eassumption. (* Goal: None *) apply IHΔ;apply H1. Qed. Lemma Nc_list_impl : forall Γ A, Γ ⊢ A ->forall Δ, Δ ⊢⊢ Γ -> Δ ⊢ A. induction 1;intros;[induction Γ;destruct H;[subst;apply H0|apply IHΓ;[assumption|apply H0]] |constructor 2|econstructor 3|constructor 4|constructor 5|econstructor 6 |econstructor 7|constructor 8|constructor 9|econstructor 10];try eauto; [apply IHNc..|apply IHNc2|try apply IHNc3]; (split;[is_ass|eapply Nc_list_weakening;[|eassumption];in_solve]). Qed. Lemma Nc_list_contained : forall Γ Δ, (forall B, In B Δ -> In B Γ) -> Γ ⊢⊢ Δ. (* Goal: None *) intros;induction Δ. (* Goal: None *) (* Goal: None *) exact I. (* Goal: None *) split. (* Goal: None *) (* Goal: None *) constructor;apply H;in_solve. (* Goal: None *) apply IHΔ;intros;apply H;in_solve. Qed. Lemma Nc_list_app : forall Γ Δ1 Δ2, Γ ⊢⊢ Δ1 -> Γ ⊢⊢ Δ2 -> Γ ⊢⊢ Δ1++Δ2. (* Goal: None *) intros;induction Δ1. (* Goal: None *) (* Goal: None *) assumption. (* Goal: None *) destruct H;split. (* Goal: None *) (* Goal: None *) assumption. (* Goal: None *) apply IHΔ1;apply H1. Qed. Ltac Ncl_solve := repeat match goal with | |- _ ⊢ _ => idtac | |- _ ⊢⊢ _::_ => split;[eassumption||(try (is_ass;fail))|] | |- _ ⊢⊢ _++_ => apply Nc_list_app | |- map_fold_right (Nc ?Γ) and True _ => change (map_fold_right (Nc Γ) and True) with (Ncl Γ) | _ => eassumption||(apply Nc_list_contained;in_solve) end. Lemma G_to_Nc_Neg : forall Γ Δ, Γ ⊃ Δ -> Γ++¬l Δ ⊢ ⊥. (* Goal: None *) induction 1;try rewrite map_app in *;simpl in *. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) mp;[|is_ass]. constructor. apply in_app_iff;right. (* Goal: None *) (* Goal: None *) change (A → ⊥) with (¬A). apply in_map;assumption. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) eapply Nc_list_impl;[eassumption|]. Ncl_solve. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply AndE1;is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply AndE2;is_ass. eapply OrE;[apply NegAnd_impl_OrNeg;is_ass|eapply Nc_list_impl..]; (* Goal: None *) (* Goal: None *) [apply IHG1| |apply IHG2|];Ncl_solve. (* Goal: None *) (* Goal: None *) eapply OrE;[is_ass|eapply Nc_list_impl..];[apply IHG1| |apply IHG2|];Ncl_solve. (* Goal: None *) (* Goal: None *) eapply Nc_list_impl;[eassumption|]. Ncl_solve;(apply ImpI;mp;[is_ass|]). (* Goal: None *) (* Goal: None *) eapply OrI1;is_ass. (* Goal: None *) eapply OrI2;is_ass. eapply OrE;[apply Excluded_Middle|eapply Nc_list_impl..]; (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) [apply IHG1| |apply IHG2|Ncl_solve];Ncl_solve;mp;is_ass. (* Goal: None *) (* Goal: None *) eapply Nc_list_impl;[eassumption|]. Ncl_solve. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply BotC;mp;[|apply ImpI;apply BotC;apply ImpE with A];is_ass. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply ImpI;mp;[|apply ImpI];is_ass. eapply OrE;[apply Excluded_Middle|eapply Nc_list_impl..]; (* Goal: None *) (* Goal: None *) [apply IHG2| |apply IHG1|];Ncl_solve. Qed. Lemma ConjNeg_Disj : forall Δ Γ, Γ ++ ¬l Δ ⊢ ⊥ -> Γ ⊢ ⋁Δ. induction Δ;simpl;intros. (* Goal: None *) (* Goal: None *) rewrite app_nil_r in H;trivial. eapply OrE. apply Excluded_Middle. (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. apply OrI2;apply IHΔ;eapply Nc_list_impl;[eassumption|Ncl_solve]. Qed. Theorem G_to_Nc : forall Γ Δ, Γ ⊃ Δ -> Γ ⊢ ⋁Δ. (* Goal: None *) (* Goal: None *) intros;apply ConjNeg_Disj;apply G_to_Nc_Neg;assumption. Qed. (** Nc to Gc The hardest part is proving weakening for Gc*) Local Ltac temp1 := econstructor;split;reflexivity||(rewrite app_comm_cons;reflexivity). Lemma in_split_app : forall A (a:A) l2 l4 l1 l3, l1++a::l2=l3++l4 -> ((exists l,l3=l1++a::l/\l2=l++l4)\/ (exists l,l4=l++a::l2/\l1=l3++l)). induction l1;intros; (destruct l3;[destruct l4|];discriminate||(injection H;intros;subst)). (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@nil A) (@cons A a0 l))) (@eq (list A) l4 (@app A l (@cons A a0 l4))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a0 l4) (@app A l (@cons A a0 l4))) (@eq (list A) (@nil A) (@app A (@nil A) l)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a0 l3) (@app A (@nil A) (@cons A a0 l))) (@eq (list A) (@app A l3 l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a0 (@app A l3 l4)))) (@eq (list A) (@nil A) (@app A (@cons A a0 l3) l)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@nil A) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a1 (@app A l1 (@cons A a l2))))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a l2))) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@nil A) l)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *) right;exists [];split;reflexivity. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a x))) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) (@app A x l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x l4)))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 (@app A l1 (@cons A a x))) l)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *) left;temp1. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *) right;temp1. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) l2 (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 l3) l)))) *) destruct (IHl1 _ H0) as [(?&?&?)|(?&?&?)];subst. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 (@app A l1 (@cons A a x))) (@app A (@cons A a1 l1) (@cons A a l))) (@eq (list A) (@app A x l4) (@app A l l4)))) (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x l4)))) (@eq (list A) (@cons A a1 l1) (@app A (@cons A a1 (@app A l1 (@cons A a x))) l)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *) left;temp1. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@cons A a1 l3) (@app A (@cons A a1 (@app A l3 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@app A x (@cons A a l2)))))) (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@cons A a1 (@app A l3 x)) (@app A (@cons A a1 l3) l)))) *) right;temp1. Qed. Lemma in_in_split_app : forall A (a:A) b l2 l4 l1 l3, l1++a::l2=l3++b::l4 -> (exists l,l3=l1++a::l/\l2=l++b::l4)\/ (exists l,l4=l++a::l2/\l1=l3++b::l)\/ (a=b/\l1=l3/\l2=l4). (* Goal: forall (A : Type) (a b : A) (l2 l4 l1 l3 : list A) (_ : @eq (list A) (@app A l1 (@cons A a l2)) (@app A l3 (@cons A b l4))), or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A l1 (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) l1 (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) l1 l3) (@eq (list A) l2 l4)))) *) intros;apply in_split_app in H as [(?&?&?)|(?&?&?)];subst. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A l1 (@cons A a x)) (@app A l1 (@cons A a l))) (@eq (list A) (@app A x (@cons A b l4)) (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x (@cons A b l4))))) (@eq (list A) l1 (@app A (@app A l1 (@cons A a x)) (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) l1 (@app A l1 (@cons A a x))) (@eq (list A) (@app A x (@cons A b l4)) l4)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 x) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 x) (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) (@app A l3 x) l3) (@eq (list A) l2 l4)))) *) left;econstructor;split;reflexivity. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 x) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 x) (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) (@app A l3 x) l3) (@eq (list A) l2 l4)))) *) destruct x;injection H;intros;subst. (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 (@nil A)) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a l2))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l2 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 (@nil A)) (@app A l3 (@cons A a l))))) (and (@eq A a a) (and (@eq (list A) (@app A l3 (@nil A)) l3) (@eq (list A) l2 l2)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 (@cons A a0 x)) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A a0 (@app A x (@cons A a l2))))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A x (@cons A a l2)) (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 (@cons A a0 x)) (@app A l3 (@cons A a0 l))))) (and (@eq A a a0) (and (@eq (list A) (@app A l3 (@cons A a0 x)) l3) (@eq (list A) l2 (@app A x (@cons A a l2)))))) *) repeat (right||split||rewrite app_nil_r||reflexivity). (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) (@app A l1 (@cons A a x)) (@app A l1 (@cons A a l))) (@eq (list A) (@app A x (@cons A b l4)) (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a (@app A x (@cons A b l4))))) (@eq (list A) l1 (@app A (@app A l1 (@cons A a x)) (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) l1 (@app A l1 (@cons A a x))) (@eq (list A) (@app A x (@cons A b l4)) l4)))) *) (* Goal: or (@ex (list A) (fun l : list A => and (@eq (list A) l3 (@app A (@app A l3 x) (@cons A a l))) (@eq (list A) l2 (@app A l (@cons A b l4))))) (or (@ex (list A) (fun l : list A => and (@eq (list A) l4 (@app A l (@cons A a l2))) (@eq (list A) (@app A l3 x) (@app A l3 (@cons A b l))))) (and (@eq A a b) (and (@eq (list A) (@app A l3 x) l3) (@eq (list A) l2 l4)))) *) right;left;econstructor;split;reflexivity. Qed. Ltac rew1 := repeat rewrite <- app_assoc;repeat rewrite <- app_comm_cons. Ltac rew2 := repeat rewrite app_comm_cons;try rewrite app_assoc. Ltac constr := constructor 3||constructor 4||constructor 5||constructor 6||constructor 7||constructor 8. Local Ltac temp2 X Y Z := (rew1;constr;rew2;eapply X;rew1;reflexivity)|| (rew2;constr;rew1;eapply X;rew2;reflexivity)|| (rew1;constr;rew2;[eapply Y|eapply Z];rew1;reflexivity)|| (rew2;constr;rew1;[eapply Y|eapply Z];rew2;reflexivity). Local Ltac temp3 H IHG IHG1 IHG2 Heql A0 := induction H;intros;subst; try apply in_split_app in Heql as [(?&?&?)|(?&?&?)]; subst;try (temp2 IHG IHG1 IHG2;fail);[is_ass|constructor 2;in_solve| apply Cut with A0;[try rewrite app_comm_cons|rew2];auto..]. Lemma WeakL : forall Γ1 Γ2 Δ A, Γ1++Γ2 ⊃ Δ -> Γ1++A::Γ2 ⊃ Δ. (* Goal: None *) intros;remember (Γ1++Γ2);revert Γ1 Γ2 Heql;temp3 H IHG IHG1 IHG2 Heql A0. Qed. Lemma WeakR : forall Γ Δ1 Δ2 A, Γ ⊃ Δ1++Δ2 -> Γ ⊃ Δ1++A::Δ2. (* Goal: None *) intros;remember (Δ1++Δ2);revert Δ1 Δ2 Heql;temp3 H IHG IHG1 IHG2 Heql A0. Qed. Theorem Nc_to_G : forall Γ A, Γ ⊢ A -> Γ ⊃ [A]. induction 1. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) apply ImpR with (Δ1:=[]);assumption. apply Cut with (A→B). (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[_]);assumption. apply ImpL with (Γ1:=[]). (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[_]);assumption. apply Cut with (¬A). (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply ImpR with (Δ1:=[]);is_ass. eapply Cut. (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[⊥]);assumption. apply GBot;in_solve. (* Goal: None *) (* Goal: None *) apply AndR with (Δ1:=[]);assumption. apply Cut with (A ∧ B). (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[_]);assumption. (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply AndL with (Γ1:=[]);is_ass. apply Cut with (A ∧ B). (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[_]);assumption. apply AndL with (Γ1:=[]);constructor 1 with B;in_solve. (* Goal: None *) (* Goal: None *) apply OrR with (Δ1:=[]);apply WeakR with (Δ1:=[_]);assumption. (* Goal: None *) (* Goal: None *) apply OrR with (Δ1:=[]);apply WeakR;assumption. apply Cut with (A ∨ B). (* Goal: None *) (* Goal: None *) apply WeakR with (Δ1:=[_]);assumption. (* Goal: None *) (* Goal: None *) apply OrL with (Γ1:=[]);assumption. Qed. End sequent_mod.
Require Export b_soundness. Require Export Decidable. Set Implicit Arguments. (** * Completeness Theorem The general proof idea is to put a formula in Conjunctive Normal Form (CNF), and then prove that validity and provability are both equivalent to a syntactical validity check. The proof consists of six parts. - If a formula is valid, then so is its NNF; - If a (formula in) NNF is valid, then so is its CNF; - If a (formula in) CNF is valid then it's syntactically valid; - If a CNF is syntactically valid, then its provable; - If the CNF of a NNF formula is provable, then so is the NNF formula itself. - If the NNF of a formula is provable, then so is the formula itself.*) Module Type complete_mod (X: base_mod) (Y: sound_mod X). Import X Y. (*First we transform a formula to its Negation Normal Form (NNF) by expanding all implications, and pushing Negations to the atomic formulas.*) Inductive NNF : Set := | NPos : PropVars -> NNF | NNeg : PropVars -> NNF | NBot : NNF | NTop : NNF | NConj : NNF -> NNF -> NNF | NDisj : NNF -> NNF -> NNF . (*MakeNNF A pushes all negations in A to the literals and removes implications. MakeNNFN A does the same for ¬A*) Fixpoint MakeNNF (A:PropF) : NNF := match A with | # P => NPos P | ⊥ => NBot | B ∨ C => NDisj (MakeNNF B) (MakeNNF C) | B ∧ C => NConj (MakeNNF B) (MakeNNF C) | B → C => NDisj (MakeNNFN B) (MakeNNF C) end with MakeNNFN (A:PropF) : NNF := match A with | # P => NNeg P | ⊥ => NTop | B ∨ C => NConj (MakeNNFN B) (MakeNNFN C) | B ∧ C => NDisj (MakeNNFN B) (MakeNNFN C) | B → C => NConj (MakeNNF B) (MakeNNFN C) end. (** The inclusion from NNF to formulas*) Fixpoint NNFtoPropF (A:NNF) : PropF := match A with | NPos P => #P | NNeg P => ¬ #P | NBot => ⊥ | NTop => ¬⊥ | NConj B C => NNFtoPropF B ∧ NNFtoPropF C | NDisj B C => NNFtoPropF B ∨ NNFtoPropF C end. (** I'm going to model clauses as list of literals and formulas in Conjuntive Normal Form (CNF) as lists of clauses*) Inductive Literal := | LPos : PropVars -> Literal | LNeg : PropVars -> Literal | LBot : Literal | LTop : Literal . Fixpoint Bar P := match P with | LPos Q => LNeg Q | LNeg Q => LPos Q | LBot => LTop | LTop => LBot end. Fixpoint LiteraltoPropF (P:Literal) : PropF := match P with | LPos Q => #Q | LNeg Q => ¬#Q | LBot => ⊥ | LTop => ¬⊥ end. Definition Clause := list Literal. (** A clause is the disjunction of literals. As an artifact of this encoding, there is always an ⊥ at the end of a clause). The alternative was to use non-empty lists, i.e. a new inductive type List' defined as Inductive List' (A:Type) : Type := | Singleton : A -> List' | Cons' : A -> List' A -> List' A. I decided against this, since then I have to re-prove basic facts about lists, and I thought that the meta-theoretical proofs would be longer, since parts of the Cons'-case must (perhaps) also be proven for the Singleton-case. *) Definition ClausetoPropF := map_fold_right LiteraltoPropF Disj ⊥. Definition CNF := list Clause. Definition CNFtoPropF := map_fold_right ClausetoPropF Conj ⊤. (** Definition of the disjunction of - A clause and a formula in CNF - Two formulas in CNF*) Definition AddClause (l:Clause) (ll:CNF) : CNF := map (fun l2 => l++l2) ll. Definition Disjunct (ll ll2:CNF) : CNF := flat_map (fun l => AddClause l ll2) ll. (**MakeCNF A transforms A to CNF*) Fixpoint MakeCNF (A:NNF) : CNF := match A with | NPos P => [[LPos P]] | NNeg P => [[LNeg P]] | NBot => [[LBot]] | NTop => [[LTop]] | NConj B C => MakeCNF B ++ MakeCNF C | NDisj B C => Disjunct (MakeCNF B) (MakeCNF C) end. (** Syntactical requirement for validity of a clause*) Definition Valid_Clause (l:Clause) := In LTop l\/exists A,(In (LPos A) l/\In (LNeg A) l). Definition Valid_CNF ll := forall l, In l ll->Valid_Clause l. (** * Theorems We start with the decidability for literals*) Lemma Literal_eqdec : forall x y : Literal, {x = y} + {x <> y}. intros;destruct x;destruct y;try (right;discriminate);try (left;reflexivity); destruct (Varseq_dec p p0); (left;f_equal;assumption)||(right;intro HH;injection HH;contradiction). Qed. (** Proof that A is valid iff NNF A is valid*) Lemma NNF_equiv_valid : forall v A, TrueQ v (NNFtoPropF (MakeNNF A))=TrueQ v A /\ TrueQ v (NNFtoPropF (MakeNNFN A))=TrueQ v ¬A. intros v A;induction A;try destruct IHA;try destruct IHA1;try destruct IHA2;split;simpl in *; try trivial;try rewrite H;try rewrite H0;try rewrite H1;try rewrite H2;try trivial; repeat rewrite orb_false_r;repeat rewrite orb_false_l; (* Goal: @eq bool true true *) (* Goal: None *) try rewrite negb_andb;try rewrite negb_orb;try rewrite negb_involutive;reflexivity. Qed. (** Proof that NNF A is valid iff CNF A is valid*) Lemma CNF_and_valid : forall v ll1 ll2, TrueQ v (CNFtoPropF (ll1 ++ ll2)) = TrueQ v (CNFtoPropF ll1) && TrueQ v (CNFtoPropF ll2). (* Goal: None *) intros;induction ll1;simpl. (* Goal: @eq bool true true *) (* Goal: None *) reflexivity. (* Goal: None *) unfold CNFtoPropF in IHll1 at 1;rewrite IHll1. (* Goal: None *) apply andb_assoc. Qed. Lemma CNF_or_clause_valid : forall v l1 l2, TrueQ v (ClausetoPropF (l1++l2)) = TrueQ v (ClausetoPropF l1) || TrueQ v (ClausetoPropF l2). (* Goal: None *) intros;induction l1;simpl. (* Goal: @eq bool true true *) (* Goal: None *) reflexivity. (* Goal: None *) unfold ClausetoPropF in IHl1 at 1;rewrite IHl1. (* Goal: None *) apply orb_assoc. Qed. Lemma CNF_add_clause_valid : forall v l ll, TrueQ v (CNFtoPropF (AddClause l ll)) = TrueQ v (ClausetoPropF l) || TrueQ v (CNFtoPropF ll). (* Goal: None *) intros;induction ll;simpl. (* Goal: @eq bool true true *) (* Goal: None *) rewrite orb_true_r;reflexivity. (* Goal: None *) unfold CNFtoPropF in IHll at 1;rewrite IHll. (* Goal: None *) rewrite CNF_or_clause_valid. (* Goal: None *) rewrite orb_andb_distrib_r. (* Goal: @eq bool true true *) (* Goal: None *) reflexivity. Qed. Lemma CNF_or_valid : forall v ll1 ll2, TrueQ v (CNFtoPropF (Disjunct ll1 ll2)) = TrueQ v (CNFtoPropF ll1) || TrueQ v (CNFtoPropF ll2). (* Goal: None *) intros;induction ll1;simpl. (* Goal: @eq bool true true *) (* Goal: None *) reflexivity. (* Goal: None *) rewrite CNF_and_valid;rewrite IHll1;rewrite CNF_add_clause_valid. (* Goal: @eq bool true true *) (* Goal: None *) rewrite orb_andb_distrib_l;reflexivity. Qed. Theorem CNF_equiv_valid : forall v A, TrueQ v (CNFtoPropF (MakeCNF A)) = TrueQ v (NNFtoPropF A). intros;induction A;simpl;try reflexivity;try (destruct (v p);simpl;reflexivity;fail); (* Goal: @eq bool true true *) (* Goal: None *) [rewrite CNF_and_valid|rewrite CNF_or_valid];rewrite IHA1;rewrite IHA2;reflexivity. Qed. (** Proof that if a formula in CNF is valid then it is syntactically valid*) Definition Countervaluation l P := if (in_dec Literal_eqdec (LNeg P) l) then true else false. Definition Validates v Δ := exists A, In A Δ /\ Is_true (TrueQ v A). Lemma TrueQ_impl_Validates : forall v m, Is_true (TrueQ v (ClausetoPropF m)) -> Validates v (map LiteraltoPropF m). (* Goal: None *) intros;induction m. (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) contradiction. (* Goal: None *) simpl in H;case_bool v (LiteraltoPropF a). (* Goal: None *) (* Goal: None *) exists (LiteraltoPropF a);split;[in_solve|rewrite H0;trivial]. (* Goal: None *) destruct (IHm H) as (?&?&?);exists x;split;[in_solve|assumption]. Qed. Lemma Validated_valid : forall l, Validates (Countervaluation l) (map LiteraltoPropF l) -> Valid_Clause l. (* Goal: None *) intros l (A&H&K). apply in_map_iff in H as (p&?&H);subst;destruct p;unfold Countervaluation in K;simpl in K. (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) destruct (in_dec Literal_eqdec (LNeg p) l). (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) right;eauto. (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) contradiction. (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) destruct (in_dec Literal_eqdec (LNeg p) l);contradiction. (* Goal: Valid_Clause l *) (* Goal: Valid_Clause l *) contradiction. (* Goal: Valid_Clause l *) left;assumption. Qed. Theorem Clause_valid : forall l, Valid (ClausetoPropF l) -> Valid_Clause l. (* Goal: None *) intros;apply Validated_valid;apply TrueQ_impl_Validates;apply H;intros ? Q;destruct Q. Qed. Theorem CNF_valid : forall ll, Valid (CNFtoPropF ll) -> Valid_CNF ll. induction ll;intros ? ? H0;destruct H0;subst. apply Clause_valid;intros v K;remember (H v K) as i eqn:x;clear x; simpl in i;case_bool v (ClausetoPropF l). apply IHll. intros v K. remember (H v K). eapply proj2. apply andb_prop_elim. rewrite <- CNF_and_valid. change (a::ll) with ([a]++ll) in H. eapply H;assumption. assumption. Qed. (** Proof that if a formula in CNF is syntactically valid then it's provable*) Lemma Clause_provable_3 : forall a l1 l2 Γ, In (LiteraltoPropF a) Γ -> Γ ⊢ ClausetoPropF (l1++a::l2). (* Goal: None *) intros;induction l1. (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. apply OrI2;assumption. Qed. Lemma Clause_provable_2 : forall a l1 l2 l3, Provable (ClausetoPropF (l1++(Bar a)::l2++a::l3)). (* Goal: None *) intros;induction l1. apply BotC;mp;[is_ass|destruct a;simpl;apply OrI1]; try (apply ImpI;mp;[is_ass|apply OrI2;apply Clause_provable_3;in_solve]); (apply BotC;mp;[constructor;constructor 2;in_solve|apply OrI2;apply Clause_provable_3;in_solve]). apply OrI2;assumption. Qed. Theorem Clause_provable : forall l, Valid_Clause l -> Provable (ClausetoPropF l). (* Goal: None *) intros ? [?|(?&?&?)];apply in_split in H as (?&?&?);subst. (* Goal: None *) (* Goal: None *) induction x;simpl. (* Goal: None *) (* Goal: None *) (* Goal: None *) apply OrI1;simpl;apply ImpI;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;apply IHx. (* Goal: None *) apply in_app_or in H0 as []. (* Goal: None *) (* Goal: None *) apply in_split in H as (?&?&?);subst. (* Goal: None *) (* Goal: None *) rewrite app_ass;apply (Clause_provable_2 (LPos x)). (* Goal: None *) inversion H;[discriminate|]. (* Goal: None *) apply in_split in H0 as (?&?&?);subst. (* Goal: None *) apply (Clause_provable_2 (LNeg x)). Qed. Theorem CNF_provable : forall ll, Valid_CNF ll -> Provable (CNFtoPropF ll). (* Goal: None *) intros;induction ll;unfold CNFtoPropF;simpl. (* Goal: None *) (* Goal: None *) apply ImpI;is_ass. (* Goal: None *) eapply AndI. (* Goal: @eq bool true true *) (* Goal: None *) apply Clause_provable;apply H;constructor;reflexivity. apply IHll;intro;intro;apply H;constructor 2;assumption. Qed. (** Proof that (CNF A) → (NNF A) is provable*) Lemma prov_or : forall A1 A2 B1 B2 Γ, Provable (A1 → A2) -> Provable (B1 → B2) -> In (A1∨B1) Γ -> Γ ⊢ A2∨B2. (* Goal: None *) intros; prov_impl_in H;prov_impl_in H0. eapply OrE. (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) apply OrI1;apply K;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;apply K0;is_ass. Qed. Lemma CNF_and_prov : forall ll1 ll2, Provable (CNFtoPropF (ll1 ++ ll2) → CNFtoPropF ll1 ∧ CNFtoPropF ll2). (* Goal: None *) intros;induction ll1;simpl. (* Goal: None *) (* Goal: None *) unfold CNFtoPropF at 2;unfold ClausetoPropF;simpl. (* Goal: None *) (* Goal: None *) apply ImpI;apply AndI. (* Goal: None *) (* Goal: None *) unfold Top;unfold Neg;apply ImpI;is_ass. (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) prov_impl_in IHll1; apply ImpI;apply AndI. (* Goal: None *) (* Goal: None *) unfold CNFtoPropF;simpl;apply AndI. (* Goal: None *) (* Goal: None *) eapply AndE1;is_ass. (* Goal: None *) (* Goal: None *) eapply AndE1;apply K. eapply AndE2;is_ass. (* Goal: None *) (* Goal: None *) eapply AndE2;apply K;eapply AndE2;is_ass. Qed. Lemma CNF_or_clause_prov : forall l1 l2, Provable (ClausetoPropF (l1++l2) → ClausetoPropF l1 ∨ ClausetoPropF l2). intros;induction l1;simpl;unfold ClausetoPropF;simpl. (* Goal: None *) (* Goal: None *) apply ImpI;eapply OrI2;is_ass. prov_impl_in IHl1. apply ImpI. eapply OrE. (* Goal: None *) (* Goal: None *) is_ass. (* Goal: None *) (* Goal: None *) do 2 eapply OrI1;is_ass. apply OrE with (ClausetoPropF l1) (ClausetoPropF l2). (* Goal: None *) (* Goal: None *) apply K;is_ass. (* Goal: None *) (* Goal: None *) apply OrI1;apply OrI2;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;is_ass. Qed. Lemma CNF_add_clause_prov : forall l ll, Provable (CNFtoPropF (AddClause l ll) → ClausetoPropF l ∨ CNFtoPropF ll). intros;induction ll;simpl;unfold CNFtoPropF;simpl. (* Goal: None *) (* Goal: None *) apply ImpI;eapply OrI2;is_ass. prov_impl_in IHll;apply ImpI; apply OrE with (ClausetoPropF l) (ClausetoPropF a). eapply prov_impl. apply CNF_or_clause_prov. (* Goal: None *) (* Goal: None *) eapply AndE1;is_ass. (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. apply OrE with (ClausetoPropF l) (CNFtoPropF ll). (* Goal: None *) (* Goal: None *) apply K;eapply AndE2;is_ass. (* Goal: None *) (* Goal: None *) apply OrI1;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;apply AndI;is_ass. Qed. Lemma CNF_or_prov : forall ll1 ll2, Provable (CNFtoPropF (Disjunct ll1 ll2) → CNFtoPropF ll1 ∨ CNFtoPropF ll2). (* Goal: None *) intros;induction ll1;simpl;unfold CNFtoPropF;simpl. (* Goal: None *) (* Goal: None *) apply ImpI;eapply OrI1;is_ass. (* Goal: None *) prov_impl_in IHll1;apply ImpI; apply OrE with (ClausetoPropF a) (CNFtoPropF ll2). (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply prov_impl;[apply CNF_add_clause_prov|]. (* Goal: None *) (* Goal: None *) (* Goal: None *) eapply AndE1;eapply prov_impl;[apply CNF_and_prov|is_ass]. (* Goal: None *) (* Goal: None *) apply OrE with (CNFtoPropF ll1) (CNFtoPropF ll2). (* Goal: None *) (* Goal: None *) (* Goal: None *) (* Goal: None *) apply K;eapply AndE2;eapply prov_impl;[apply CNF_and_prov|is_ass]. (* Goal: None *) (* Goal: None *) apply OrI1;apply AndI;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;is_ass. (* Goal: None *) (* Goal: None *) apply OrI2;is_ass. Qed. Theorem CNF_impl_prov : forall A, Provable (CNFtoPropF (MakeCNF A) → NNFtoPropF A). induction A;simpl; try (unfold CNFtoPropF; unfold ClausetoPropF;simpl; apply ImpI;eapply OrE; [eapply AndE1;is_ass| is_ass| apply BotC;is_ass];fail). apply ImpI;apply AndI;(eapply prov_impl;[eassumption|]); [eapply AndE1|eapply AndE2];(eapply prov_impl;[apply CNF_and_prov|is_ass]). apply ImpI;eapply prov_impl. apply ImpI;eapply prov_or;try eassumption;in_solve. eapply prov_impl;[apply CNF_or_prov|is_ass]. Qed. (**Proof that (NNF A) → A is provable *) Lemma prov_and : forall A1 A2 B1 B2 Γ, Provable (A1 → A2) -> Provable (B1 → B2) -> In (A1∧B1) Γ -> Γ ⊢ A2∧B2. (* Goal: None *) intros; prov_impl_in H;prov_impl_in H0. apply AndI;[apply K;eapply AndE1|apply K0;eapply AndE2];is_ass. Qed. Lemma NNF_impl_prov : forall A, Provable (NNFtoPropF (MakeNNF A) → A) /\ Provable (NNFtoPropF (MakeNNFN A) → ¬A). induction A;simpl;split;try destruct IHA;try destruct IHA1;try destruct IHA2;apply ImpI;try (is_ass;fail). eapply prov_and;try eassumption;in_solve. apply ImpI. apply OrE with ¬A1 ¬A2. eapply prov_or;try eassumption;in_solve. (* Goal: None *) (* Goal: None *) mp;[|eapply AndE1];is_ass. (* Goal: None *) (* Goal: None *) mp;[|eapply AndE2];is_ass. eapply prov_or;try eassumption;in_solve. apply ImpI. eapply OrE;[is_ass|mp;[|is_ass];eapply prov_impl;try eassumption..]. (* Goal: None *) (* Goal: None *) eapply AndE1;is_ass. (* Goal: None *) (* Goal: None *) eapply AndE2;is_ass. apply ImpI. apply OrE with ¬A1 A2. eapply prov_or;try eassumption;in_solve. (* Goal: None *) (* Goal: None *) apply BotC. eapply ImpE with A1;is_ass. (* Goal: None *) (* Goal: None *) is_ass. apply ImpI. apply ImpE with A2. eapply prov_impl;try eassumption. eapply AndE2;is_ass. mp. (* Goal: None *) (* Goal: None *) is_ass. eapply prov_impl;try eassumption. eapply AndE1;is_ass. Qed. (** * Completeness Theorem*) Theorem Completeness : Prop_Completeness. do 2 intro. mp. apply NNF_impl_prov. mp. apply CNF_impl_prov. apply CNF_provable. apply CNF_valid. (* Goal: None *) (* Goal: True *) intros ? ?. rewrite CNF_equiv_valid. rewrite ((and_ind (fun A _ => A)) (NNF_equiv_valid v A)). apply H;assumption. Qed. Theorem prov_equiv_models : forall Γ A, Γ ⊢ A <-> Γ ⊨ A. (* Goal: None *) split;[apply Soundness_general|revert A;induction Γ]. (* Goal: None *) (* Goal: None *) apply Completeness. (* Goal: None *) intros. apply deduction. apply IHΓ. (* Goal: None *) (* Goal: True *) intros ? ?. case_bool v a;rewrite H1;simpl. (* Goal: None *) (* Goal: True *) apply H. intros ? ?. destruct H2;subst. (* Goal: None *) (* Goal: None *) (* Goal: True *) rewrite H1;exact I. (* Goal: None *) (* Goal: True *) apply H0;in_solve. (* Goal: True *) exact I. Qed. Print Assumptions prov_equiv_models. End complete_mod.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* This contribution was updated for Coq V5.10 by the COQ workgroup. *) (* January 1995 *) (****************************************************************************) (* *) (* Rem Theorem in Baire space *) (* *) (* Henk Barendregt *) (* *) (* Bastad, June 1993 *) (* Coq V5.8 *) (* *) (* *) (****************************************************************************) (* Rem.v *) (****************************************************************************) (* Needs classical logic *) Require Import Classical. (* Baire Space *) Definition B := nat -> nat. Definition Top := B -> Prop. Definition inclusion (X Y : Top) := forall z : B, X z -> Y z. Definition equal (X Y : Top) := inclusion X Y /\ inclusion Y X. Definition complement (X : Top) (z : B) := ~ X z. Definition union (X Y : Top) (z : B) := X z \/ Y z. Definition inter (X Y : Top) (z : B) := X z /\ Y z. Definition neighbour (f : B) (n : nat) (g : B) := forall m : nat, m <= n -> f m = g m. Definition open (X : Top) := forall f : B, X f -> exists n : nat, inclusion (neighbour f n) X. Definition closed (X : Top) := open (complement X). Definition dense (X : Top) := forall (f : B) (n : nat), exists g : B, X g /\ neighbour f n g. Definition closure (X : Top) (f : B) := forall n : nat, exists g : B, X g /\ neighbour f n g. Lemma refl_neighbour : forall (n : nat) (x : B), neighbour x n x. (* Goal: forall (n : nat) (x : B), neighbour x n x *) unfold neighbour in |- *; auto. Qed. Hint Resolve refl_neighbour. Lemma trans_neighbour : forall (n : nat) (f g h : B), neighbour f n g -> neighbour g n h -> neighbour f n h. (* Goal: forall (n : nat) (f g h : B) (_ : neighbour f n g) (_ : neighbour g n h), neighbour f n h *) unfold neighbour in |- *. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) intros. (* Goal: @eq nat (f m) (h m) *) rewrite (H m); trivial. (* Goal: @eq nat (g m) (h m) *) apply H0; trivial. Qed. Lemma closedc_clX : forall X : Top, closed (closure X). (* Goal: forall X : Top, closed (closure X) *) unfold closed, closure in |- *. (* Goal: forall X : Top, open (complement (fun f : B => forall n : nat, @ex B (fun g : B => and (X g) (neighbour f n g)))) *) unfold open, complement in |- *. (* Goal: forall (X : Top) (f : B) (_ : not (forall n : nat, @ex B (fun g : B => and (X g) (neighbour f n g)))), @ex nat (fun n : nat => inclusion (neighbour f n) (fun z : B => not (forall n0 : nat, @ex B (fun g : B => and (X g) (neighbour z n0 g))))) *) intros X f complement_clX. generalize (not_all_ex_not nat (fun n : nat => exists g : B, X g /\ neighbour f n g) complement_clX). (* Goal: forall _ : @ex nat (fun n : nat => not (@ex B (fun g : B => and (X g) (neighbour f n g)))), @ex nat (fun n : nat => inclusion (neighbour f n) (fun z : B => not (forall n0 : nat, @ex B (fun g : B => and (X g) (neighbour z n0 g))))) *) simple induction 1; intros n H1. (* Goal: @ex nat (fun n0 : nat => inclusion (fun g0 : B => forall (m : nat) (_ : le m n0), @eq nat (g m) (g0 m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m)))) *) exists n. (* Goal: inclusion (neighbour f n) (fun z : B => not (forall n : nat, @ex B (fun g : B => and (X g) (neighbour z n g)))) *) unfold inclusion in |- *; intros g fng. (* Goal: not (forall n : nat, @ex B (fun g0 : B => and (X g0) (neighbour g n g0))) *) unfold not in |- *; intro H2. (* Goal: False *) apply H1. (* Goal: @ex B (fun g : B => and (X g) (neighbour f n g)) *) elim (H2 n). (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) simple induction 1; intros. (* Goal: @ex B (fun g : B => and (X g) (neighbour f n g)) *) exists x; split; trivial. (* Goal: neighbour f n x *) apply trans_neighbour with g; trivial. Qed. Hint Resolve closedc_clX. Lemma Xinc_clX : forall X : Top, inclusion X (closure X). (* Goal: forall X : Top, inclusion X (closure X) *) unfold inclusion in |- *; intros X f Xf. (* Goal: closure X f *) unfold closure in |- *; intro n. (* Goal: @ex B (fun g : B => and (X g) (neighbour f n g)) *) exists f; split; trivial. Qed. Lemma Lemma1 : forall X : Top, equal X (inter (closure X) (union X (complement (closure X)))). (* Goal: forall X : Top, equal X (inter (closure X) (union X (complement (closure X)))) *) unfold equal, inclusion in |- *; intro X; split. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) unfold inter, union, closure in |- *; intros. (* Goal: and (open (nbh f n)) (closed (nbh f n)) *) split. (* Goal: forall n : nat, @ex B (fun g : B => and (X g) (neighbour z n g)) *) (* Goal: or (X z) (complement (fun f : B => forall n : nat, @ex B (fun g : B => and (X g) (neighbour f n g))) z) *) (* Goal: forall (z : B) (_ : inter (closure X) (union X (complement (closure X))) z), X z *) intro n; exists z; split; auto. (* Goal: or (X x) (complement (closure X) x) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) left; trivial. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) unfold inter, union, closure in |- *; intros. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) elim H; intros. (* Goal: X z *) elim H1; trivial. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) unfold complement in |- *; intros. (* Goal: X z *) elim (H2 H0). Qed. Lemma density : forall X : Top, dense (union X (complement (closure X))). (* Goal: forall X : Top, dense (union X (complement (closure X))) *) unfold dense in |- *; intros X f n. (* Goal: @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) elim (classic (closure X f)). (* Goal: forall _ : closure X f, @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) intro clXf. (* Goal: @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) elim (clXf n). (* Goal: forall (x : B) (_ : and (X x) (neighbour f n x)), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) simple induction 1. (* Goal: forall (_ : X x) (_ : neighbour f n x), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) intros; exists x. (* Goal: and (union X (complement (closure X)) f) (neighbour f n f) *) split; trivial. (* Goal: union X (complement (closure X)) f *) unfold union in |- *. (* Goal: or (X x) (complement (closure X) x) *) (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) left; trivial. (* Goal: forall _ : not (closure X f), @ex B (fun g : B => and (union X (complement (closure X)) g) (neighbour f n g)) *) intro notclXf. (* Goal: forall (n : nat) (f g h : B) (_ : forall (m : nat) (_ : le m n), @eq nat (f m) (g m)) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m)) (m : nat) (_ : le m n), @eq nat (f m) (h m) *) exists f; intros. (* Goal: and (union X (complement (closure X)) f) (neighbour f n f) *) split; trivial. (* Goal: union X (complement (closure X)) f *) unfold union in |- *. (* Goal: or (X f) (complement (closure X) f) *) right; trivial. Qed. Hint Resolve density. Theorem Rem : forall X : Top, exists Y : Top, (exists Z : Top, closed Y /\ dense Z /\ equal X (inter Y Z)). (* Goal: forall X : Top, @ex Top (fun Y : Top => @ex Top (fun Z : Top => and (closed Y) (and (dense Z) (equal X (inter Y Z))))) *) intro X; exists (closure X). (* Goal: @ex Top (fun Z : Top => and (closed (closure X)) (and (dense Z) (equal X (inter (closure X) Z)))) *) exists (union X (complement (closure X))). (* Goal: and (dense (union X (complement (closure X)))) (equal X (inter (closure X) (union X (complement (closure X))))) *) split; auto. (* Goal: and (dense (union X (complement (closure X)))) (equal X (inter (closure X) (union X (complement (closure X))))) *) split; auto. (* Goal: equal X (inter (closure X) (union X (complement (closure X)))) *) apply Lemma1. Qed. Require Import Lt. Definition nbh := neighbour. Definition clopen (X : Top) := open X /\ closed X. Lemma clopenbasis : forall (f : B) (n : nat), clopen (nbh f n). (* Goal: forall (f : B) (n : nat), clopen (nbh f n) *) intros f n. (* Goal: clopen (nbh f n) *) unfold clopen in |- *. (* Goal: and (open (nbh f n)) (closed (nbh f n)) *) split. (* Goal: open (nbh f n) *) (* Goal: closed (nbh f n) *) unfold open in |- *; intro g. (* Goal: forall _ : nbh f n g, @ex nat (fun n0 : nat => inclusion (neighbour g n0) (nbh f n)) *) (* Goal: closed (nbh f n) *) intro Ofng. (* Goal: @ex nat (fun n0 : nat => inclusion (neighbour g n0) (nbh f n)) *) (* Goal: closed (nbh f n) *) exists (S n). (* Goal: inclusion (fun g0 : B => forall (m : nat) (_ : le m n), @eq nat (g m) (g0 m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m))) *) unfold inclusion in |- *. (* Goal: forall (z : B) (_ : neighbour g (S n) z), nbh f n z *) (* Goal: closed (nbh f n) *) intros h OhSnz. (* Goal: forall (n : nat) (f g h : B) (_ : neighbour f n g) (_ : neighbour g n h), neighbour f n h *) unfold nbh in |- *; unfold neighbour in |- *. (* Goal: forall (m : nat) (_ : le m n), @eq nat (f m) (h m) *) (* Goal: closed (nbh f n) *) intros m lemn. (* Goal: @eq nat (f m) (h m) *) (* Goal: closed (nbh f n) *) unfold neighbour in OhSnz. (* Goal: @eq nat (f m) (h m) *) (* Goal: closed (nbh f n) *) unfold nbh in Ofng; unfold neighbour in Ofng. (* Goal: @eq nat (f m) (h m) *) (* Goal: closed (nbh f n) *) generalize (Ofng m lemn). (* Goal: forall _ : @eq nat (f m) (g m), @eq nat (f m) (h m) *) (* Goal: closed (nbh f n) *) intro E; rewrite E. (* Goal: @eq nat (g m) (h m) *) (* Goal: closed (nbh f n) *) auto. (* Goal: closed (nbh f n) *) unfold closed, nbh in |- *. (* Goal: open (complement (neighbour f n)) *) unfold open, complement, neighbour in |- *. (* Goal: forall (f0 : B) (_ : not (forall (m : nat) (_ : le m n), @eq nat (f m) (f0 m))), @ex nat (fun n0 : nat => inclusion (fun g : B => forall (m : nat) (_ : le m n0), @eq nat (f0 m) (g m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m)))) *) intro g. (* Goal: forall _ : not (forall (m : nat) (_ : le m n), @eq nat (f m) (g m)), @ex nat (fun n0 : nat => inclusion (fun g0 : B => forall (m : nat) (_ : le m n0), @eq nat (g m) (g0 m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m)))) *) intro notgfn. (* Goal: @ex nat (fun n0 : nat => inclusion (fun g0 : B => forall (m : nat) (_ : le m n0), @eq nat (g m) (g0 m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m)))) *) exists n. (* Goal: inclusion (fun g0 : B => forall (m : nat) (_ : le m n), @eq nat (g m) (g0 m)) (fun z : B => not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m))) *) unfold inclusion in |- *. (* Goal: forall (z : B) (_ : forall (m : nat) (_ : le m n), @eq nat (g m) (z m)), not (forall (m : nat) (_ : le m n), @eq nat (f m) (z m)) *) intro h. (* Goal: forall _ : forall (m : nat) (_ : le m n), @eq nat (g m) (h m), not (forall (m : nat) (_ : le m n), @eq nat (f m) (h m)) *) intro hgn. (* Goal: not (forall (m : nat) (_ : le m n), @eq nat (f m) (h m)) *) unfold not in |- *; intros fhn. (* Goal: False *) apply notgfn. (* Goal: forall (m : nat) (_ : le m n), @eq nat (f m) (g m) *) intros p psn. (* Goal: @eq nat (f p) (g p) *) rewrite (fhn p psn). (* Goal: @eq nat (h p) (g p) *) rewrite (hgn p psn); trivial. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* *) (* *) (* Mini_ML.v *) (* *) (* This file contains the definitions of the Mini-ML and the *) (* Categorical Abstract Machine (C.A.M) natural semantics *) (* It also contains the definition of the translation from *) (* Mini-ML to the CAM and the proof that this translation is *) (* correct *) (* *) (* *) (* Samuel Boutin *) (* Coq V5.10 *) (* December 1994 *) (* *) (* *) (****************************************************************************) (* Mini_ML.v *) (****************************************************************************) (*****************************************************************************) (* CORRECTNESS PROOF OF A MINI_ML COMPILER *) (* Samuel Boutin *) (* December 1994 *) (* Coql V5.10 *) (*****************************************************************************) (*****************************************************************************) (* First we define a Set "OP" of variable which is a representation of the *) (* arithmetic functions *,+,-... that we will not describe explicitely *) (* We take the natural numbers to code the variables (but of course it has no*) (* relation with the De bruijn indexes) *) (*****************************************************************************) Parameter OP : Set. Parameter eval_op : OP -> nat -> nat -> nat. Definition Pat := nat. (*****************************************************************************) (* Defining the syntax of ML expressions *) (*****************************************************************************) Inductive MLexp : Set := | Bool : bool -> MLexp | Num : nat -> MLexp | op : OP -> MLexp | id : Pat -> MLexp | appl : MLexp -> MLexp -> MLexp | mlpair : MLexp -> MLexp -> MLexp | lambda : Pat -> MLexp -> MLexp | let' : Pat -> MLexp -> MLexp -> MLexp | letrec : Pat -> Pat -> MLexp -> MLexp -> MLexp | ite : MLexp -> MLexp -> MLexp -> MLexp. (*****************************************************************************) (* ML values and environment are defined with the following mutual *) (* recursive definition *) (*****************************************************************************) Inductive MLval : Set := | num : nat -> MLval | boolean : bool -> MLval | valpair : MLval -> MLval -> MLval | OP_clos : OP -> MLval | Clos : Pat -> MLexp -> MLenv -> MLval | Clos_rec : Pat -> MLexp -> Pat -> MLenv -> MLval with MLenv : Set := | Enil : MLenv | Econs : Pat -> MLval -> MLenv -> MLenv. (*****************************************************************************) (* Definition of VAL_OF which decide if a variable belongs to an environment *) (*****************************************************************************) Inductive VAL_OF : MLenv -> Pat -> MLval -> Prop := | ELT : forall (e : MLenv) (I : Pat) (a : MLval), VAL_OF (Econs I a e) I a | CHG : forall (e : MLenv) (X I : Pat) (a b : MLval), VAL_OF e I a -> X <> I :>Pat -> VAL_OF (Econs X b e) I a. (*****************************************************************************) (* The following lemma shows us that VAL_OF is deterministic *) (*****************************************************************************) Lemma determ_VAL_OF : forall (e : MLenv) (i : Pat) (V V' : MLval), VAL_OF e i V' -> VAL_OF e i V -> V = V' :>MLval. (* Goal: forall (e : MLenv) (i : Pat) (V V' : MLval) (_ : VAL_OF e i V') (_ : VAL_OF e i V), @eq MLval V V' *) simple induction 1. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq MLval (Clos P E0 e0) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H0; auto. (* Goal: @eq MLval V a *) (* Goal: forall (e : MLenv) (X I : Pat) (a b : MLval) (_ : VAL_OF e I a) (_ : forall _ : VAL_OF e I V, @eq MLval V a) (_ : not (@eq Pat X I)) (_ : VAL_OF (Econs X b e) I V), @eq MLval V a *) elim H2; auto. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq MLval u V' *) apply H1. (* Goal: VAL_OF e0 I V *) inversion H3. (* Goal: VAL_OF e0 I V *) (* Goal: VAL_OF e0 I V *) elim H2. (* Goal: @eq Pat X I *) (* Goal: VAL_OF e0 I V *) exact H4. (* Goal: VAL_OF e0 I V *) auto. (* Injection H4. Intros. Try Rewrite <- H5. Elim H9;Auto. Intros;Auto. *) Qed. (*****************************************************************************) (* We define now the Mini-ML semantics *) (*In this semantics we want to distinguish the places where application is *) (*used in a recursive scheme from the other places. *) (*That's why we have a special rule for application in the case where the *) (*function applied has as value a recursive closure (this correspond in fact *) (*to a test during application *) (*****************************************************************************) Inductive ML_DS : MLenv -> MLexp -> MLval -> Prop := | BOOL : forall (b : bool) (e : MLenv), ML_DS e (Bool b) (boolean b) | NUM : forall (n : nat) (e : MLenv), ML_DS e (Num n) (num n) | Sem_OP : forall (c : OP) (e : MLenv), ML_DS e (op c) (OP_clos c) | LAMBDA : forall (e : MLenv) (P : Pat) (E : MLexp), ML_DS e (lambda P E) (Clos P E e) | IDENT : forall (e : MLenv) (v : MLval) (I : Pat), VAL_OF e I v -> ML_DS e (id I) v | ITE1 : forall (e : MLenv) (E1 E2 E3 : MLexp) (v : MLval), ML_DS e E1 (boolean true) -> ML_DS e E2 v -> ML_DS e (ite E1 E2 E3) v | ITE2 : forall (e : MLenv) (E1 E2 E3 : MLexp) (v : MLval), ML_DS e E1 (boolean false) -> ML_DS e E3 v -> ML_DS e (ite E1 E2 E3) v | MLPAIR : forall (e : MLenv) (E1 E2 : MLexp) (u v : MLval), ML_DS e E1 u -> ML_DS e E2 v -> ML_DS e (mlpair E1 E2) (valpair u v) | APPml1 : forall (e e1 : MLenv) (P : Pat) (E E1 E2 : MLexp) (u v : MLval), ML_DS e E1 (Clos P E e1) -> ML_DS e E2 u -> ML_DS (Econs P u e1) E v -> ML_DS e (appl E1 E2) v | APPml2 : forall (e e1 : MLenv) (x P : Pat) (E E1 E2 : MLexp) (u v : MLval), ML_DS e E1 (Clos_rec x E P e1) -> ML_DS e E2 u -> ML_DS (Econs x u (Econs P (Clos_rec x E P e1) e1)) E v -> ML_DS e (appl E1 E2) v | APPml_op : forall (e : MLenv) (E1 E2 : MLexp) (n m : nat) (c : OP), ML_DS e E1 (OP_clos c) -> ML_DS e E2 (valpair (num n) (num m)) -> ML_DS e (appl E1 E2) (num (eval_op c n m)) | Sem_let : forall (e : MLenv) (P : Pat) (E1 E2 : MLexp) (u v : MLval), ML_DS e E2 u -> ML_DS (Econs P u e) E1 v -> ML_DS e (let' P E2 E1) v | Sem_letrec : forall (e : MLenv) (P x : Pat) (E E2 : MLexp) (u : MLval), ML_DS (Econs P (Clos_rec x E P e) e) E2 u -> ML_DS e (letrec P x E E2) u. (*****************************************************************************) (* This predicate can be seen as an injective partial function associating a *) (* value to an environment and an expression: *) (*****************************************************************************) Lemma ML_DS_determ : forall (e : MLenv) (E : MLexp) (V : MLval), ML_DS e E V -> forall V' : MLval, ML_DS e E V' -> V = V' :>MLval. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) simple induction 1; intros. (* Goal: @eq MLval (Clos P E0 e0) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H0; auto. (* Goal: @eq MLval (Clos P E0 e0) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H0; auto. (* Goal: @eq MLval (Clos P E0 e0) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H0; auto. (* Goal: @eq MLval (Clos P E0 e0) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H0; auto. (* Goal: VAL_OF e0 I V *) inversion_clear H1; auto. apply (determ_VAL_OF e0 I); auto. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. exact (H3 V' H6). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (boolean true = boolean false). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (boolean true) (boolean false) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (boolean false) H5). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (boolean false = boolean true). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (boolean false) (boolean true) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (boolean true) H5). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H3 V' H6). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. (* Goal: @eq MLval (valpair u v) (valpair u0 v0) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) elim (H1 u0 H5); elim (H3 v0 H6); trivial. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H6. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = Clos P0 E3 e3). (* Goal: forall _ : @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; injection HH. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) apply H5. (* Goal: ML_DS (Econs P u e1) E0 V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos P E0 e1) (Clos P0 E3 e3) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) try rewrite H6; try rewrite H10; try rewrite H11; try rewrite H12. (* Goal: ML_DS (Econs x0 u0 (Econs P0 (Clos_rec x0 E3 P0 e3) e3)) E3 V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact H9. (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H3 u0 H8). (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos P0 E3 e3) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos P0 E3 e3) H7). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = Clos_rec x E3 P0 e3). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (Clos P E0 e1) (Clos_rec x E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos_rec x E3 P0 e3) H7). (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = OP_clos c). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (Clos_rec x E0 P e1) (OP_clos c) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (OP_clos c) H7). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H6. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos_rec x E0 P e1 = Clos P0 E3 e3). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos P0 E3 e3) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos P0 E3 e3) H7). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos_rec x E0 P e1 = Clos_rec x0 E3 P0 e3). (* Goal: forall _ : @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; injection HH. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) apply H5. try rewrite H6; try rewrite H10; try rewrite H11; try rewrite H12; try rewrite H13. (* Goal: ML_DS (Econs x0 u0 (Econs P0 (Clos_rec x0 E3 P0 e3) e3)) E3 V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact H9. (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H3 u0 H8). (* Goal: @eq MLval (Clos_rec x E0 P e1) (Clos_rec x0 E3 P0 e3) *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos_rec x0 E3 P0 e3) H7). (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos_rec x E0 P e1 = OP_clos c). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (Clos_rec x E0 P e1) (OP_clos c) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (OP_clos c) H7). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = Clos P E0 e2). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (OP_clos c) (Clos P E0 e2) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos P E0 e2) H5). (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = Clos_rec x E0 P e2). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (Clos_rec x E0 P e2) H5). (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (valpair (num n) (num m) = valpair (num n0) (num m0)). (* Goal: forall _ : @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; injection HH. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = OP_clos c0). (* Goal: forall _ : @eq MLval (OP_clos c) (OP_clos c0), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH1; injection HH1. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) try rewrite H4; try rewrite H7; try rewrite H8. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H1 (OP_clos c0) H5). (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) exact (H3 (valpair (num n0) (num m0)) H6). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval u V' *) apply H3. (* Goal: forall (_ : not (@eq Pat P T)) (_ : Access P s1 C0), @eq Commande C C' *) try rewrite H4. (* Goal: ML_DS (Econs P u0 e0) E1 V' *) (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval u V' *) exact H6. (* Goal: @eq MLval u u0 *) (* Goal: @eq MLval u V' *) exact (H1 u0 H5). (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @eq MLval u V' *) apply H1. (* Goal: ML_DS (Econs P (Clos_rec x E0 P e0) e0) E2 V' *) exact H3. Qed. (*****************************************************************************) (*We present now the definitions that concerns the Categorical Abstract *) (*Machine. The Set Commande defines its syntax *) (*****************************************************************************) Inductive Value : Set := | null : Value | elem : bool -> Value | int : nat -> Value | def_op : OP -> Value. (*****************************************************************************) Inductive Commande : Set := | quote : Value -> Commande | car : Commande | cdr : Commande | cons : Commande | push : Commande | swap : Commande | branch : Commande -> Commande -> Commande | cur : Commande -> Commande | cur_rec : Commande -> Commande | app : Commande | o : Commande -> Commande -> Commande. (*****************************************************************************) Inductive CSem_val : Set := | val : Value -> CSem_val | Cam_pair : CSem_val -> CSem_val -> CSem_val | Cam_clos : Commande -> CSem_val -> CSem_val | Cam_clos_rec : Commande -> CSem_val -> CSem_val | Cam_nil : CSem_val. (*****************************************************************************) Inductive Etat : Set := | nil : Etat | ETcons : CSem_val -> Etat -> Etat. (*****************************************************************************) (* We provide now the Semantics of the CAM *) (*****************************************************************************) Inductive CAM_DS : Etat -> Commande -> Etat -> Prop := | QUO : forall (s : Etat) (a : CSem_val) (b : Value), CAM_DS (ETcons a s) (quote b) (ETcons (val b) s) | CAR : forall (s : Etat) (a b : CSem_val), CAM_DS (ETcons (Cam_pair a b) s) car (ETcons a s) | CDR : forall (s : Etat) (a b : CSem_val), CAM_DS (ETcons (Cam_pair a b) s) cdr (ETcons b s) | CONS : forall (s : Etat) (a b : CSem_val), CAM_DS (ETcons b (ETcons a s)) cons (ETcons (Cam_pair a b) s) | PUSH : forall (s : Etat) (a : CSem_val), CAM_DS (ETcons a s) push (ETcons a (ETcons a s)) | SWAP : forall (s : Etat) (a b : CSem_val), CAM_DS (ETcons a (ETcons b s)) swap (ETcons b (ETcons a s)) | BRANCHT : forall (s s1 : Etat) (c1 c2 : Commande), CAM_DS s c1 s1 -> CAM_DS (ETcons (val (elem true)) s) (branch c1 c2) s1 | BRANCHF : forall (s s2 : Etat) (c1 c2 : Commande), CAM_DS s c2 s2 -> CAM_DS (ETcons (val (elem false)) s) (branch c1 c2) s2 | CUR : forall (s : Etat) (a : CSem_val) (c : Commande), CAM_DS (ETcons a s) (cur c) (ETcons (Cam_clos c a) s) | APPcam1 : forall (s s1 : Etat) (a b : CSem_val) (c : Commande), CAM_DS (ETcons (Cam_pair a b) s) c s1 -> CAM_DS (ETcons (Cam_pair (Cam_clos c a) b) s) app s1 | APPcam2 : forall (s s1 : Etat) (a b : CSem_val) (c : Commande), CAM_DS (ETcons (Cam_pair (Cam_pair b (Cam_clos_rec c b)) a) s) c s1 -> CAM_DS (ETcons (Cam_pair (Cam_clos_rec c b) a) s) app s1 | APPcam_op : forall (s : Etat) (n m : nat) (oper : OP), CAM_DS (ETcons (Cam_pair (val (def_op oper)) (Cam_pair (val (int n)) (val (int m)))) s) app (ETcons (val (int (eval_op oper n m))) s) | CUR_REC : forall (s : Etat) (a : CSem_val) (c : Commande), CAM_DS (ETcons a s) (cur_rec c) (ETcons (Cam_clos_rec c a) s) | o_DS : forall (s s1 s2 : Etat) (c1 c2 : Commande), CAM_DS s c1 s1 -> CAM_DS s1 c2 s2 -> CAM_DS s (o c1 c2) s2. (*****************************************************************************) (*We now define the "Squelette"of an environment which is the intuitive *) (*corresponding list of Debruijn indexes of an environment *) (*****************************************************************************) Inductive Squelette : Set := | nil_squelette : Squelette | cons_squelette : Pat -> Squelette -> Squelette. (*****************************************************************************) Inductive Habite : MLenv -> Squelette -> Prop := | triv_habite : Habite Enil nil_squelette | cons_habite : forall (x : Pat) (u : MLval) (e : MLenv) (s : Squelette), Habite e s -> Habite (Econs x u e) (cons_squelette x s). (*****************************************************************************) (* Habite is an injective w.r.t the Squelette argument *) (*****************************************************************************) Lemma Habite_inject : forall (e : MLenv) (s1 s2 : Squelette), Habite e s1 -> Habite e s2 -> s1 = s2. (* Goal: forall (e : MLenv) (s : Squelette) (_ : Habite e s) (V : MLval) (_ : ML_DS e (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) simple induction e. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) inversion_clear H; inversion_clear H0; trivial. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq Squelette s1 s2 *) inversion_clear H0; inversion_clear H1. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) elim (H s s0 H2 H0); trivial. Qed. (*****************************************************************************) (* The Acces predicate is defined using the notion of Squelette *) (* It describes how to reach an identifier in an environment *) (*****************************************************************************) Inductive Access : Pat -> Squelette -> Commande -> Prop := | Rule1 : forall (P : Pat) (s : Squelette), Access P (cons_squelette P s) cdr | Rule2 : forall (P T : Pat) (s : Squelette) (C : Commande), P <> T -> Access P s C -> Access P (cons_squelette T s) (o car C). (*****************************************************************************) (* The following small lemma shows that Access is injective *) (*****************************************************************************) Lemma Access_inject : forall (x : Pat) (s : Squelette) (C C' : Commande), Access x s C' -> Access x s C -> C = C' :>Commande. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) simple induction s; intros. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande C C' *) simple inversion H0. (* Goal: forall (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) simple inversion H1. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) elim H4; elim H7; trivial. (* Goal: forall (_ : not (@eq Pat P0 T)) (_ : Access P0 s2 C0), @eq Commande C C' *) (* Goal: forall (_ : not (@eq Pat P T)) (_ : Access P s1 C0), @eq Commande C C' *) injection H8; injection H3. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq Commande C C' *) (* Goal: forall (_ : not (@eq Pat P T)) (_ : Access P s1 C0), @eq Commande C C' *) elim H12. (* Goal: VAL_OF e0 I V *) try rewrite H7; try rewrite <- H2; try rewrite H6; try rewrite <- H11; auto. (* Goal: forall (_ : not (@eq Pat P T)) (_ : Access P s1 C0), @eq Commande C C' *) try rewrite H4. (* Goal: forall (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) simple inversion H1. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq Commande C C' *) (* Goal: forall (_ : not (@eq Pat P0 T0)) (_ : Access P0 s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) elim H8. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) injection H5; injection H3; intros. (* Goal: VAL_OF e0 I V *) try rewrite <- H2; try rewrite H11; try rewrite <- H13; auto. (* Goal: forall (_ : not (@eq Pat P0 T0)) (_ : Access P0 s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) try rewrite H7. (* Goal: forall (_ : not (@eq Pat x T0)) (_ : Access x s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) injection H8; injection H5. (* Goal: forall (_ : @eq Squelette s1 s0) (_ : @eq Pat T p) (_ : @eq Squelette s2 s0) (_ : @eq Pat T0 p) (_ : not (@eq Pat x T0)) (_ : Access x s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) intros HH1 HH2 HH3. (* Goal: forall (_ : @eq Pat T0 p) (_ : not (@eq Pat x T0)) (_ : Access x s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) try rewrite HH1; try rewrite HH3. (* Goal: forall (_ : @eq Pat T0 p) (_ : not (@eq Pat x T0)) (_ : Access x s0 C1) (_ : not (@eq Pat x T)) (_ : Access x s0 C0), @eq Commande C C' *) try rewrite <- H6; try rewrite <- H9. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: @eq Commande (o car C1) (o car C0) *) elim (H C1 C0 H12 H10). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. Qed. (*****************************************************************************) Lemma Squelet : forall e : MLenv, exists s : Squelette, Habite e s. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: @ex Squelette (fun s : Squelette => Habite e s) *) pattern e in |- *. (* Goal: (fun m : MLenv => @ex Squelette (fun s : Squelette => Habite m s)) e *) apply MLenv_ind. (* Goal: @ex Squelette (fun s : Squelette => Habite Enil s) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : @ex Squelette (fun s : Squelette => Habite m0 s)), @ex Squelette (fun s : Squelette => Habite (Econs p m m0) s) *) exists nil_squelette. (* Goal: Habite Enil nil_squelette *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : @ex Squelette (fun s : Squelette => Habite m0 s)), @ex Squelette (fun s : Squelette => Habite (Econs p m m0) s) *) exact triv_habite. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) elim H; intro s; intro. (* Goal: @ex Squelette (fun s : Squelette => Habite (Econs p m m0) s) *) exists (cons_squelette p s). (* Goal: Habite (Econs p m m0) (cons_squelette p s) *) exact (cons_habite p m m0 s H0). Qed. (*****************************************************************************) (*It's now time to define the translation of ML code onto CAM code *) (*****************************************************************************) Inductive Traduction : Squelette -> MLexp -> Commande -> Prop := | Bool_Trad : forall (b : bool) (S : Squelette), Traduction S (Bool b) (quote (elem b)) | Trad_num : forall (n : nat) (S : Squelette), Traduction S (Num n) (quote (int n)) | Trad_clos : forall (c : OP) (S : Squelette), Traduction S (op c) (quote (def_op c)) | Trad_var : forall (p : Pat) (S : Squelette) (C : Commande), Access p S C -> Traduction S (id p) C | Trad_ite : forall (S : Squelette) (E1 E2 E3 : MLexp) (C1 C2 C3 : Commande), Traduction S E1 C1 -> Traduction S E2 C2 -> Traduction S E3 C3 -> Traduction S (ite E1 E2 E3) (o push (o C1 (branch C2 C3))) | Trad_pair : forall (S : Squelette) (E1 E2 : MLexp) (C1 C2 : Commande), Traduction S E1 C1 -> Traduction S E2 C2 -> Traduction S (mlpair E1 E2) (o push (o C1 (o swap (o C2 cons)))) | Trad_app : forall (S : Squelette) (E1 E2 : MLexp) (C1 C2 : Commande), Traduction S E1 C1 -> Traduction S E2 C2 -> Traduction S (appl E1 E2) (o push (o C1 (o swap (o C2 (o cons app))))) | Trad_let : forall (p : Pat) (S : Squelette) (E1 E2 : MLexp) (C1 C2 : Commande), Traduction S E1 C1 -> Traduction (cons_squelette p S) E2 C2 -> Traduction S (let' p E1 E2) (o push (o C1 (o cons C2))) | Trad_let_rec : forall (p x : Pat) (S : Squelette) (E E2 : MLexp) (C C2 : Commande), Traduction (cons_squelette x (cons_squelette p S)) E C -> Traduction (cons_squelette p S) E2 C2 -> Traduction S (letrec p x E E2) (o push (o (cur_rec C) (o cons C2))) | Trad_lambda : forall (S : Squelette) (p : Pat) (E : MLexp) (C : Commande), Traduction (cons_squelette p S) E C -> Traduction S (lambda p E) (cur C). (*****************************************************************************) (* The Traduction Predicate can be seen as a partial injective function *) (* that given a state and an ML expression yields a CAM sentence: *) (*****************************************************************************) Lemma Traduction_inject : forall (E : MLexp) (C C' : Commande) (s : Squelette), Traduction s E C -> Traduction s E C' -> C = C' :>Commande. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) simple induction E; intros. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) exact (Access_inject p s C C' H H1). (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H1. (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @eq Commande (o push (o C1 (o cons C2))) (o push (o C0 (o cons C3))) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H C1 C0 s H3 H1). (* Goal: @eq Commande (o push (o C1 (o swap (o C2 cons)))) (o push (o C1 (o swap (o C3 cons)))) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H0 C2 C3 s H4 H5). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H1. (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @eq Commande (o push (o C1 (o cons C2))) (o push (o C0 (o cons C3))) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H C1 C0 s H3 H1). (* Goal: @eq Commande (o push (o C1 (o swap (o C2 cons)))) (o push (o C1 (o swap (o C3 cons)))) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H0 C2 C3 s H4 H5). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H1. (* Goal: @eq Commande (cur C0) (cur C1) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H C0 C1 (cons_squelette p s) H2 H0). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H1. (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @eq Commande (o push (o C1 (o cons C2))) (o push (o C0 (o cons C3))) *) (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) elim (H C1 C0 s H3 H1). (* Goal: @eq Commande (o push (o (cur_rec C0) (o cons C2))) (o push (o (cur_rec C0) (o cons C3))) *) (* Goal: @eq Commande C C' *) elim (H0 C2 C3 (cons_squelette p s) H4 H5). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) (* Goal: @eq Commande C C' *) inversion_clear H1. (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @eq Commande (o push (o (cur_rec C0) (o cons C2))) (o push (o (cur_rec C1) (o cons C3))) *) (* Goal: @eq Commande C C' *) elim (H C0 C1 (cons_squelette p0 (cons_squelette p s)) H3 H1). (* Goal: @eq Commande (o push (o (cur_rec C0) (o cons C2))) (o push (o (cur_rec C0) (o cons C3))) *) (* Goal: @eq Commande C C' *) elim (H0 C2 C3 (cons_squelette p s) H4 H5). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. (* Goal: @eq Commande C C' *) inversion_clear H2. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) inversion_clear H3. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C0 (branch C4 C5))) *) elim (H C1 C0 s H4 H2). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C4 C5))) *) elim (H0 C2 C4 s H5 H7). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C5))) *) elim (H1 C3 C5 s H6 H8). (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) trivial. Qed. (*****************************************************************************) (*We can now define an equivalence between ML values and CAM values with the *) (*the help of the predicate Traduction *) (*****************************************************************************) Inductive Equiv_val : MLval -> CSem_val -> Prop := | Eqbool : forall b : bool, Equiv_val (boolean b) (val (elem b)) | Eqnum : forall n : nat, Equiv_val (num n) (val (int n)) | Eq_op : forall c : OP, Equiv_val (OP_clos c) (val (def_op c)) | Eqpair : forall (V1 V2 : MLval) (Cval1 Cval2 : CSem_val), Equiv_val V1 Cval1 -> Equiv_val V2 Cval2 -> Equiv_val (valpair V1 V2) (Cam_pair Cval1 Cval2) | Eqclos : forall (p : Pat) (E : MLexp) (C : Commande) (e : MLenv) (CV : CSem_val) (s : Squelette), Equiv_env e CV -> Habite e s -> Traduction (cons_squelette p s) E C -> Equiv_val (Clos p E e) (Cam_clos C CV) | Eqclos_rec : forall (p x : Pat) (E : MLexp) (e : MLenv) (C : Commande) (CV : CSem_val) (s : Squelette), Equiv_env e CV -> Habite e s -> Traduction (cons_squelette x (cons_squelette p s)) E C -> Equiv_val (Clos_rec x E p e) (Cam_clos_rec C CV) with Equiv_env : MLenv -> CSem_val -> Prop := | Eqenv1 : Equiv_env Enil Cam_nil | Eqenv2 : forall (p : Pat) (E : MLenv) (CV0 : CSem_val), Equiv_env E CV0 -> forall (V : MLval) (CV : CSem_val), Equiv_val V CV -> Equiv_env (Econs p V E) (Cam_pair CV0 CV). (*****************************************************************************) (* We can now give a formulation of the proof *) (*****************************************************************************) Inductive compilation (E : MLexp) : Prop := preuve_compilation : (forall (e : MLenv) (V : MLval), ML_DS e E V -> forall (s : Squelette) (C : Commande), Traduction s E C -> Habite e s -> forall CV : CSem_val, Equiv_env e CV -> exists CV1 : CSem_val, Equiv_val V CV1 /\ (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) -> compilation E. (*****************************************************************************) (*This formulation permits us to make the proof for the different cases *) (* where we don't need induction assumptions. *) (*****************************************************************************) (*****************************************************************************) (* Case where E is a boolean *) (*****************************************************************************) Lemma Proof_bool : forall b : bool, compilation (Bool b). (* Goal: forall b : bool, compilation (Bool b) *) intro b. (* Goal: compilation (lambda p E) *) apply preuve_compilation. (* Goal: forall (e : MLenv) (V : MLval) (_ : ML_DS e (Bool b) V) (s : Squelette) (C : Commande) (_ : Traduction s (Bool b) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros e V ML_b s C Trad_b hab CV Eq. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear ML_b. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (boolean b) CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) exists (val (elem b)). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val (boolean b) (val (elem b)) *) (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (elem b)) s) *) exact (Eqbool b). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (elem b)) s) *) inversion_clear Trad_b. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. (* Goal: CAM_DS (ETcons CV s0) (quote (elem b)) (ETcons (val (elem b)) s0) *) exact (QUO s0 CV (elem b)). Qed. (*****************************************************************************) (* Case where E is an integer *) (*****************************************************************************) Lemma Proof_int : forall n : nat, compilation (Num n). (* Goal: forall n : nat, compilation (Num n) *) intro n. (* Goal: compilation (lambda p E) *) apply preuve_compilation. (* Goal: forall (e : MLenv) (V : MLval) (_ : ML_DS e (Num n) V) (s : Squelette) (C : Commande) (_ : Traduction s (Num n) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros e V ML_n s C Trad_n hab CV Eq. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear ML_n. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (num n) CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) exists (val (int n)). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val (num n) (val (int n)) *) (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (int n)) s) *) exact (Eqnum n). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (int n)) s) *) inversion_clear Trad_n. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. (* Goal: CAM_DS (ETcons CV s0) (quote (int n)) (ETcons (val (int n)) s0) *) exact (QUO s0 CV (int n)). Qed. (*****************************************************************************) (* Case where E is a predefinite operator *) (*****************************************************************************) Lemma Proof_op : forall c : OP, compilation (op c). (* Goal: forall c : OP, compilation (op c) *) intro c. (* Goal: compilation (lambda p E) *) apply preuve_compilation. (* Goal: forall (e : MLenv) (V : MLval) (_ : ML_DS e (op c) V) (s : Squelette) (C : Commande) (_ : Traduction s (op c) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros e V ML_c s C Trad_c hab CV Eq. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear ML_c. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (OP_clos c) CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) exists (val (def_op c)). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val (OP_clos c) (val (def_op c)) *) (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (def_op c)) s) *) exact (Eq_op c). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) C (ETcons (val (def_op c)) s) *) inversion_clear Trad_c. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. (* Goal: CAM_DS (ETcons CV s0) (quote (def_op c)) (ETcons (val (def_op c)) s0) *) exact (QUO s0 CV (def_op c)). Qed. (*****************************************************************************) (* Case where E is an identifier *) (* This case is special in the sens that we cannot use the predicate *) (*compilation because the variables of the formulation must be introduced *) (* in a very precise order. *) (* Of course we could avoid a new definition using a the Cut tactic *) (* The point is that in this case only we must first do an induction on the *) (* ML environment in which we evaluate our expression (an identifier!) *) (*****************************************************************************) Inductive compilation_id (E : MLexp) : Prop := preuve_compilation_id : (forall (e : MLenv) (s : Squelette), Habite e s -> forall V : MLval, ML_DS e E V -> forall C : Commande, Traduction s E C -> forall CV : CSem_val, Equiv_env e CV -> exists CV1 : CSem_val, Equiv_val V CV1 /\ (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) -> compilation_id E. Lemma Proof_ident : forall x : Pat, compilation_id (id x). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: compilation_id (id x) *) apply preuve_compilation_id. (* Goal: forall (e : MLenv) (s : Squelette) (_ : Habite e s) (V : MLval) (_ : ML_DS e (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) simple induction e. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) inversion_clear H3. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 6 intro. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro; intro. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H0. (* Goal: forall (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) simple inversion H2. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) injection H0; do 3 intro. (* Goal: forall (_ : not (@eq Pat P0 T0)) (_ : Access P0 s2 C1) (_ : not (@eq Pat x T)) (_ : Access x s1 C0), @eq Commande C C' *) try rewrite <- H3; try rewrite H7. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 2 intro. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) cdr (ETcons CV1 s))) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H8. (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H9. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 2 intro. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) cdr (ETcons CV1 s))) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H8. (* Goal: @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) cdr (ETcons CV2 s))) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) try rewrite <- H4; try rewrite H6. (* Goal: @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val m CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) cdr (ETcons CV2 s))) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) exists CV1. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val m CV1 *) (* Goal: forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) cdr (ETcons CV1 s) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) exact H10. (* Goal: forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) cdr (ETcons CV1 s) *) (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) intro; apply CDR. (* Goal: @eq Commande (o push (o C1 (branch C2 C3))) (o push (o C1 (branch C2 C3))) *) elim H8; trivial. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) injection H4; do 3 intro. (* Goal: forall (_ : VAL_OF e0 I a) (_ : not (@eq Pat X I)) (C : Commande) (_ : Traduction (cons_squelette p s0) (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) try rewrite H5; try rewrite H7; try rewrite H6; try rewrite H0. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 4 intro. (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear H10. (* Goal: forall (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) simple inversion H11. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) injection H12; try rewrite H10; do 2 intro. (* Goal: VAL_OF e0 I V *) elim H9; elim H15; auto. (* Goal: forall (_ : not (@eq Pat P T)) (_ : Access P s1 C0) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) try rewrite H13; injection H14; do 2 intro; try rewrite H12; try rewrite H10. (* Goal: forall (_ : not (@eq Pat x p)) (_ : Access x s0 C0) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) try rewrite <- H15. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 4 intro. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s : Etat, CAM_DS (ETcons CV s) (o car C0) (ETcons CV1 s))) *) inversion_clear H18. (* Goal: @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons CV2 s))) *) cut (ML_DS m0 (id x) V). (* Goal: forall _ : ML_DS m0 (id x) V, @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons CV2 s))) *) (* Goal: ML_DS m0 (id x) V *) cut (Traduction s0 (id x) C0). (* Goal: forall (_ : Traduction s0 (id x) C0) (_ : ML_DS m0 (id x) V), @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons CV2 s))) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) intros Hyp_Trad Hyp_ML. (* Goal: @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons CV2 s))) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) elim (H s0 H1 V Hyp_ML C0 Hyp_Trad CV0 H19). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) do 2 intro. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) elim H18; do 2 intro. (* Goal: @ex CSem_val (fun CV2 : CSem_val => and (Equiv_val V CV2) (forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons CV2 s))) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) exists x0. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val V x0 *) (* Goal: forall s : Etat, CAM_DS (ETcons (Cam_pair CV0 CV1) s) (o car C0) (ETcons x0 s) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) exact H21. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. apply (o_DS (ETcons (Cam_pair CV0 CV1) s2) (ETcons CV0 s2) (ETcons x0 s2) car C0). (* Goal: CAM_DS (ETcons (Cam_pair CV0 CV1) s2) car (ETcons CV0 s2) *) (* Goal: CAM_DS (ETcons CV0 s2) C0 (ETcons x0 s2) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) apply CAR. (* Goal: CAM_DS (ETcons CV0 s2) C0 (ETcons x0 s2) *) (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) exact (H22 s2). (* Goal: Traduction s0 (id x) C0 *) (* Goal: ML_DS m0 (id x) V *) apply Trad_var. (* Goal: Access x s0 C0 *) (* Goal: ML_DS m0 (id x) V *) exact H17. (* Goal: ML_DS m0 (id x) V *) apply IDENT. (* Goal: VAL_OF m0 x V *) exact H8. Qed. (*****************************************************************************) (* Case where E is an abstraction *) (*****************************************************************************) Lemma Proof_abstraction : forall (E : MLexp) (p : Pat), compilation (lambda p E). (* Goal: forall (E : MLexp) (p : Pat), compilation (lambda p E) *) intros E p. (* Goal: compilation (lambda p E) *) apply preuve_compilation. (* Goal: forall (e : MLenv) (V : MLval) (_ : ML_DS e (lambda p E) V) (s : Squelette) (C : Commande) (_ : Traduction s (lambda p E) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros e V ML_lambda. (* Goal: forall (s : Squelette) (C : Commande) (_ : Traduction s (lambda p E) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) inversion_clear ML_lambda. (* Goal: forall (s : Squelette) (C : Commande) (_ : Traduction s (lambda p E) C) (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (Clos p E e) CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros s C Trad_lam. (* Goal: forall (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (Clos p E e) CV1) (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s))) *) inversion_clear Trad_lam. (* Goal: forall (_ : Habite e s) (CV : CSem_val) (_ : Equiv_env e CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (Clos p E e) CV1) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons CV1 s))) *) intros hab CV Eq_e_CV. (* Goal: @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val (Clos p E e) CV1) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons CV1 s))) *) exists (Cam_clos C0 CV). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. (* Goal: Equiv_val (Clos p E e) (Cam_clos C0 CV) *) (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) apply (Eqclos p E C0 e CV s Eq_e_CV hab H). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s) *) intro. (* Goal: CAM_DS (ETcons CV s0) (cur C0) (ETcons (Cam_clos C0 CV) s0) *) apply CUR. Qed. (*****************************************************************************) (* We have now all the tools we need to make the proof *) (* We want to prove that the following diagram commutes: *) (* *) (* *) (* *) (* "Traduction" *) (* Mini_ML terms ---------------------> CAM terms *) (* | | *) (* | | *) (* | | *) (* | | *) (* "ML_DS"| |"CAM_DS" *) (* | | *) (* | | *) (* | | *) (* V "Equiv" V *) (* Mini_ML values ---------------------> CAM values *) (* *) (* *) (* *) (* This means that having an MLexp E its ML value and its translation onto *) (*CAM code we can find a CAM value such that the diagram commutes *) (* *) (* The proof is made by induction on the Predicate ML_DS. *) (*****************************************************************************) Lemma final_proof : forall (E : MLexp) (e : MLenv) (V : MLval), ML_DS e E V -> forall (s : Squelette) (C : Commande), Traduction s E C -> Habite e s -> forall V : MLval, ML_DS e E V -> forall CV : CSem_val, Equiv_env e CV -> exists CV1 : CSem_val, Equiv_val V CV1 /\ (forall s : Etat, CAM_DS (ETcons CV s) C (ETcons CV1 s)). intros E e V. (* Goal: forall (e : MLenv) (i : Pat) (V V' : MLval) (_ : VAL_OF e i V') (_ : VAL_OF e i V), @eq MLval V V' *) simple induction 1. (*****************************************************************************) (* Simple cases have already been treated *) (*****************************************************************************) intros b e0 s C Trad_b hab V0 ML_b CV Eq. cut (compilation (Bool b)). 2: exact (Proof_bool b). intro comp. elim comp; intro hyp. exact (hyp e0 V0 ML_b s C Trad_b hab CV Eq). intros n e0 s C Trad_int hab V0 ML_int CV Eq. cut (compilation (Num n)). 2: exact (Proof_int n). intro comp. elim comp; intro hyp. exact (hyp e0 V0 ML_int s C Trad_int hab CV Eq). intros c e0 s C Trad_op hab V0 ML_op CV Eq. cut (compilation (op c)). 2: exact (Proof_op c). intro comp. elim comp; intro hyp. exact (hyp e0 V0 ML_op s C Trad_op hab CV Eq). intros e0 P E0 s C Trad_lam hab V0 ML_lambda CV Eq. cut (compilation (lambda P E0)). 2: exact (Proof_abstraction E0 P). intro comp. elim comp; intro hyp. exact (hyp e0 V0 ML_lambda s C Trad_lam hab CV Eq). intros e0 v I VAL_I s C Trad_pat hab V0 ML_pat CV Eq. cut (compilation_id (id I)). 2: exact (Proof_ident I). intro comp. elim comp; intro hyp. exact (hyp e0 s hab V0 ML_pat C Trad_pat CV Eq). (*****************************************************************************) (*We have now to treat the cases where "compilation" cannot be used *) (*****************************************************************************) (*****************************************************************************) (* Case of the " if then else" *) (*****************************************************************************) (* Case where E1 evaluates to true *) intros e0 E1 E2 E3 v ML_E1 hyp_E1 ML_E2 hyp_E2 s C Trad_if. inversion_clear Trad_if. intros hab V_final ML_DS_if. inversion_clear ML_DS_if. intros CV0 eq_e0_CV0. elim (hyp_E2 s C2 H1 hab V_final H4 CV0 eq_e0_CV0). intros CV_final HH; elim HH. intros Eq_Vf_CVf CAM_C2. exists CV_final. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact Eq_Vf_CVf. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. cut (CAM_DS (ETcons CV0 (ETcons CV0 s0)) (o C1 (branch C2 C3)) (ETcons CV_final s0)). cut (CAM_DS (ETcons CV0 s0) push (ETcons CV0 (ETcons CV0 s0))). exact (o_DS (ETcons CV0 s0) (ETcons CV0 (ETcons CV0 s0)) (ETcons CV_final s0) push (o C1 (branch C2 C3))). exact (PUSH s0 CV0). elim (hyp_E1 s C1 H0 hab (boolean true) ML_E1 CV0 eq_e0_CV0). intros CV1 HH'; elim HH'. intro Eq_1; inversion_clear Eq_1. intro CAM_C1. apply (o_DS (ETcons CV0 (ETcons CV0 s0)) (ETcons (val (elem true)) (ETcons CV0 s0)) (ETcons CV_final s0) C1 (branch C2 C3)). exact (CAM_C1 (ETcons CV0 s0)). apply (BRANCHT (ETcons CV0 s0) (ETcons CV_final s0) C2 C3). exact (CAM_C2 s0). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (boolean false = boolean true). intro HH. discriminate HH. exact (ML_DS_determ e0 E1 (boolean false) H3 (boolean true) ML_E1). (* Case where E1 evaluates to false *) intros e0 E1 E2 E3 v ML_E1 hyp_E1 ML_E3 hyp_E3 s C Trad_if. inversion_clear Trad_if. intros hab V_final ML_DS_if. inversion_clear ML_DS_if. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (valpair u v) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (boolean false = boolean true). intro HH. discriminate HH. exact (ML_DS_determ e0 E1 (boolean false) ML_E1 (boolean true) H3). intros CV0 eq_e0_CV0. elim (hyp_E3 s C3 H2 hab V_final H4 CV0 eq_e0_CV0). intros CV_final HH; elim HH. intros Eq_Vf_CVf CAM_C3. exists CV_final. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact Eq_Vf_CVf. (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. cut (CAM_DS (ETcons CV0 (ETcons CV0 s0)) (o C1 (branch C2 C3)) (ETcons CV_final s0)). cut (CAM_DS (ETcons CV0 s0) push (ETcons CV0 (ETcons CV0 s0))). exact (o_DS (ETcons CV0 s0) (ETcons CV0 (ETcons CV0 s0)) (ETcons CV_final s0) push (o C1 (branch C2 C3))). exact (PUSH s0 CV0). elim (hyp_E1 s C1 H0 hab (boolean false) ML_E1 CV0 eq_e0_CV0). intros CV1 HH'; elim HH'. intro Eq_1; inversion_clear Eq_1. intro CAM_C1. apply (o_DS (ETcons CV0 (ETcons CV0 s0)) (ETcons (val (elem false)) (ETcons CV0 s0)) (ETcons CV_final s0) C1 (branch C2 C3)). exact (CAM_C1 (ETcons CV0 s0)). apply (BRANCHF (ETcons CV0 s0) (ETcons CV_final s0) C2 C3). exact (CAM_C3 s0). (*****************************************************************************) (* the pair case *) (*****************************************************************************) intros e0 E1 E2 u v ML_E1 hyp_E1 ML_E2 hyp_E2 s C Trad_p. inversion_clear Trad_p. intros hab V_final ML_DS_pair. inversion_clear ML_DS_pair. intros CV0 eq_e0_CV0. elim (hyp_E1 s C1 H0 hab u0 H2 CV0 eq_e0_CV0). intros CV_E1 HH; elim HH. intros eq_u0_CV_E1 CAM_C1. elim (hyp_E2 s C2 H1 hab v0 H3 CV0 eq_e0_CV0). intros CV_E2 HH'; elim HH'. intros eq_v0_CV_E2 CAM_C2. exists (Cam_pair CV_E1 CV_E2). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. apply (Eqpair u0 v0 CV_E1 CV_E2 eq_u0_CV_E1 eq_v0_CV_E2). (* Goal: forall s : Etat, CAM_DS (ETcons CV s) (quote (def_op c)) (ETcons (val (def_op c)) s) *) intro s0. apply (o_DS (ETcons CV0 s0) (ETcons CV0 (ETcons CV0 s0)) (ETcons (Cam_pair CV_E1 CV_E2) s0) push (o C1 (o swap (o C2 cons)))). apply (PUSH s0 CV0). apply (o_DS (ETcons CV0 (ETcons CV0 s0)) (ETcons CV_E1 (ETcons CV0 s0)) (ETcons (Cam_pair CV_E1 CV_E2) s0) C1 (o swap (o C2 cons))). apply CAM_C1. apply (o_DS (ETcons CV_E1 (ETcons CV0 s0)) (ETcons CV0 (ETcons CV_E1 s0)) (ETcons (Cam_pair CV_E1 CV_E2) s0) swap (o C2 cons)). apply SWAP. apply (o_DS (ETcons CV0 (ETcons CV_E1 s0)) (ETcons CV_E2 (ETcons CV_E1 s0)) (ETcons (Cam_pair CV_E1 CV_E2) s0) C2 cons). apply CAM_C2. apply CONS. (*****************************************************************************) (*We have now to solve the case of the application (It is important to notice*) (*that we were not able to make the proof on induction on E because of the *) (*application case *) (*****************************************************************************) intros e0 e1 P E0 E1 E2 u v ML_E1 hyp_E1 ML_E2 hyp_E2 ML_E0 hyp_E0 s C Trad_appl. inversion_clear Trad_appl. intros hab V0 ML_appl. inversion_clear ML_appl. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = Clos P0 E3 e3). (* Goal: forall _ : @eq MLval (OP_clos c) (OP_clos c0), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH1; injection HH1. intros eq1 eq2 eq3. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). intro eq4. cut (ML_DS (Econs P0 u0 e3) E3 V0). try rewrite <- eq1; try rewrite <- eq2; try rewrite <- eq3; try rewrite <- eq4. intro HH2; cut (v = V0). intro eq5; try rewrite <- eq5. intros CV0 eq_e0_CV0. elim (hyp_E2 s C2 H1 hab u ML_E2 CV0 eq_e0_CV0). intros CVal_E2 HH3; elim HH3. intros Eq_u_Cval_E2 CAM_C2. elim (hyp_E1 s C1 H0 hab (Clos P E0 e1) ML_E1 CV0 eq_e0_CV0). intros Closure HH4; elim HH4. intro eq_clos. inversion_clear eq_clos. intro CAM_C1. cut (Habite (Econs P u e1) (cons_squelette P s0)). intro hab_P_e1. cut (Equiv_env (Econs P u e1) (Cam_pair CV CVal_E2)). intro eq_env_closure. elim (hyp_E0 (cons_squelette P s0) C0 H7 hab_P_e1 v ML_E0 (Cam_pair CV CVal_E2) eq_env_closure). intros CV_final HH5; elim HH5. intros eq_v_CV_final CAM_C0. exists CV_final. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact eq_v_CV_final. intro sq. apply (o_DS (ETcons CV0 sq) (ETcons CV0 (ETcons CV0 sq)) (ETcons CV_final sq) push (o C1 (o swap (o C2 (o cons app))))). apply PUSH. apply (o_DS (ETcons CV0 (ETcons CV0 sq)) (ETcons (Cam_clos C0 CV) (ETcons CV0 sq)) (ETcons CV_final sq) C1 (o swap (o C2 (o cons app)))). apply CAM_C1. apply (o_DS (ETcons (Cam_clos C0 CV) (ETcons CV0 sq)) (ETcons CV0 (ETcons (Cam_clos C0 CV) sq)) (ETcons CV_final sq) swap (o C2 (o cons app))). apply SWAP. apply (o_DS (ETcons CV0 (ETcons (Cam_clos C0 CV) sq)) (ETcons CVal_E2 (ETcons (Cam_clos C0 CV) sq)) (ETcons CV_final sq) C2 (o cons app)). apply CAM_C2. apply (o_DS (ETcons CVal_E2 (ETcons (Cam_clos C0 CV) sq)) (ETcons (Cam_pair (Cam_clos C0 CV) CVal_E2) sq) (ETcons CV_final sq) cons app). apply CONS. apply (APPcam1 sq (ETcons CV_final sq) CV CVal_E2 C0). apply CAM_C0. apply (Eqenv2 P e1 CV H5 u CVal_E2 Eq_u_Cval_E2). apply (cons_habite P u e1 s0 H6). apply (ML_DS_determ (Econs P u e1) E0 v ML_E0 V0 HH2). (* Goal: @eq Pat X I *) (* Goal: VAL_OF e0 I V *) exact H4. apply (ML_DS_determ e0 E2 u ML_E2 u0 H3). apply (ML_DS_determ e0 E1 (Clos P E0 e1) ML_E1 (Clos P0 E3 e3) H2). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = Clos_rec x E3 P0 e3). intro hyp_not; discriminate hyp_not. apply (ML_DS_determ e0 E1 (Clos P E0 e1) ML_E1 (Clos_rec x E3 P0 e3) H2). (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos P E0 e1 = OP_clos c). intro hyp_not; discriminate hyp_not. apply (ML_DS_determ e0 E1 (Clos P E0 e1) ML_E1 (OP_clos c) H2). (*****************************************************************************) (* Case of a recursive closure *) (*****************************************************************************) intros e0 e1 x P E0 E1 E2 u v ML_E1 hyp_E1 ML_E2 hyp_E2 ML_E0 hyp_E0 s C Trad_appl. inversion_clear Trad_appl. intros hab V0 ML_app. inversion_clear ML_app. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos_rec x E0 P e1 = Clos P0 E3 e3). intro HH1; discriminate HH1. apply (ML_DS_determ e0 E1 (Clos_rec x E0 P e1) ML_E1 (Clos P0 E3 e3) H2). intros CV0 eq_e0_CV0. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval v (num (eval_op c n m)) *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (Clos_rec x E0 P e1 = Clos_rec x0 E3 P0 e3). (* Goal: forall _ : @eq MLval (OP_clos c) (OP_clos c0), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH1; injection HH1. intros eq1 eq2 eq3 eq4. cut (ML_DS (Econs x0 u0 (Econs P0 (Clos_rec x0 E3 P0 e3) e3)) E3 V0). try rewrite <- eq1; try rewrite <- eq2; try rewrite <- eq3; try rewrite <- eq4. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). intro eq5; try rewrite <- eq5. intro ML_E0'. cut (v = V0). intro eq6; try rewrite <- eq6. elim (hyp_E2 s C2 H1 hab u ML_E2 CV0 eq_e0_CV0). intros CV_E2 HH3; elim HH3. intros eq_u_CV_E2 CAM_C2. elim (hyp_E1 s C1 H0 hab (Clos_rec x E0 P e1) ML_E1 CV0 eq_e0_CV0). intros CV_E1 HH2; elim HH2. intros eq_V1_CV_E1 CAM_C1. simple inversion eq_V1_CV_E1. discriminate H5. discriminate H5. discriminate H5. discriminate H7. discriminate H8. injection H8. intros eq7 eq8 eq9 eq10. try rewrite eq7; try rewrite eq8; try rewrite eq9; try rewrite eq10. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. cut (Habite (Econs x u (Econs P (Clos_rec x E0 P e1) e1)) (cons_squelette x (cons_squelette P s0))). intro hab0. cut (Equiv_env (Econs x u (Econs P (Clos_rec x E0 P e1) e1)) (Cam_pair (Cam_pair CV CV_E1) CV_E2)). intro Eq_env0. elim (hyp_E0 (cons_squelette x (cons_squelette P s0)) C0 H7 hab0 v ML_E0 (Cam_pair (Cam_pair CV CV_E1) CV_E2) Eq_env0). intros CV_E0 HH4; elim HH4. intros eq_v_CV_E0 CAM_C0. exists CV_E0. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact eq_v_CV_E0. intro S. apply (o_DS (ETcons CV0 S) (ETcons CV0 (ETcons CV0 S)) (ETcons CV_E0 S) push (o C1 (o swap (o C2 (o cons app))))). apply PUSH. apply (o_DS (ETcons CV0 (ETcons CV0 S)) (ETcons CV_E1 (ETcons CV0 S)) (ETcons CV_E0 S) C1 (o swap (o C2 (o cons app)))). apply CAM_C1. apply (o_DS (ETcons CV_E1 (ETcons CV0 S)) (ETcons CV0 (ETcons CV_E1 S)) (ETcons CV_E0 S) swap (o C2 (o cons app))). apply SWAP. apply (o_DS (ETcons CV0 (ETcons CV_E1 S)) (ETcons CV_E2 (ETcons CV_E1 S)) (ETcons CV_E0 S) C2 (o cons app)). apply CAM_C2. apply (o_DS (ETcons CV_E2 (ETcons CV_E1 S)) (ETcons (Cam_pair CV_E1 CV_E2) S) (ETcons CV_E0 S) cons app). apply CONS. cut (forall s : Etat, CAM_DS (ETcons (Cam_pair (Cam_pair CV CV_E1) CV_E2) s) C0 (ETcons CV_E0 s)). (* Goal: VAL_OF e0 I V *) 2: auto. try rewrite <- H9. intro Good_CAM_C0. apply (APPcam2 S (ETcons CV_E0 S) CV_E2 CV C0 (Good_CAM_C0 S)). (* Goal: VAL_OF e0 I V *) apply Eqenv2; auto. (* Goal: VAL_OF e0 I V *) apply Eqenv2; auto. (* Goal: VAL_OF e0 I V *) apply cons_habite; auto. (* Goal: VAL_OF e0 I V *) apply cons_habite; auto. apply (ML_DS_determ (Econs x u (Econs P (Clos_rec x E0 P e1) e1)) E0 v ML_E0 V0 ML_E0'). apply (ML_DS_determ e0 E2 u ML_E2 u0 H3). (* Goal: VAL_OF e0 I V *) auto. apply (ML_DS_determ e0 E1 (Clos_rec x E0 P e1) ML_E1 (Clos_rec x0 E3 P0 e3) H2). cut (OP_clos c = Clos_rec x E0 P e1). intro Hyp_false; discriminate Hyp_false. apply (ML_DS_determ e0 E1 (OP_clos c) H2 (Clos_rec x E0 P e1) ML_E1). (*****************************************************************************) (* Case where we apply a predefined operator *) (*****************************************************************************) intros e0 E1 E2 n m c ML_E1 hyp_E1 ML_E2 hyp_E2 s C Trad_appl. inversion_clear Trad_appl. intros hab V0 ML_appl. inversion_clear ML_appl. intros CV0 eq_e0_CV0. (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = Clos P E0 e2). 2: exact (ML_DS_determ e0 E1 (OP_clos c) ML_E1 (Clos P E0 e2) H2). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = Clos_rec x E0 P e2). 2: exact (ML_DS_determ e0 E1 (OP_clos c) ML_E1 (Clos_rec x E0 P e2) H2). (* Goal: forall _ : @eq MLval (OP_clos c) (Clos_rec x E0 P e2), @eq MLval (num (eval_op c n m)) V' *) (* Goal: @eq MLval (OP_clos c) (Clos_rec x E0 P e2) *) (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; discriminate HH. (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (valpair (num n) (num m) = valpair (num n0) (num m0)). 2: exact (ML_DS_determ e0 E2 (valpair (num n) (num m)) ML_E2 (valpair (num n0) (num m0)) H3). (* Goal: forall _ : @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH; injection HH. intros eq1 eq2. (* Goal: @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (OP_clos c = OP_clos c0). (* Goal: forall _ : @eq MLval (OP_clos c) (OP_clos c0), @eq MLval (num (eval_op c n m)) (num (eval_op c0 n0 m0)) *) (* Goal: @eq MLval (OP_clos c) (OP_clos c0) *) (* Goal: @eq MLval (valpair (num n) (num m)) (valpair (num n0) (num m0)) *) (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) intro HH1; injection HH1. intro eq3. try rewrite <- eq1; try rewrite <- eq2; try rewrite <- eq3. intros CV0 eq_e0_CV0. elim (hyp_E1 s C1 H0 hab (OP_clos c) ML_E1 CV0 eq_e0_CV0). intro HH2; elim HH2. intros CV_c HH3. elim HH3. intros eq_c_CV_c CAM_C1. elim (hyp_E2 s C2 H1 hab (valpair (num n) (num m)) ML_E2 CV0 eq_e0_CV0). intros CV_nm HH4. elim HH4. intro eq_nm_CV_nm. inversion_clear eq_nm_CV_nm. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) inversion_clear H4. inversion_clear H5. intro CAM_C2. exists (val (int (eval_op c n m))). (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact (Eqnum (eval_op c n m)). intro S. apply (o_DS (ETcons CV0 S) (ETcons CV0 (ETcons CV0 S)) (ETcons (val (int (eval_op c n m))) S) push (o C1 (o swap (o C2 (o cons app))))). apply PUSH. apply (o_DS (ETcons CV0 (ETcons CV0 S)) (ETcons (val CV_c) (ETcons CV0 S)) (ETcons (val (int (eval_op c n m))) S) C1 (o swap (o C2 (o cons app)))). apply CAM_C1. apply (o_DS (ETcons (val CV_c) (ETcons CV0 S)) (ETcons CV0 (ETcons (val CV_c) S)) (ETcons (val (int (eval_op c n m))) S) swap (o C2 (o cons app))). apply SWAP. apply (o_DS (ETcons CV0 (ETcons (val CV_c) S)) (ETcons (Cam_pair (val (int n)) (val (int m))) (ETcons (val CV_c) S)) (ETcons (val (int (eval_op c n m))) S) C2 (o cons app)). apply CAM_C2. cut (forall s : Etat, CAM_DS (ETcons CV0 s) C1 (ETcons (val CV_c) s)). (* Goal: VAL_OF e0 I V *) 2: auto. inversion_clear eq_c_CV_c. intro U_CAM_C1. apply (o_DS (ETcons (Cam_pair (val (int n)) (val (int m))) (ETcons (val (def_op c)) S)) (ETcons (Cam_pair (val (def_op c)) (Cam_pair (val (int n)) (val (int m)))) S) (ETcons (val (int (eval_op c n m))) S) cons app). apply CONS. apply (APPcam_op S n m c). (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. elim H6. intro HH5; inversion_clear HH5. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. elim H5. intro HH5; inversion_clear HH5. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. elim H5. intro HH5; inversion_clear HH5. (* Goal: forall (s : Squelette) (_ : Habite Enil s) (V : MLval) (_ : ML_DS Enil (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env Enil CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) (* Goal: forall (p : Pat) (m : MLval) (m0 : MLenv) (_ : forall (s : Squelette) (_ : Habite m0 s) (V : MLval) (_ : ML_DS m0 (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env m0 CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0)))) (s : Squelette) (_ : Habite (Econs p m m0) s) (V : MLval) (_ : ML_DS (Econs p m m0) (id x) V) (C : Commande) (_ : Traduction s (id x) C) (CV : CSem_val) (_ : Equiv_env (Econs p m m0) CV), @ex CSem_val (fun CV1 : CSem_val => and (Equiv_val V CV1) (forall s0 : Etat, CAM_DS (ETcons CV s0) C (ETcons CV1 s0))) *) intros. elim H4. intro HH4; inversion_clear HH4. exact (ML_DS_determ e0 E1 (OP_clos c) ML_E1 (OP_clos c0) H2). (*****************************************************************************) (* Case where E is a let' *) (*****************************************************************************) intros e0 P E1 E2 u v ML_E2 hyp_E2 ML_E1 hyp_E1 s C Trad_let'. inversion_clear Trad_let'. intros hab V0 ML_let. inversion_clear ML_let. intros CV0 eq_e0_CV0. cut (u = u0); cut (v = V0). intros eq1 eq2. try rewrite <- eq1; try rewrite <- eq2. elim (hyp_E2 s C1 H0 hab u ML_E2 CV0 eq_e0_CV0). intros CV_u HH. elim HH. intros eq_u_CV_u CAM_C1. elim (hyp_E1 (cons_squelette P s) C2 H1 (cons_habite P u e0 s hab) v ML_E1 (Cam_pair CV0 CV_u) (Eqenv2 P e0 CV0 eq_e0_CV0 u CV_u eq_u_CV_u)). intros CV_v HH2. elim HH2. intros eq_v_CV_v CAM_C2. exists CV_v. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact eq_v_CV_v. intro S. apply (o_DS (ETcons CV0 S) (ETcons CV0 (ETcons CV0 S)) (ETcons CV_v S) push (o C1 (o cons C2))). apply PUSH. apply (o_DS (ETcons CV0 (ETcons CV0 S)) (ETcons CV_u (ETcons CV0 S)) (ETcons CV_v S) C1 (o cons C2)). apply CAM_C1. apply (o_DS (ETcons CV_u (ETcons CV0 S)) (ETcons (Cam_pair CV0 CV_u) S) (ETcons CV_v S) cons C2). apply CONS. apply CAM_C2. (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). intro eq3. cut (ML_DS (Econs P u0 e0) E1 V0). (* Goal: ML_DS (Econs P (Clos_rec x E0 P e0) e0) E2 V' *) 2: exact H3. try rewrite <- eq3. intro ML_E1'. apply (ML_DS_determ (Econs P u e0) E1 v ML_E1 V0 ML_E1'). apply (ML_DS_determ e0 E2 u ML_E2 u0 H2). intro; apply (ML_DS_determ e0 E2 u ML_E2 u0 H2). (* Goal: @eq MLval v V' *) (* Goal: @eq MLval u V' *) cut (u = u0). intro eq3. cut (ML_DS (Econs P u0 e0) E1 V0). (* Goal: ML_DS (Econs P (Clos_rec x E0 P e0) e0) E2 V' *) 2: exact H3. try rewrite <- eq3. intro ML_E1'. apply (ML_DS_determ (Econs P u e0) E1 v ML_E1 V0 ML_E1'). apply (ML_DS_determ e0 E2 u ML_E2 u0 H2). (*****************************************************************************) (* Case where E is a let_rec *) (*****************************************************************************) intros e0 P x E0 E2 u ML_E2 hyp_E2 s C Trad_letrec. inversion_clear Trad_letrec. intros hab V0 ML_letrec. inversion_clear ML_letrec. intros CV0 eq_e0_CV0. cut (u = V0). intro eq1. try rewrite <- eq1. elim (hyp_E2 (cons_squelette P s) C2 H1 (cons_habite P (Clos_rec x E0 P e0) e0 s hab) u ML_E2 (Cam_pair CV0 (Cam_clos_rec C0 CV0)) (Eqenv2 P e0 CV0 eq_e0_CV0 (Clos_rec x E0 P e0) (Cam_clos_rec C0 CV0) (Eqclos_rec P x E0 e0 C0 CV0 s eq_e0_CV0 hab H0))). intros CV_u HH. elim HH. intros eq_u_CV_u CAM_C2. exists CV_u. (* Goal: and (Equiv_val (Clos p E e) (Cam_clos C0 CV)) (forall s : Etat, CAM_DS (ETcons CV s) (cur C0) (ETcons (Cam_clos C0 CV) s)) *) split. exact eq_u_CV_u. intro S. apply (o_DS (ETcons CV0 S) (ETcons CV0 (ETcons CV0 S)) (ETcons CV_u S) push (o (cur_rec C0) (o cons C2))). apply PUSH. apply (o_DS (ETcons CV0 (ETcons CV0 S)) (ETcons (Cam_clos_rec C0 CV0) (ETcons CV0 S)) (ETcons CV_u S) (cur_rec C0) (o cons C2)). apply CUR_REC. apply (o_DS (ETcons (Cam_clos_rec C0 CV0) (ETcons CV0 S)) (ETcons (Cam_pair CV0 (Cam_clos_rec C0 CV0)) S) (ETcons CV_u S) cons C2). apply CONS. apply CAM_C2. apply (ML_DS_determ (Econs P (Clos_rec x E0 P e0) e0) E2 u ML_E2 V0 H2). Qed. (*****************************************************************************)
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import ZArith. Require Import ZArithRing. Require Import Zdiv. Require Import Omega. Require Import divide. (** * Greatest common divisor (gcd). *) (** There is no unicity of the gcd; hence we define the predicate [gcd a b d] expressing that [d] is a gcd of [a] and [b]. (We show later that the [gcd] is actually unique if we discard its sign.) *) Inductive gcd (a b d : Z) : Prop := gcd_intro : (d | a)%Z -> (d | b)%Z -> (forall x : Z, (x | a)%Z -> (x | b)%Z -> (x | d)%Z) -> gcd a b d. (** Trivial properties of [gcd] *) Lemma gcd_sym : forall a b d : Z, gcd a b d -> gcd b a d. Proof. (* Goal: forall (a b c d : Z) (_ : gcd a b d), gcd (Z.mul c a) (Z.mul c b) (Z.mul c d) *) simple induction 1; constructor; intuition. Qed. Lemma gcd_0 : forall a : Z, gcd a 0 a. Proof. (* Goal: forall a : Z, gcd a Z0 a *) constructor; auto. Qed. Lemma gcd_minus : forall a b d : Z, gcd a (- b) d -> gcd b a d. Proof. (* Goal: forall (a b c d : Z) (_ : gcd a b d), gcd (Z.mul c a) (Z.mul c b) (Z.mul c d) *) simple induction 1; constructor; intuition. Qed. Lemma gcd_opp : forall a b d : Z, gcd a b d -> gcd b a (- d). Proof. (* Goal: forall (a b c d : Z) (_ : gcd a b d), gcd (Z.mul c a) (Z.mul c b) (Z.mul c d) *) simple induction 1; constructor; intuition. Qed. Hint Resolve gcd_sym gcd_0 gcd_minus gcd_opp. (** * Extended Euclid algorithm. *) (** Euclid's algorithm to compute the [gcd] mainly relies on the following property. *) Lemma gcd_for_euclid : forall a b d q : Z, gcd b (a - q * b) d -> gcd a b d. Proof. (* Goal: forall (a b c d : Z) (_ : gcd a b d), gcd (Z.mul c a) (Z.mul c b) (Z.mul c d) *) simple induction 1; constructor; intuition. (* Goal: divide d a *) replace a with (a - q * b + q * b)%Z. auto. ring. Qed. (** We implement the extended version of Euclid's algorithm, i.e. the one computing Bezout's coefficients as it computes the [gcd]. We follow the algorithm given in Knuth's "Art of Computer Programming", vol 2, page 325. *) Section extended_euclid_algorithm. Variable a b : Z. (** The specification of Euclid's algorithm is the existence of [u], [v] and [d] such that [ua+vb=d] and [(gcd a b d)]. *) Inductive Euclid : Set := Euclid_intro : forall u v d : Z, (u * a + v * b)%Z = d -> gcd a b d -> Euclid. (** The recursive part of Euclid's algorithm uses well-founded recursion of non-negative integers. It maintains 6 integers [u1,u2,u3,v1,v2,v3] such that the following invariant holds: [u1*a+u2*b=u3] and [v1*a+v2*b=v3] and [gcd(u2,v3)=gcd(a,b)]. *) Lemma euclid_rec : forall v3 : Z, (0 <= v3)%Z -> forall u1 u2 u3 v1 v2 : Z, (u1 * a + u2 * b)%Z = u3 -> (v1 * a + v2 * b)%Z = v3 -> (forall d : Z, gcd u3 v3 d -> gcd a b d) -> Euclid. Proof. (* Goal: forall (v3 : Z) (_ : Z.le Z0 v3) (u1 u2 u3 v1 v2 : Z) (_ : @eq Z (Z.add (Z.mul u1 a) (Z.mul u2 b)) u3) (_ : @eq Z (Z.add (Z.mul v1 a) (Z.mul v2 b)) v3) (_ : forall (d : Z) (_ : gcd u3 v3 d), gcd a b d), Euclid *) intros v3 Hv3; generalize Hv3; pattern v3 in |- *. (* Goal: (fun z : Z => forall (_ : Z.le Z0 z) (u1 u2 u3 v1 v2 : Z) (_ : @eq Z (Z.add (Z.mul u1 a) (Z.mul u2 b)) u3) (_ : @eq Z (Z.add (Z.mul v1 a) (Z.mul v2 b)) z) (_ : forall (d : Z) (_ : gcd u3 z d), gcd a b d), Euclid) v3 *) apply Z_lt_rec. (* Goal: forall (x : Z) (_ : forall (y : Z) (_ : and (Z.le Z0 y) (Z.lt y x)) (_ : Z.le Z0 y) (u1 u2 u3 v1 v2 : Z) (_ : @eq Z (Z.add (Z.mul u1 a) (Z.mul u2 b)) u3) (_ : @eq Z (Z.add (Z.mul v1 a) (Z.mul v2 b)) y) (_ : forall (d : Z) (_ : gcd u3 y d), gcd a b d), Euclid) (_ : Z.le Z0 x) (u1 u2 u3 v1 v2 : Z) (_ : @eq Z (Z.add (Z.mul u1 a) (Z.mul u2 b)) u3) (_ : @eq Z (Z.add (Z.mul v1 a) (Z.mul v2 b)) x) (_ : forall (d : Z) (_ : gcd u3 x d), gcd a b d), Euclid *) (* Goal: Z.le Z0 v3 *) clear v3 Hv3; intros. (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) elim (Z_zerop x); intro. (* Goal: Euclid *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) apply Euclid_intro with (u := u1) (v := u2) (d := u3). (* Goal: Z.le Z0 v3 *) assumption. (* Goal: gcd a b u3 *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) apply H2. (* Goal: divide d (Z.add (Z.sub a (Z.mul q b)) (Z.mul q b)) *) (* Goal: @eq Z (Z.add (Z.sub a (Z.mul q b)) (Z.mul q b)) a *) rewrite a0; auto. (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) set (q := (u3 / x)%Z) in *. (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) assert (Hq : (0 <= u3 - q * x < x)%Z). (* Goal: and (Z.le Z0 (Z.sub u3 (Z.mul q x))) (Z.lt (Z.sub u3 (Z.mul q x)) x) *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) replace (u3 - q * x)%Z with (u3 mod x)%Z. (* Goal: and (Z.le Z0 (Z.modulo u3 x)) (Z.lt (Z.modulo u3 x) x) *) (* Goal: @eq Z (Z.modulo u3 x) (Z.sub u3 (Z.mul q x)) *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) apply Z_mod_lt; omega. (* Goal: @eq Z (Z.modulo u3 x) (Z.sub u3 (Z.mul q x)) *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) assert (xpos : (x > 0)%Z). omega. (* Goal: @eq Z (Z.modulo u3 x) (Z.sub u3 (Z.mul q x)) *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) generalize (Z_div_mod_eq u3 x xpos). (* Goal: forall _ : @eq Z u3 (Z.add (Z.mul x (Z.div u3 x)) (Z.modulo u3 x)), @eq Z (Z.modulo u3 x) (Z.sub u3 (Z.mul q x)) *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) unfold q in |- *. (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) intro eq; pattern u3 at 2 in |- *; rewrite eq; ring. apply (H (u3 - q * x)%Z Hq (proj1 Hq) v1 v2 x (u1 - q * v1)%Z (u2 - q * v2)%Z). (* Goal: divide d (Z.add (Z.sub a (Z.mul q b)) (Z.mul q b)) *) (* Goal: @eq Z (Z.add (Z.sub a (Z.mul q b)) (Z.mul q b)) a *) tauto. replace ((u1 - q * v1) * a + (u2 - q * v2) * b)%Z with (u1 * a + u2 * b - q * (v1 * a + v2 * b))%Z. (* Goal: @eq Z (Z.sub (Z.add (Z.mul u1 a) (Z.mul u2 b)) (Z.mul q (Z.add (Z.mul v1 a) (Z.mul v2 b)))) (Z.sub u3 (Z.mul q x)) *) (* Goal: @eq Z (Z.sub (Z.add (Z.mul u1 a) (Z.mul u2 b)) (Z.mul q (Z.add (Z.mul v1 a) (Z.mul v2 b)))) (Z.add (Z.mul (Z.sub u1 (Z.mul q v1)) a) (Z.mul (Z.sub u2 (Z.mul q v2)) b)) *) (* Goal: forall (d : Z) (_ : gcd x (Z.sub u3 (Z.mul q x)) d), gcd a b d *) (* Goal: Z.le Z0 v3 *) rewrite H0; rewrite H1; trivial. (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) ring. (* Goal: gcd a b u3 *) (* Goal: Euclid *) (* Goal: Z.le Z0 v3 *) intros; apply H2. (* Goal: Z.le Z0 v3 *) apply gcd_for_euclid with q; assumption. (* Goal: Z.le Z0 v3 *) assumption. Qed. (** We get Euclid's algorithm by applying [euclid_rec] on [1,0,a,0,1,b] when [b>=0] and [1,0,a,0,-1,-b] when [b<0]. *) Lemma euclid : Euclid. Proof. (* Goal: Euclid *) case (Z_le_gt_dec 0 b); intro. intros; apply euclid_rec with (u1 := 1%Z) (u2 := 0%Z) (u3 := a) (v1 := 0%Z) (v2 := 1%Z) (v3 := b); (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) auto; ring. intros; apply euclid_rec with (u1 := 1%Z) (u2 := 0%Z) (u3 := a) (v1 := 0%Z) (v2 := (-1)%Z) (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) (v3 := (- b)%Z); auto; try ring. (* Goal: Z.le Z0 (Z.opp b) *) omega. Qed. End extended_euclid_algorithm. Theorem gcd_uniqueness_apart_sign : forall a b d d' : Z, gcd a b d -> gcd a b d' -> d = d' \/ d = (- d')%Z. Proof. (* Goal: forall (a b d d' : Z) (_ : gcd a b d) (_ : gcd a b d'), or (@eq Z d d') (@eq Z d (Z.opp d')) *) simple induction 1. (* Goal: forall (_ : divide d a) (_ : divide d b) (_ : forall (x : Z) (_ : divide x a) (_ : divide x b), divide x d) (_ : gcd a b d'), or (@eq Z d d') (@eq Z d (Z.opp d')) *) intros H1 H2 H3; simple induction 1; intros. (* Goal: or (@eq Z d d') (@eq Z d (Z.opp d')) *) generalize (H3 d' H4 H5); intro Hd'd. (* Goal: or (@eq Z d d') (@eq Z d (Z.opp d')) *) generalize (H6 d H1 H2); intro Hdd'. (* Goal: or (@eq Z d d') (@eq Z d (Z.opp d')) *) exact (divide_antisym d d' Hdd' Hd'd). Qed. (** * Bezout's coefficients *) Inductive Bezout (a b d : Z) : Prop := Bezout_intro : forall u v : Z, (u * a + v * b)%Z = d -> Bezout a b d. (** Existence of Bezout's coefficients for the [gcd] of [a] and [b] *) Lemma gcd_bezout : forall a b d : Z, gcd a b d -> Bezout a b d. Proof. (* Goal: forall (a b d : Z) (_ : gcd a b d), Bezout a b d *) intros a b d Hgcd. (* Goal: Bezout a b d *) elim (euclid a b); intros. (* Goal: Bezout a b d *) generalize (gcd_uniqueness_apart_sign a b d d0 Hgcd g). (* Goal: forall _ : or (@eq Z d d0) (@eq Z d (Z.opp d0)), Bezout a b d *) intro H; elim H; clear H; intros. (* Goal: Bezout a b d *) (* Goal: Bezout a b d *) apply Bezout_intro with u v. (* Goal: Z.le Z0 v3 *) rewrite H; assumption. (* Goal: Bezout a b d *) apply Bezout_intro with (- u)%Z (- v)%Z. (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) rewrite H; rewrite <- e; ring. Qed. (** gcd of [ca] and [cb] is [c gcd(a,b)]. *) Lemma gcd_mult : forall a b c d : Z, gcd a b d -> gcd (c * a) (c * b) (c * d). Proof. (* Goal: forall (a b c d : Z) (_ : gcd a b d), gcd (Z.mul c a) (Z.mul c b) (Z.mul c d) *) simple induction 1; constructor; intuition. (* Goal: divide x (Z.mul c d) *) elim (gcd_bezout a b d H); intros. (* Goal: divide x (Z.mul c d) *) elim H3; intros. (* Goal: divide x (Z.mul c d) *) elim H4; intros. (* Goal: divide x (Z.mul c d) *) apply divide_intro with (u * q + v * q0)%Z. (* Goal: @eq Z (Z.mul c d) (Z.mul (Z.add (Z.mul u q) (Z.mul v q0)) x) *) rewrite <- H5. (* Goal: @eq Z (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) (Z.mul (Z.add (Z.mul u q) (Z.mul v q0)) x) *) replace (c * (u * a + v * b))%Z with (u * (c * a) + v * (c * b))%Z. (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) rewrite H6; rewrite H7; ring. (* Goal: @eq Z (Z.add (Z.mul u (Z.mul c a)) (Z.mul v (Z.mul c b))) (Z.mul c (Z.add (Z.mul u a) (Z.mul v b))) *) ring. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import ZArith. Require Import ZArithRing. Require Import divide. Require Import gcd. (** Relative primality *) Definition rel_prime (a b : Z) : Prop := gcd a b 1. (** Bezout's theorem: [a] and [b] are relatively prime if and only if there exist [u] and [v] such that [ua+vb = 1]. *) Lemma rel_prime_bezout : forall a b : Z, rel_prime a b -> Bezout a b 1. Proof. (* Goal: forall (a b : Z) (_ : rel_prime a b), Bezout a b (Zpos xH) *) intros a b; exact (gcd_bezout a b 1). Qed. Lemma bezout_rel_prime : forall a b : Z, Bezout a b 1 -> rel_prime a b. Proof. (* Goal: forall (a b : Z) (_ : Bezout a b (Zpos xH)), rel_prime a b *) simple induction 1; constructor; auto. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) intros. rewrite <- H0; auto. Qed. (** Gauss's theorem: if [a] divides [bc] and if [a] and [b] are relatively prime, then [a] divides [c]. *) Theorem Gauss : forall a b c : Z, (a | b * c)%Z -> rel_prime a b -> (a | c)%Z. Proof. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) intros. elim (rel_prime_bezout a b H0); intros. (* Goal: divide a c *) replace c with (c * 1)%Z; [ idtac | ring ]. (* Goal: divide a (Z.mul c (Zpos xH)) *) rewrite <- H1. replace (c * (u * a + v * b))%Z with (c * u * a + v * (b * c))%Z; [ eauto | ring ]. Qed. (** If [a] is relatively prime to [b] and [c], then it is to [bc] *) Lemma rel_prime_mult : forall a b c : Z, rel_prime a b -> rel_prime a c -> rel_prime a (b * c). Proof. (* Goal: forall (a b c : Z) (_ : rel_prime a b) (_ : rel_prime a c), rel_prime a (Z.mul b c) *) intros a b c Hb Hc. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) elim (rel_prime_bezout a b Hb); intros. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) elim (rel_prime_bezout a c Hc); intros. (* Goal: rel_prime a (Z.mul b c) *) apply bezout_rel_prime. apply Bezout_intro with (u := (u * u0 * a + v0 * c * u + u0 * v * b)%Z) (v := (v * v0)%Z). (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Zpos xH) *) rewrite <- H. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.add (Z.mul u a) (Z.mul v b)) *) replace (u * a + v * b)%Z with ((u * a + v * b) * 1)%Z; [ idtac | ring ]. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.mul (Z.add (Z.mul u a) (Z.mul v b)) (Zpos xH)) *) rewrite <- H0. (* Goal: @eq Z (Z.add (Z.mul (Z.add (Z.add (Z.mul (Z.mul u u0) a) (Z.mul (Z.mul v0 c) u)) (Z.mul (Z.mul u0 v) b)) a) (Z.mul (Z.mul v v0) (Z.mul b c))) (Z.mul (Z.add (Z.mul u a) (Z.mul v b)) (Z.add (Z.mul u0 a) (Z.mul v0 c))) *) ring. Qed. (** Primality *) Inductive prime (p : Z) : Prop := prime_intro : (1 < p)%Z -> (forall n : Z, (1 <= n < p)%Z -> rel_prime n p) -> prime p. (** The sole divisors of a prime number [p] are [-1], [1], [p] and [-p]. *) Lemma prime_divisors : forall p : Z, prime p -> forall a : Z, (a | p)%Z -> a = (-1)%Z \/ a = 1%Z \/ a = p \/ a = (- p)%Z. Proof. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) simple induction 1; intros. assert (a = (- p)%Z \/ (- p < a < -1)%Z \/ a = (-1)%Z \/ a = 0%Z \/ a = 1%Z \/ (1 < a < p)%Z \/ a = p). (* Goal: or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) assert (Zabs a <= Zabs p)%Z. apply divide_bounds; [ assumption | omega ]. (* Goal: or (@eq Z a (Z.opp p)) (or (and (Z.lt (Z.opp p) a) (Z.lt a (Zneg xH))) (or (@eq Z a (Zneg xH)) (or (@eq Z a Z0) (or (@eq Z a (Zpos xH)) (or (and (Z.lt (Zpos xH) a) (Z.lt a p)) (@eq Z a p)))))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) generalize H3. pattern (Zabs a) in |- *; apply Zabs_ind; pattern (Zabs p) in |- *; apply Zabs_ind; intros; omega. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) intuition. (* -p < a < -1 *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) absurd (rel_prime (- a) p); intuition. (* Goal: False *) inversion H3. (* Goal: False *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) assert (- a | - a)%Z; auto. (* Goal: False *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) assert (- a | p)%Z; auto. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) generalize (H8 (- a)%Z H9 H10); intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) generalize (divide_1 (- a) H11); intuition. (* a = 0 *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) inversion H2. subst a; omega. (* 1 < a < p *) (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) absurd (rel_prime a p); intuition. (* Goal: False *) inversion H3. (* Goal: False *) assert (a | a)%Z; auto. (* Goal: False *) assert (a | p)%Z; auto. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) generalize (H8 a H9 H10); intuition. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) generalize (divide_1 a H11); intuition. Qed. (** A prime number is relatively prime with any number it does not divide *) Lemma prime_rel_prime : forall p : Z, prime p -> forall a : Z, ~ (p | a)%Z -> rel_prime p a. Proof. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) simple induction 1; intros. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) constructor; intuition. (* Goal: divide x (Zpos xH) *) elim (prime_divisors p H x H3); intuition; subst; auto. (* Goal: divide p (Zpos xH) *) (* Goal: divide (Z.opp p) (Zpos xH) *) absurd (p | a)%Z; auto. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) absurd (p | a)%Z; intuition. Qed. Hint Resolve prime_rel_prime. (** [divide] is decidable *) Axiom divide_dec : forall a b : Z, {(a | b)%Z} + {~ (a | b)%Z}. (* Lemma divide_dec : (a,b:Z) { `a|b` } + { ~ `a|b` }. Proof. Intros a b; Case (Z_eq_dec b `0`); Intro. Left; Subst; Auto. Case (Z_eq_dec a `0`); Intro. Right; Red; Intro; Subst. Inversion H; Omega. Case (Z_le_gt_dec a `0`); Intro. Assert `-a > 0`; Try Omega. Generalize (Z_div_mod_eq b `-a` H); Intro. Case (Z_eq_dec (Zmod b `-a`) `0`); Intro. Left. Apply divide_intro with `-(b/(-a))`. Rewrite e in H0; Clear e. Pattern 1 b; Rewrite H0; Ring. Right; Red; Intro. Inversion H1. LetTac q0 := `b / (-a)`; LetTac r := `b % (-a)`. Generalize (Z_mod_lt b `-a` H). *) (** If a prime [p] divides [ab] then it divides either [a] or [b] *) Lemma prime_mult : forall p : Z, prime p -> forall a b : Z, (p | a * b)%Z -> (p | a)%Z \/ (p | b)%Z. Proof. (* Goal: forall (a b c : Z) (_ : divide a (Z.mul b c)) (_ : rel_prime a b), divide a c *) simple induction 1; intros. (* Goal: or (@eq Z a (Zneg xH)) (or (@eq Z a (Zpos xH)) (or (@eq Z a p) (@eq Z a (Z.opp p)))) *) case (divide_dec p a); intuition. (* Goal: or (divide p a) (divide p b) *) right; apply Gauss with a; auto. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import ZArith. Require Import ZArithRing. Require Import Zcomplements. Unset Standard Proposition Elimination Names. (** Divisibility *) Inductive divide (a b : Z) : Prop := divide_intro : forall q : Z, b = (q * a)%Z -> divide a b. Notation "( x | y )" := (divide x y) (at level 0) : Z_scope. Local Open Scope Z_scope. (** Results *) Lemma divide_refl : forall a : Z, (a | a). Proof. (* Goal: forall a : Z, divide a a *) intros; apply divide_intro with 1; ring. Qed. Lemma one_divide : forall a : Z, (1 | a). Proof. (* Goal: forall a : Z, divide (Zpos xH) a *) intros; apply divide_intro with a; ring. Qed. Lemma divide_0 : forall a : Z, (a | 0). Proof. (* Goal: forall a : Z, divide a Z0 *) intros; apply divide_intro with 0; ring. Qed. Hint Resolve divide_refl one_divide divide_0. Lemma divide_mult_left : forall a b c : Z, (a | b) -> (c * a | c * b). Proof. (* Goal: forall (a b c : Z) (_ : divide a b), divide (Z.mul c a) (Z.mul c b) *) simple induction 1; intros; apply divide_intro with q. (* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *) (* Goal: Z.le a b *) (* Goal: Z.le a b *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H0; ring. Qed. Lemma divide_mult_right : forall a b c : Z, (a | b) -> (a * c | b * c). Proof. (* Goal: forall (a b c : Z) (_ : divide a b), divide (Z.mul a c) (Z.mul b c) *) intros a b c; rewrite (Zmult_comm a c); rewrite (Zmult_comm b c). (* Goal: forall _ : divide a b, divide (Z.mul c a) (Z.mul c b) *) apply divide_mult_left; trivial. Qed. Hint Resolve divide_mult_left divide_mult_right. Lemma divide_plus : forall a b c : Z, (a | b) -> (a | c) -> (a | b + c). Proof. (* Goal: forall (a b c : Z) (_ : divide a b) (_ : divide a c), divide a (Z.sub b c) *) simple induction 1; intros q Hq; simple induction 1; intros q' Hq'. (* Goal: divide a (Z.add b c) *) apply divide_intro with (q + q'). (* Goal: @eq Z (Z.sub b c) (Z.mul (Z.sub q q') a) *) rewrite Hq; rewrite Hq'; ring. Qed. Lemma divide_opp : forall a b : Z, (a | b) -> (a | - b). Proof. (* Goal: forall (a b : Z) (_ : divide a b), divide (Z.opp a) b *) simple induction 1; intros; apply divide_intro with (- q). (* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *) (* Goal: Z.le a b *) (* Goal: Z.le a b *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H0; ring. Qed. Lemma divide_opp_rev : forall a b : Z, (a | - b) -> (a | b). Proof. (* Goal: forall (a b : Z) (_ : divide a (Z.opp b)), divide a b *) intros; replace b with (- - b). apply divide_opp; trivial. ring. Qed. Lemma divide_opp_left : forall a b : Z, (a | b) -> (- a | b). Proof. (* Goal: forall (a b : Z) (_ : divide a b), divide (Z.opp a) b *) simple induction 1; intros; apply divide_intro with (- q). (* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *) (* Goal: Z.le a b *) (* Goal: Z.le a b *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H0; ring. Qed. Lemma divide_opp_left_rev : forall a b : Z, (- a | b) -> (a | b). Proof. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) intros; replace a with (- - a). apply divide_opp_left; trivial. ring. Qed. Lemma divide_minus : forall a b c : Z, (a | b) -> (a | c) -> (a | b - c). Proof. (* Goal: forall (a b c : Z) (_ : divide a b) (_ : divide a c), divide a (Z.sub b c) *) simple induction 1; intros q Hq; simple induction 1; intros q' Hq'. (* Goal: divide a (Z.sub b c) *) apply divide_intro with (q - q'). (* Goal: @eq Z (Z.sub b c) (Z.mul (Z.sub q q') a) *) rewrite Hq; rewrite Hq'; ring. Qed. Lemma divide_left : forall a b c : Z, (a | b) -> (a | b * c). Proof. (* Goal: forall (a b c : Z) (_ : divide a b), divide a (Z.mul b c) *) simple induction 1; intros q Hq; apply divide_intro with (q * c). (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite Hq; ring. Qed. Lemma divide_right : forall a b c : Z, (a | c) -> (a | b * c). Proof. (* Goal: forall (a b c : Z) (_ : divide a c), divide a (Z.mul b c) *) simple induction 1; intros q Hq; apply divide_intro with (q * b). (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite Hq; ring. Qed. Lemma divide_a_ab : forall a b : Z, (a | a * b). Proof. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) intros; apply divide_intro with b; ring. Qed. Lemma divide_a_ba : forall a b : Z, (a | b * a). Proof. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) intros; apply divide_intro with b; ring. Qed. Hint Resolve divide_plus divide_opp divide_opp_rev divide_opp_left divide_opp_left_rev divide_minus divide_left divide_right divide_a_ab divide_a_ba. (** Trivial lemmas to do case analysis over [x:Z]. *) Lemma z_case_0_1 : forall x : Z, x <= -2 \/ x = -1 \/ x = 0 \/ x = 1 \/ x >= 2. Proof. intro; omega. Qed. Lemma z_case_0 : forall x : Z, x <= -1 \/ x = 0 \/ x >= 1. Proof. intro; omega. Qed. (** Only [1] and [-1] divide [1]. *) Lemma divide_1 : forall x : Z, (x | 1) -> x = 1 \/ x = -1. Proof. (* Goal: forall (a b : Z) (_ : divide a b) (_ : not (@eq Z b Z0)), Z.le (Z.abs a) (Z.abs b) *) simple induction 1; intros. (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) elim (z_case_0_1 x); intuition; elim (z_case_0 q); intuition. (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) assert (q * x >= 1 * 2). (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) replace (q * x) with (- q * - x); try ring. (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H3 in H0; omega. (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) assert (- (q * x) >= 1 * 2). (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) replace (- (q * x)) with (q * - x); try ring. (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H1 in H0; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H1 in H0; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H1 in H0; omega. (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) assert (- (q * x) >= 1 * 2). (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) replace (- (q * x)) with (- q * x); try ring. (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H3 in H0; omega. (* Goal: or (@eq Z x (Zpos xH)) (@eq Z x (Zneg xH)) *) assert (q * x >= 1 * 2). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) omega. Qed. (** If [a] divides [b] and [b] divides [a] then [a] is [b] or [-b]. *) Lemma divide_antisym : forall a b : Z, (a | b) -> (b | a) -> a = b \/ a = - b. Proof. (* Goal: forall (a b : Z) (_ : divide a b) (_ : not (@eq Z b Z0)), Z.le (Z.abs a) (Z.abs b) *) simple induction 1; intros. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) inversion H1. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) rewrite H0 in H2; clear H H1. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) case (Z_zerop a); intro. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) left; rewrite H0; rewrite e; ring. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) assert (Hqq0 : q0 * q = 1). (* Goal: @eq Z (Z.mul q0 q) (Zpos xH) *) (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) apply Zmult_reg_l with a. (* Goal: not (@eq Z a Z0) *) (* Goal: @eq Z (Z.mul a (Z.mul q0 q)) (Z.mul a (Zpos xH)) *) (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) assumption. (* Goal: @eq Z (Z.mul a (Z.mul q0 q)) (Z.mul a (Zpos xH)) *) (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) ring_simplify. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) pattern a at 2 in |- *; rewrite H2; ring. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) assert (q | 1). (* Goal: divide q (Zpos xH) *) (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) rewrite <- Hqq0; auto. (* Goal: or (@eq Z a b) (@eq Z a (Z.opp b)) *) elim (divide_1 q H); intros. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H1 in H0; left; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H1 in H0; right; omega. Qed. (** If [a] divides [b] and [b<>0] then [|a| <= |b|]. *) Lemma Zabs_ind : forall (P : Z -> Prop) (x : Z), (x >= 0 -> P x) -> (x <= 0 -> P (- x)) -> P (Zabs x). Proof. (* Goal: forall (P : forall _ : Z, Prop) (x : Z) (_ : forall _ : Z.ge x Z0, P x) (_ : forall _ : Z.le x Z0, P (Z.opp x)), P (Z.abs x) *) intros; elim (Z_lt_ge_dec x 0); intro. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite Zabs_non_eq. apply H0; omega. omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite Zabs_eq. apply H; assumption. omega. Qed. Lemma divide_bounds : forall a b : Z, (a | b) -> b <> 0 -> Zabs a <= Zabs b. Proof. (* Goal: forall (a b : Z) (_ : divide a b) (_ : not (@eq Z b Z0)), Z.le (Z.abs a) (Z.abs b) *) simple induction 1; intros. pattern (Zabs a) in |- *; apply Zabs_ind; pattern (Zabs b) in |- *; apply Zabs_ind; intros. (* a >= 0, b >= 0 *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim (z_case_0 q); intro. (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) assert (- b >= 1 * 0). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) Z0) *) (* Goal: Z.le a b *) (* Goal: Z.le a b *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace (- b) with (- q * a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Z.opp q) a) (Z.opp b) *) (* Goal: Z.le a b *) (* Goal: Z.le a b *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H0; ring. omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim H4; intro; clear H4. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H5 in H0; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) apply Zge_le. (* Goal: Z.ge (Z.opp b) a *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace a with (1 * a). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. (* a >= 0, b <= 0 *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim (z_case_0 q); intro. (* Goal: Z.le (Z.opp a) (Z.opp b) *) apply Zge_le. (* Goal: Z.ge (Z.opp b) a *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace a with (1 * a). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) a) *) (* Goal: @eq Z (Z.mul (Zpos xH) a) a *) (* Goal: Z.le a (Z.opp b) *) (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace (- (q * a)) with (- q * a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. ring. (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim H4; intro; clear H4. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H5 in H0; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) assert (b >= 1 * 0). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) omega. (* a <= 0, b >= 0 *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim (z_case_0 q); intro. (* Goal: Z.le (Z.opp a) (Z.opp b) *) apply Zge_le. (* Goal: Z.ge (Z.opp b) (Z.opp a) *) replace (- a) with (1 * - a). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) Z0) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace (q * a) with (- q * - a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. ring. (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim H4; intro; clear H4. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H5 in H0; omega. (* Goal: Z.le (Z.opp a) b *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) assert (- b >= 1 * 0). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) replace (- (q * a)) with (q * - a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. omega. (* a <= 0, b <= 0 *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim (z_case_0 q); intro. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) assert (b >= 1 * 0). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.mul q a) (Z.mul (Zpos xH) Z0) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) replace (q * a) with (- q * - a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) elim H4; intro; clear H4. (* Goal: Z.le (Z.opp a) (Z.opp b) *) (* Goal: Z.le (Z.opp a) (Z.opp b) *) rewrite H5 in H0; omega. (* Goal: Z.le (Z.opp a) (Z.opp b) *) apply Zge_le. (* Goal: Z.ge (Z.opp b) (Z.opp a) *) replace (- a) with (1 * - a). (* Goal: Z.ge (Z.opp b) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) rewrite H0. (* Goal: Z.ge (Z.opp (Z.mul q a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) replace (- (q * a)) with (q * - a). (* Goal: Z.ge (Z.mul q (Z.opp a)) (Z.mul (Zpos xH) (Z.opp a)) *) (* Goal: @eq Z (Z.mul q (Z.opp a)) (Z.opp (Z.mul q a)) *) (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) apply Zmult_ge_compat; omega. (* Goal: @eq Z (Z.mul (Zpos xH) (Z.opp a)) (Z.opp a) *) ring. ring. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Definition var (cfg : BDDconfig) (node : ad) := match MapGet _ (fst cfg) node with | None => (* Error *) BDDzero | Some (x, (l, r)) => x end. Definition low (cfg : BDDconfig) (node : ad) := match MapGet _ (fst cfg) node with | None => (* Error *) N0 | Some (x, (l, r)) => l end. Definition high (cfg : BDDconfig) (node : ad) := match MapGet _ (fst cfg) node with | None => (* Error *) N0 | Some (x, (l, r)) => r end. Definition config_node_OK (cfg : BDDconfig) := node_OK (fst cfg). Definition is_internal_node (cfg : BDDconfig) (node : ad) := exists x : BDDvar, (exists l : ad, (exists r : ad, MapGet _ (fst cfg) node = Some (x, (l, r)))). Lemma BDDvar_ordered_low : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> is_internal_node cfg (low cfg node) -> BDDcompare (var cfg (low cfg node)) (var cfg node) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (bound : nat) (node : ad) (_ : lt (N.to_nat (var cfg node)) bound), @eq bool_fun (bool_fun_of_BDD_1 cfg node bound) (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (bound : nat) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)) bound), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node bound) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)))) *) intros share counter. intros node H H0 H1. elim H0. intros x H2. elim H2. intros l H3. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) elim H3. intros r H4. clear H2 H3. elim H1. intros x1 H2. elim H2. (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) Lt *) intros l1 H3. elim H3. intros r1 H5. clear H2 H3. unfold var, low in |- *. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite H4. unfold low in H5. rewrite H4 in H5. rewrite H5. elim H. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) intros H2 H3. clear H3. elim H2. intros H3 H6. elim H6. intros H7 H8. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) cut (BDD_OK bs node). intro H9. unfold BDD_OK in H9. unfold BDDordered in H9. (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) bs node with | Some a => true | None => false end true *) simpl in H4. simpl in H5. rewrite H4 in H9. cut (node = BDDzero \/ node = BDDone \/ (exists x0 : BDDvar, (exists l0 : BDDvar, (exists r0 : BDDvar, MapGet _ bs node = Some (x0, (l0, r0)) /\ BDDcompare x0 (ad_S x) = Datatypes.Lt /\ Neqb l0 r0 = false /\ BDDbounded bs l0 x0 /\ BDDbounded bs r0 x0)))). (* Goal: forall _ : BDDbounded bs r x, @eq comparison (BDDcompare x1 x) Lt *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H10. elim H10. intro H11. rewrite H11 in H4. rewrite H4 in H3. (* Goal: forall _ : or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0)))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) discriminate H3. intro H11. elim H11. intro H12. rewrite H12 in H4. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: forall _ : @ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite H4 in H6. elim H6. intros H13 H14. discriminate H13. intros H12. elim H12. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H12. intros x0 H12. elim H12. clear H12. intros x2 H12. elim H12. intros x3 H13. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H12. clear H10 H11. elim H13. intros H10 H11. rewrite H4 in H10. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) injection H10. intros H12 H14 H15. rewrite <- H12 in H11. rewrite <- H14 in H11. (* Goal: forall _ : BDDbounded bs r x, @eq comparison (BDDcompare x1 x) Lt *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite <- H15 in H11. clear H13 H10. cut (BDDbounded bs l x). intros H10. cut (l = BDDzero \/ l = BDDone \/ (exists xl : BDDvar, (exists ll : BDDvar, (exists rl : BDDvar, MapGet _ bs l = Some (xl, (ll, rl)) /\ BDDcompare xl x = Datatypes.Lt /\ Neqb ll rl = false /\ BDDbounded bs ll xl /\ BDDbounded bs rl xl)))). (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H13. elim H13. intro H16. rewrite H16 in H5. rewrite H5 in H3. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: forall _ : or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr)))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) discriminate H3. intro H16. elim H16. intro H17. rewrite H17 in H5. (* Goal: forall _ : @ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite H5 in H7. discriminate H7. intro H17. clear H13 H16. elim H17. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H17. intros x4 H13. elim H13. clear H13. intros x5 H13. elim H13. clear H13. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros x6 H13. elim H13. clear H13. intros H13 H16. rewrite H5 in H13. injection H13. (* Goal: forall (_ : @eq ad r1 x6) (_ : @eq ad l1 x5) (_ : @eq BDDvar x1 x4), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H17 H18 H19. rewrite <- H19 in H16. exact (proj1 H16). (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) apply BDDbounded_lemma. assumption. (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) exact (proj1 (proj2 (proj2 H11))). apply BDDbounded_lemma. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) assumption. apply H8. unfold in_dom in |- *. simpl in H4. rewrite H4. trivial. Qed. Lemma BDDvar_ordered_high : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> is_internal_node cfg (high cfg node) -> BDDcompare (var cfg (high cfg node)) (var cfg node) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (bound : nat) (node : ad) (_ : lt (N.to_nat (var cfg node)) bound), @eq bool_fun (bool_fun_of_BDD_1 cfg node bound) (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (bound : nat) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)) bound), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node bound) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)))) *) intros share counter. intros node H H0 H1. elim H0. intros x H2. elim H2. intros l H3. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) elim H3. intros r H4. clear H2 H3. elim H1. intros x1 H2. elim H2. (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) Lt *) intros l1 H3. elim H3. intros r1 H5. clear H2 H3. unfold var, high in |- *. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite H4. unfold high in H5. rewrite H4 in H5. rewrite H5. elim H. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) intros H2 H3. clear H3. elim H2. intros H3 H6. elim H6. intros H7 H8. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) cut (BDD_OK bs node). intro H9. unfold BDD_OK in H9. unfold BDDordered in H9. (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) bs node with | Some a => true | None => false end true *) simpl in H4. simpl in H5. rewrite H4 in H9. cut (node = BDDzero \/ node = BDDone \/ (exists x0 : BDDvar, (exists l0 : BDDvar, (exists r0 : BDDvar, MapGet _ bs node = Some (x0, (l0, r0)) /\ BDDcompare x0 (ad_S x) = Datatypes.Lt /\ Neqb l0 r0 = false /\ BDDbounded bs l0 x0 /\ BDDbounded bs r0 x0)))). (* Goal: forall _ : BDDbounded bs r x, @eq comparison (BDDcompare x1 x) Lt *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H10. elim H10. intro H11. rewrite H11 in H4. rewrite H4 in H3. (* Goal: forall _ : or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0)))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) discriminate H3. intro H11. elim H11. intro H12. rewrite H12 in H4. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: forall _ : @ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite H4 in H6. elim H6. intros H13 H14. discriminate H13. intros H12. elim H12. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H12. intros x0 H12. elim H12. clear H12. intros x2 H12. elim H12. intros x3 H13. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H12. clear H10 H11. elim H13. intros H10 H11. rewrite H4 in H10. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) injection H10. intros H12 H14 H15. rewrite <- H12 in H11. rewrite <- H14 in H11. (* Goal: forall _ : BDDbounded bs r x, @eq comparison (BDDcompare x1 x) Lt *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite <- H15 in H11. clear H13 H10. cut (BDDbounded bs r x). intros H10. cut (r = BDDzero \/ r = BDDone \/ (exists xr : BDDvar, (exists lr : BDDvar, (exists rr : BDDvar, MapGet _ bs r = Some (xr, (lr, rr)) /\ BDDcompare xr x = Datatypes.Lt /\ Neqb lr rr = false /\ BDDbounded bs lr xr /\ BDDbounded bs rr xr)))). (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H13. elim H13. intro H16. rewrite H16 in H5. rewrite H5 in H3. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: forall _ : or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr)))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) discriminate H3. intro H16. elim H16. intro H17. rewrite H17 in H5. (* Goal: forall _ : @ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) rewrite H5 in H7. discriminate H7. intro H17. clear H13 H16. elim H17. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) clear H17. intros x4 H13. elim H13. clear H13. intros x5 H13. elim H13. clear H13. (* Goal: @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros x6 H13. elim H13. clear H13. intros H13 H16. rewrite H5 in H13. injection H13. (* Goal: forall (_ : @eq ad r1 x6) (_ : @eq ad l1 x5) (_ : @eq BDDvar x1 x4), @eq comparison (BDDcompare x1 x) Lt *) (* Goal: or (@eq ad r BDDzero) (or (@eq ad r BDDone) (@ex BDDvar (fun xr : BDDvar => @ex BDDvar (fun lr : BDDvar => @ex BDDvar (fun rr : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs r) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) xr (@pair BDDvar BDDvar lr rr)))) (and (@eq comparison (BDDcompare xr x) Lt) (and (@eq bool (N.eqb lr rr) false) (and (BDDbounded bs lr xr) (BDDbounded bs rr xr))))))))) *) (* Goal: BDDbounded bs r x *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) intros H17 H18 H19. rewrite <- H19 in H16. exact (proj1 H16). (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) apply BDDbounded_lemma. assumption. (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x0 : BDDvar => @ex BDDvar (fun l0 : BDDvar => @ex BDDvar (fun r0 : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l0 r0)))) (and (@eq comparison (BDDcompare x0 (ad_S x)) Lt) (and (@eq bool (N.eqb l0 r0) false) (and (BDDbounded bs l0 x0) (BDDbounded bs r0 x0))))))))) *) (* Goal: BDD_OK bs node *) exact (proj2 (proj2 (proj2 H11))). apply BDDbounded_lemma. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) assumption. apply H8. unfold in_dom in |- *. simpl in H4. rewrite H4. trivial. Qed. (* An interpretation of BDDvar's *) Definition var_binding := BDDvar -> bool. (* A boolean function. However not all boolean functions represent a logical formula. *) Definition bool_fun := var_binding -> bool. (* Evaluation of a boolean function given a binding of variables *) Definition bool_fun_eval (bf : bool_fun) (vb : var_binding) := bf vb. (* The boolean functions representing ZERO and ONE *) Definition bool_fun_zero (vb : var_binding) := false. Definition bool_fun_one (vb : var_binding) := true. Fixpoint bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : bool_fun := match MapGet _ (fst cfg) node with | None => if Neqb node BDDzero then bool_fun_zero else bool_fun_one | Some (x, (l, r)) => match bound with | O => (* Error *) bool_fun_zero | S bound' => let bfl := bool_fun_of_BDD_1 cfg l bound' in let bfr := bool_fun_of_BDD_1 cfg r bound' in fun vb : var_binding => if vb x then bfr vb else bfl vb end end. Lemma bool_fun_of_BDD_1_semantics : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall bound : nat, bool_fun_of_BDD_1 cfg BDDzero bound = bool_fun_zero /\ bool_fun_of_BDD_1 cfg BDDone bound = bool_fun_one /\ (forall node : ad, is_internal_node cfg node -> nat_of_N (var cfg node) < bound -> forall vb : var_binding, (vb (var cfg node) = true -> bool_fun_eval (bool_fun_of_BDD_1 cfg node bound) vb = bool_fun_eval (bool_fun_of_BDD_1 cfg (high cfg node) (pred bound)) vb) /\ (vb (var cfg node) = false -> bool_fun_eval (bool_fun_of_BDD_1 cfg node bound) vb = bool_fun_eval (bool_fun_of_BDD_1 cfg (low cfg node) (pred bound)) vb)). Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (bound : nat) (node : ad) (_ : lt (N.to_nat (var cfg node)) bound), @eq bool_fun (bool_fun_of_BDD_1 cfg node bound) (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (bound : nat) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)) bound), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node bound) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)))) *) intros share counter. intro H. simple induction bound. split. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) unfold bool_fun_of_BDD_1 in |- *. elim H. intros H0 H1. elim H0. intros H2 H3. simpl in |- *. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) rewrite H2. trivial. split. elim H. intros H0 H1. elim H0. intros H2 H3. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. rewrite (proj1 H3). trivial. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) unfold is_internal_node in |- *. intro node. intro H0. unfold var in |- *. elim H0. clear H0. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) intros x H0. elim H0. clear H0. intros l H0. elim H0. clear H0. (* Goal: forall (x0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l x0)))) (_ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) intros r H0. rewrite H0. intro H1. cut (~ nat_of_N x < 0). (* Goal: and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) unfold not in |- *. tauto. apply lt_n_O. intros n H0. elim H. intros H1 H2. elim H1. (* Goal: and (@eq bool_fun (bool_fun_of_BDD_1 cfg BDDone (S (N.to_nat (var cfg BDDone)))) bool_fun_one) (forall (node : ad) (_ : is_internal_node cfg node), @eq bool_fun (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb)) *) intros H3 H4. elim H4. intros H5 H6. split. unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) rewrite H3. trivial. split. unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite H5. trivial. intro node. intro H7. unfold is_internal_node in H7. (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) elim H7. clear H7. intro x. intro H7. elim H7. clear H7. intro x0. intro H7. (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb) *) elim H7. clear H7. intro x1. intro H7. unfold var in |- *. rewrite H7. intro H8. (* Goal: forall _ : @eq bool (vb x) false, @eq bool (bool_fun_eval (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) vb) (bool_fun_eval (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n))) vb) *) intro vb. split. intro H9. unfold bool_fun_of_BDD_1 in |- *. rewrite H7. (* Goal: @eq bool_fun (fun vb : var_binding => if vb x then (fix bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : bool_fun := match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => match bound with | O => bool_fun_zero | S bound' => fun vb0 : var_binding => if vb0 x then bool_fun_of_BDD_1 cfg r bound' vb0 else bool_fun_of_BDD_1 cfg l bound' vb0 end | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 n vb else (fix bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : bool_fun := match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => match bound with | O => bool_fun_zero | S bound' => fun vb0 : var_binding => if vb0 x then bool_fun_of_BDD_1 cfg r bound' vb0 else bool_fun_of_BDD_1 cfg l bound' vb0 end | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 n vb) (fun vb : var_binding => if vb x then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 n vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end n vb) *) unfold high in |- *. rewrite H7. unfold pred in |- *. unfold bool_fun_eval in |- *. rewrite H9. (* Goal: forall _ : @eq bool (vb x) false, @eq bool (bool_fun_eval (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) vb) (bool_fun_eval (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n))) vb) *) trivial. intro H9. unfold bool_fun_of_BDD_1 in |- *. rewrite H7. (* Goal: @eq bool_fun (fun vb : var_binding => if vb x then (fix bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : bool_fun := match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => match bound with | O => bool_fun_zero | S bound' => fun vb0 : var_binding => if vb0 x then bool_fun_of_BDD_1 cfg r bound' vb0 else bool_fun_of_BDD_1 cfg l bound' vb0 end | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 n vb else (fix bool_fun_of_BDD_1 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : bool_fun := match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => match bound with | O => bool_fun_zero | S bound' => fun vb0 : var_binding => if vb0 x then bool_fun_of_BDD_1 cfg r bound' vb0 else bool_fun_of_BDD_1 cfg l bound' vb0 end | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 n vb) (fun vb : var_binding => if vb x then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 n vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end n vb) *) unfold bool_fun_eval in |- *. rewrite H9. unfold pred in |- *. unfold low in |- *. rewrite H7. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) trivial. Qed. Lemma bool_fun_of_BDD_1_semantics_1 : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall bound : nat, bool_fun_of_BDD_1 cfg BDDzero bound = bool_fun_zero /\ bool_fun_of_BDD_1 cfg BDDone bound = bool_fun_one /\ (forall node : ad, is_internal_node cfg node -> nat_of_N (var cfg node) < bound -> bool_fun_of_BDD_1 cfg node bound = (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (pred bound) vb else bool_fun_of_BDD_1 cfg (low cfg node) (pred bound) vb)). Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (bound : nat) (node : ad) (_ : lt (N.to_nat (var cfg node)) bound), @eq bool_fun (bool_fun_of_BDD_1 cfg node bound) (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (bound : nat) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)) bound), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node bound) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)))) *) intros share counter. intro H. simple induction bound. split. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) unfold bool_fun_of_BDD_1 in |- *. elim H. intros H0 H1. elim H0. intros H2 H3. simpl in |- *. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) rewrite H2. trivial. split. elim H. intros H0 H1. elim H0. intros H2 H3. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. rewrite (proj1 H3). trivial. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) unfold is_internal_node in |- *. intro node. intro H0. unfold var in |- *. elim H0. clear H0. (* Goal: forall _ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O, @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) intros x H0. elim H0. clear H0. intros l H0. elim H0. clear H0. (* Goal: forall (x0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l x0)))) (_ : lt (N.to_nat match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) O), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node O) (fun vb : var_binding => if vb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred O) vb) *) (* Goal: forall (n : nat) (_ : and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero n) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb)))), and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) intros r H0. rewrite H0. intro H1. cut (~ nat_of_N x < 0). unfold not in |- *. (* Goal: and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero (S n)) bool_fun_zero) (and (@eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n)) bool_fun_one) (forall (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb))) *) tauto. apply lt_n_O. intros n H0. elim H. intros H1 H2. elim H1. intros H3 H4. elim H4. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) intros H5 H6. split. unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. rewrite H3. trivial. (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) split. unfold bool_fun_of_BDD_1 in |- *. simpl in |- *. rewrite H5. trivial. intro node. (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H7. unfold is_internal_node in H7. elim H7. clear H7. intro x. intro H7. (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) elim H7. clear H7. intro x0. intro H7. elim H7. clear H7. intro x1. intro H7. (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S n)) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S n)) vb) *) unfold var in |- *. rewrite H7. intro H8. unfold pred in |- *. unfold bool_fun_of_BDD_1 at 1 in |- *. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) rewrite H7. unfold high in |- *. rewrite H7. unfold low in |- *. rewrite H7. trivial. Qed. Lemma bool_fun_of_BDD_1_semantics_2 : forall (cfg : BDDconfig) (node : ad) (bound1 bound2 : nat), MapGet _ (fst cfg) node = None -> bool_fun_of_BDD_1 cfg node bound1 = bool_fun_of_BDD_1 cfg node bound2. Proof. (* Goal: @eq bool_fun (fun _ : var_binding => negb true) (fun _ : var_binding => false) *) intros cfg node bound1 bound2 H. case bound1. simpl in |- *. case bound2. simpl in |- *. reflexivity. simpl in |- *. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) rewrite H. trivial. simpl in |- *. rewrite H. case bound2. simpl in |- *. rewrite H. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) trivial. simpl in |- *. rewrite H. trivial. Qed. Lemma bool_fun_of_BDD_1_change_bound : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall (bound : nat) (node : ad), nat_of_N (var cfg node) < bound -> bool_fun_of_BDD_1 cfg node bound = bool_fun_of_BDD_1 cfg node (S (nat_of_N (var cfg node))). Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (bound : nat) (node : ad) (_ : lt (N.to_nat (var cfg node)) bound), @eq bool_fun (bool_fun_of_BDD_1 cfg node bound) (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (bound : nat) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)) bound), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node bound) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) node)))) *) intros share counter. intro H. intro bound. apply lt_wf_ind with (P := fun bound : nat => forall node : ad, nat_of_N (var (bs, (share, counter)) node) < bound -> bool_fun_of_BDD_1 (bs, (share, counter)) node bound = bool_fun_of_BDD_1 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))). (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) m), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node m) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (node : ad) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intros n H0 node H1. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) node)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intros y. elim y. clear y. intro x. elim x. clear x. intros x y. elim y. (* Goal: forall (a b : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad a b)))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) clear y. intros l r. intros y. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (is_internal_node (bs, (share, counter)) node). intro H2. cut (bool_fun_of_BDD_1 (bs, (share, counter)) node n = (fun vb : var_binding => match vb (var (bs, (share, counter)) node) with | true => bool_fun_of_BDD_1 (bs, (share, counter)) (high (bs, (share, counter)) node) (pred n) vb | false => bool_fun_of_BDD_1 (bs, (share, counter)) (low (bs, (share, counter)) node) (pred n) vb end)). (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node)))) vb) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H3. rewrite H3. cut (bool_fun_of_BDD_1 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))) = (fun vb : var_binding => match vb (var (bs, (share, counter)) node) with | true => bool_fun_of_BDD_1 (bs, (share, counter)) (high (bs, (share, counter)) node) (pred (S (nat_of_N (var (bs, (share, counter)) node)))) vb | false => bool_fun_of_BDD_1 (bs, (share, counter)) (low (bs, (share, counter)) node) (pred (S (nat_of_N (var (bs, (share, counter)) node)))) vb end)). (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H4. rewrite H4. unfold pred at 3 4 in |- *. cut (bool_fun_of_BDD_1 (bs, (share, counter)) (high (bs, (share, counter)) node) (pred n) = bool_fun_of_BDD_1 (bs, (share, counter)) (high (bs, (share, counter)) node) (nat_of_N (var (bs, (share, counter)) node))). (* Goal: @eq bool_fun (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H5. rewrite H5. cut (bool_fun_of_BDD_1 (bs, (share, counter)) (low (bs, (share, counter)) node) (pred n) = bool_fun_of_BDD_1 (bs, (share, counter)) (low (bs, (share, counter)) node) (nat_of_N (var (bs, (share, counter)) node))). (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) intro H6. rewrite H6. trivial. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) (low (bs, (share, counter)) node))). (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) x)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intros y0. elim y0. clear y0. intro x0. elim x0. clear x0. intros xl y0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) elim y0. clear y0. intros ll rl. intros y0. cut (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node)) < pred n). (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H6. cut (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node)) < nat_of_N (var (bs, (share, counter)) node)). (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H7. clear H3 H4 H5. cut (pred n < n). intro H3. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (Init.Nat.pred n) n *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite (H0 (pred n) H3 (low (bs, (share, counter)) node) H6). rewrite (H0 (nat_of_N (var (bs, (share, counter)) node)) H1 (low (bs, (share, counter)) node) H7). (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) trivial. apply lt_pred_n_n. apply neq_O_lt. unfold not in |- *. intro H3. (* Goal: False *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite <- H3 in H1. (* Goal: not (@eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (~ nat_of_N (var (bs, (share, counter)) node) < 0). unfold not in |- *. (* Goal: forall _ : forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O, False, False *) (* Goal: not (lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) tauto. apply lt_n_O. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. assumption. unfold is_internal_node in |- *. split with xl. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with ll. split with rl. assumption. apply le_lt_trans with (m := pred (nat_of_N (var (bs, (share, counter)) node))). (* Goal: forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (forall x y : nat, x < y -> x <= pred y). intro H6. apply H6. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. assumption. (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) unfold is_internal_node in |- *. split with xl. split with ll. split with rl. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold lt in |- *. double induction x0 y1. auto. intro n0. intros H6 H7. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) auto with arith. auto with arith. intros n0 H6 n1 H7 H8. unfold pred in |- *. auto with arith. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply lt_pred. assumption. unfold not in |- *. intro H6. (* Goal: False *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (var (bs, (share, counter)) node = N0). (* Goal: and (forall _ : @eq bool false true, @eq bool true false) (forall _ : @eq bool false false, @eq bool true true) *) cut (var (bs, (share, counter)) node <> N0). auto. apply INFERIEUR_neq_O with (x := var (bs, (share, counter)) (low (bs, (share, counter)) node)). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply BDDvar_ordered_low. assumption. assumption. split with xl. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with ll. split with rl. assumption. apply O_N0. assumption. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intros y0. apply bool_fun_of_BDD_1_semantics_2. assumption. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) (high (bs, (share, counter)) node))). (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) x)), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intros y0. elim y0. clear y0. intro x0. elim x0. clear x0. intros xr y0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) elim y0. clear y0. intros lr rr. intros y0. cut (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node)) < pred n). (* Goal: forall _ : @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O, False *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) intro H5. cut (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node)) < nat_of_N (var (bs, (share, counter)) node)). (* Goal: forall _ : lt (N.to_nat (var cfg (low cfg node))) (N.to_nat (var cfg node)), @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: lt (N.to_nat (var cfg (low cfg node))) (N.to_nat (var cfg node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (low cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H6. clear H3 H4. cut (pred n < n). intro H3. rewrite (H0 (nat_of_N (var (bs, (share, counter)) node)) H1 (high (bs, (share, counter)) node) H6). (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) rewrite (H0 (pred n) H3 (high (bs, (share, counter)) node) H5). trivial. (* Goal: not (@eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) apply lt_pred_n_n. apply neq_O_lt. unfold not in |- *. intro H3. (* Goal: False *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) rewrite <- H3 in H1. (* Goal: not (@eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (~ nat_of_N (var (bs, (share, counter)) node) < 0). unfold not in |- *. (* Goal: forall _ : forall _ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O, False, False *) (* Goal: not (lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (Init.Nat.pred n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) tauto. apply lt_n_O. apply BDDcompare_lt. apply BDDvar_ordered_high. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. assumption. unfold is_internal_node in |- *. split with xr. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with lr. split with rr. assumption. apply le_lt_trans with (m := pred (nat_of_N (var (bs, (share, counter)) node))). (* Goal: forall _ : @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) O, False *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (forall x y : nat, x < y -> x <= pred y). intro H5. apply H5. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. assumption. (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) unfold is_internal_node in |- *. split with xr. split with lr. split with rr. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold lt in |- *. double induction x0 y1. auto. intro n0. intros H5 H6. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) auto with arith. auto with arith. intros n0 H5 n1 H6 H7. unfold pred in |- *. auto with arith. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply lt_pred. assumption. unfold not in |- *. intro H5. (* Goal: False *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n)) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) vb) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (fun vb : var_binding => if vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb else bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (Init.Nat.pred n) vb) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (bool_fun_of_BDD_1 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) *) cut (var (bs, (share, counter)) node = N0). (* Goal: and (forall _ : @eq bool false true, @eq bool true false) (forall _ : @eq bool false false, @eq bool true true) *) cut (var (bs, (share, counter)) node <> N0). auto. apply INFERIEUR_neq_O with (x := var (bs, (share, counter)) (high (bs, (share, counter)) node)). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply BDDvar_ordered_high. assumption. assumption. split with xr. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with lr. split with rr. assumption. apply O_N0. assumption. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro y0. apply bool_fun_of_BDD_1_semantics_2. assumption. apply (proj2 (proj2 (bool_fun_of_BDD_1_semantics_1 (bs, (share, counter)) H (S (nat_of_N (var (bs, (share, counter)) node)))))). (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) unfold is_internal_node in |- *. split with x. split with l. split with r. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. auto with arith. apply (proj2 (proj2 (bool_fun_of_BDD_1_semantics_1 (bs, (share, counter)) H n))). (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) unfold is_internal_node in |- *. split with x. split with l. split with r. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. auto with arith. unfold is_internal_node in |- *. split with x. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with l. split with r. assumption. intros y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) apply bool_fun_of_BDD_1_semantics_2. assumption. Qed. Definition bool_fun_of_BDD (cfg : BDDconfig) (node : ad) := bool_fun_of_BDD_1 cfg node (S (nat_of_N (var cfg node))). Lemma bool_fun_of_BDD_semantics : forall cfg : BDDconfig, BDDconfig_OK cfg -> bool_fun_of_BDD cfg BDDzero = bool_fun_zero /\ bool_fun_of_BDD cfg BDDone = bool_fun_one /\ (forall node : ad, is_internal_node cfg node -> bool_fun_of_BDD cfg node = (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb else bool_fun_of_BDD cfg (low cfg node) vb)). Proof. (* Goal: and (@eq bool_fun (bool_fun_of_BDD_1 cfg BDDone (S (N.to_nat (var cfg BDDone)))) bool_fun_one) (forall (node : ad) (_ : is_internal_node cfg node), @eq bool_fun (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb)) *) intros cfg H. unfold bool_fun_of_BDD in |- *. split. apply (proj1 (bool_fun_of_BDD_1_semantics_1 cfg H (S (nat_of_N (var cfg BDDzero))))). (* Goal: and (@eq bool_fun (bool_fun_of_BDD_1 cfg BDDone (S (N.to_nat (var cfg BDDone)))) bool_fun_one) (forall (node : ad) (_ : is_internal_node cfg node), @eq bool_fun (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb)) *) split. apply (proj1 (proj2 (bool_fun_of_BDD_1_semantics_1 cfg H (S (nat_of_N (var cfg BDDone)))))). (* Goal: forall (node : ad) (_ : is_internal_node cfg node), @eq bool_fun (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb) *) intros node H0. cut (nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). (* Goal: forall _ : lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))), @eq bool_fun (bool_fun_of_BDD_1 cfg node (S (N.to_nat (var cfg node)))) (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node)))) vb else bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node)))) vb) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H1. rewrite (proj2 (proj2 (bool_fun_of_BDD_1_semantics_1 cfg H (S (nat_of_N (var cfg node))))) node H0 H1). cut (bool_fun_of_BDD_1 cfg (high cfg node) (pred (S (nat_of_N (var cfg node)))) = bool_fun_of_BDD_1 cfg (high cfg node) (S (nat_of_N (var cfg (high cfg node))))). (* Goal: forall _ : lt (N.to_nat (var cfg (high cfg node))) (N.to_nat (var cfg node)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg (high cfg node))) (N.to_nat (var cfg node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H2. cut (bool_fun_of_BDD_1 cfg (low cfg node) (pred (S (nat_of_N (var cfg node)))) = bool_fun_of_BDD_1 cfg (low cfg node) (S (nat_of_N (var cfg (low cfg node))))). (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) intro H3. rewrite H2. rewrite H3. trivial. unfold pred in |- *. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) elim (option_sum _ (MapGet _ (fst cfg) (low cfg node))). intros y. elim y. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) clear y. intro x. elim x. clear x. intros x y. elim y. clear y. (* Goal: forall (a b : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad a b)))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intros l r. intro y. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (low cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) cut (nat_of_N (var cfg (low cfg node)) < nat_of_N (var cfg node)). (* Goal: forall _ : lt (N.to_nat (var cfg (low cfg node))) (N.to_nat (var cfg node)), @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: lt (N.to_nat (var cfg (low cfg node))) (N.to_nat (var cfg node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (low cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (low cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (low cfg node) (S (N.to_nat (var cfg (low cfg node))))) *) (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (Init.Nat.pred (S (N.to_nat (var cfg node))))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H3. rewrite (bool_fun_of_BDD_1_change_bound cfg H (nat_of_N (var cfg node)) (low cfg node) H3). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) trivial. apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold is_internal_node in |- *. split with x. split with l. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with r. assumption. intros y. apply bool_fun_of_BDD_1_semantics_2. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold pred in |- *. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) elim (option_sum _ (MapGet _ (fst cfg) (high cfg node))). intros y. elim y. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) clear y. intro x. elim x. clear x. intros x y. elim y. clear y. (* Goal: forall (a b : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad a b)))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intros l r. intro y. (* Goal: @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) cut (nat_of_N (var cfg (high cfg node)) < nat_of_N (var cfg node)). (* Goal: forall _ : lt (N.to_nat (var cfg (high cfg node))) (N.to_nat (var cfg node)), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg (high cfg node))) (N.to_nat (var cfg node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))), @eq bool_fun (bool_fun_of_BDD_1 cfg (high cfg node) (N.to_nat (var cfg node))) (bool_fun_of_BDD_1 cfg (high cfg node) (S (N.to_nat (var cfg (high cfg node))))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) intro H2. rewrite (bool_fun_of_BDD_1_change_bound cfg H (nat_of_N (var cfg node)) (high cfg node) H2). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) trivial. apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold is_internal_node in |- *. split with x. split with l. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) split with r. assumption. intros y. apply bool_fun_of_BDD_1_semantics_2. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) (high cfg node)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) assumption. unfold lt in |- *. auto. Qed. Definition bool_fun_eq (bf1 bf2 : bool_fun) := forall vb : var_binding, bool_fun_eval bf1 vb = bool_fun_eval bf2 vb. Lemma bool_fun_eq_symm : forall bf1 bf2 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq bf2 bf1. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb)) (vb : var_binding), @eq bool (bool_fun_eval (fun vb0 : var_binding => negb (bf1 vb0)) vb) (bool_fun_eval (fun vb0 : var_binding => negb (bf2 vb0)) vb) *) unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. intros bf1 bf2 H vb. rewrite (H vb). (* Goal: @eq bool (if bf2 vb then false else true) (if bf2 vb then false else true) *) reflexivity. Qed. Lemma bool_fun_eq_trans : forall bf1 bf2 bf3 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq bf2 bf3 -> bool_fun_eq bf1 bf3. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb)) (vb : var_binding), @eq bool (bool_fun_eval (fun vb0 : var_binding => negb (bf1 vb0)) vb) (bool_fun_eval (fun vb0 : var_binding => negb (bf2 vb0)) vb) *) unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. intros bf1 bf2 bf3 H H0 vb. rewrite (H vb). (* Goal: @eq bool (if bf2 vb then false else true) (if bf2 vb then false else true) *) rewrite <- (H0 vb). reflexivity. Qed. Definition bool_fun_neg (bf : bool_fun) : bool_fun := fun vb : var_binding => negb (bf vb). Definition bool_fun_or (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_binding => bf1 vb || bf2 vb. Lemma bool_fun_neg_semantics : forall (bf : bool_fun) (vb : var_binding), (bool_fun_eval bf vb = true -> bool_fun_eval (bool_fun_neg bf) vb = false) /\ (bool_fun_eval bf vb = false -> bool_fun_eval (bool_fun_neg bf) vb = true). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb)) (vb : var_binding), @eq bool (bool_fun_eval (fun vb0 : var_binding => negb (bf1 vb0)) vb) (bool_fun_eval (fun vb0 : var_binding => negb (bf2 vb0)) vb) *) intros bf vb. unfold bool_fun_eval in |- *. unfold bool_fun_neg in |- *. unfold negb in |- *. (* Goal: and (forall _ : @eq bool false true, @eq bool true false) (forall _ : @eq bool false false, @eq bool true true) *) elim (bf vb). auto. auto. Qed. Lemma bool_fun_neg_zero : bool_fun_neg bool_fun_zero = bool_fun_one. Proof. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) unfold bool_fun_neg, bool_fun_zero, bool_fun_one in |- *. simpl in |- *. trivial. Qed. Lemma bool_fun_neg_one : bool_fun_neg bool_fun_one = bool_fun_zero. Proof. (* Goal: @eq bool_fun (fun _ : var_binding => false) (fun _ : var_binding => false) *) unfold bool_fun_neg, bool_fun_zero, bool_fun_one in |- *. simpl in |- *. trivial. Qed. Lemma bool_fun_eq_neg : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_neg bf1) (bool_fun_neg bf2) -> bool_fun_eq bf1 bf2. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb)) (vb : var_binding), @eq bool (bool_fun_eval (fun vb0 : var_binding => negb (bf1 vb0)) vb) (bool_fun_eval (fun vb0 : var_binding => negb (bf2 vb0)) vb) *) unfold bool_fun_eq, bool_fun_neg in |- *. unfold bool_fun_eval in |- *. intros bf1 bf2 H vb. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bf1 vb) (bf2 vb)) (vb : var_binding), @eq bool (negb (bf1 vb)) (negb (bf2 vb)) *) cut (negb (bf1 vb) = negb (bf2 vb)). unfold negb in |- *. elim (bf1 vb). (* Goal: forall _ : @eq bool true true, @eq bool false false *) (* Goal: @eq bool (negb (bf1 vb)) (negb (bf2 vb)) *) elim (bf2 vb). intro H0. reflexivity. intro H0. rewrite H0. reflexivity. (* Goal: forall _ : @eq bool true true, @eq bool false false *) (* Goal: @eq bool (negb (bf1 vb)) (negb (bf2 vb)) *) elim (bf2 vb). intro H0. rewrite H0. reflexivity. intro H0. reflexivity. (* Goal: @eq bool (negb (bf1 vb)) (negb (bf2 vb)) *) apply H. Qed. Lemma bool_fun_eq_neg_1 : forall bf1 bf2 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_neg bf1) (bool_fun_neg bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (_ : forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb)) (vb : var_binding), @eq bool (bool_fun_eval (fun vb0 : var_binding => negb (bf1 vb0)) vb) (bool_fun_eval (fun vb0 : var_binding => negb (bf2 vb0)) vb) *) unfold bool_fun_eq, bool_fun_neg in |- *. unfold bool_fun_eval in |- *. unfold negb in |- *. intros bf1 bf2 H vb. (* Goal: @eq bool (if bf2 vb then false else true) (if bf2 vb then false else true) *) rewrite (H vb). reflexivity. Qed. Definition BDDneg_memo := Map ad. Definition BDDneg_memo_lookup (memo : BDDneg_memo) (a : ad) := MapGet _ memo a. Definition BDDneg_memo_put (memo : BDDneg_memo) (a node : ad) := MapPut _ memo a node. Definition BDDneg_memo_OK (cfg : BDDconfig) (memo : BDDneg_memo) := forall a node : ad, BDDneg_memo_lookup memo a = Some node -> config_node_OK cfg node /\ bool_fun_of_BDD cfg node = bool_fun_neg (bool_fun_of_BDD cfg a) /\ var cfg a = var cfg node. Fixpoint BDDneg_2 (cfg : BDDconfig) (node : ad) (bound : nat) {struct bound} : BDDconfig * ad := match MapGet _ (fst cfg) node with | None => if Neqb node BDDzero then (cfg, BDDone) else (cfg, BDDzero) | Some (x, (l, r)) => match bound with | O => (* Error *) (initBDDconfig, BDDzero) | S bound' => BDDmake (fst (BDDneg_2 (fst (BDDneg_2 cfg l bound')) r bound')) x (snd (BDDneg_2 cfg l bound')) (snd (BDDneg_2 (fst (BDDneg_2 cfg l bound')) r bound')) end end. (* Lemma BDDneg_2_lemma : (bound:nat)(cfg:BDDconfig)(node:ad) (BDDconfig_OK cfg) -> (config_node_OK cfg node) -> ( (is_internal_node cfg node) -> (lt (nat_of_N (var cfg node)) bound) ) -> (BDDconfig_OK (Fst (BDDneg_2 cfg node bound))) /\ ( (x:BDDvar)(l,r,a:ad) (MapGet ? (Fst cfg) a)=(Some (x,(l,r))) -> (MapGet ? (Fst (Fst (BDDneg_2 cfg node bound))) a)= (Some (x,(l,r))) ) /\ ( (is_internal_node cfg node) -> (is_internal_node (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) /\ (var cfg node)=(var (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) ) /\ (config_node_OK (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) /\ (bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) (bool_fun_neg (bool_fun_of_BDD cfg node))). Proof. Intro. Apply lt_wf_ind with P:=[bound:nat] (cfg:BDDconfig; node:ad) (BDDconfig_OK cfg) ->(config_node_OK cfg node) ->((is_internal_node cfg node) ->(lt (nat_of_N (var cfg node)) bound)) ->(BDDconfig_OK (Fst (BDDneg_2 cfg node bound))) /\((x:BDDvar; l,r,a:ad) (MapGet ? (Fst cfg) a)=(Some (x,(l,r))) ->(MapGet ? (Fst (Fst (BDDneg_2 cfg node bound))) a) =(Some (x,(l,r)))) /\((is_internal_node cfg node) ->(is_internal_node (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) /\(var cfg node) =(var (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound)))) /\(config_node_OK (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) /\ (bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 cfg node bound)) (Snd (BDDneg_2 cfg node bound))) (bool_fun_neg (bool_fun_of_BDD cfg node))). Intro. Elim n. Intro. Intro. Elim cfg. Clear cfg. Intros bs y. Elim y. Clear y. Intros share counter. Intros. Unfold BDDneg_2. Elim (option_sum ? (MapGet BDDvar*ad*ad (Fst (bs,(share,counter))) node)). Intros. Elim y. Clear y. Intro y. Elim y. Clear y. Intros x y. Elim y. Clear y. (* Goal: and (forall _ : @eq bool false true, @eq bool true false) (forall _ : @eq bool false false, @eq bool true true) *) Intros l r. Intro. Cut False. Tauto. Cut ~(lt (nat_of_N (var (bs,(share,counter)) node)) (0)). Unfold not. Intro. Apply H3. Apply H2. Unfold is_internal_node. Split with x. Split with l. Split with r. Assumption. Apply lt_n_O. Intro. Rewrite y. Elim H1. Intro. Rewrite H3. Simpl. Split. Exact H0. Split. Intros. Assumption. Split. Split. Unfold is_internal_node in H4. Elim H4. Intros. Elim H5. Intros. Elim H6. Intros. Rewrite H3 in y. Rewrite y in H7. Discriminate H7. Unfold is_internal_node in H4. Elim H4. Intros. Elim H5. Intros. Elim H6. Intros. Rewrite H3 in y. Rewrite y in H7. Discriminate H7. Split. Right. Left. Reflexivity. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (bs,(share, counter)) H0)). Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H0))). Unfold bool_fun_eq. Unfold bool_fun_eval. Unfold bool_fun_one bool_fun_zero bool_fun_neg. Simpl. Reflexivity. Intro. Elim H3. Clear H3. Intro. Rewrite H3. Simpl. Split. Exact H0. Split. Intros. Assumption. Split. Split. Unfold is_internal_node in H4. Elim H4. Intros. Elim H5. Intros. Elim H6. Intros. Rewrite H3 in y. Rewrite y in H7. Discriminate H7. Unfold is_internal_node in H4. Elim H4. Intros. Elim H5. Intros. Elim H6. Intros. Rewrite H3 in y. Rewrite y in H7. Discriminate H7. Split. Left. Reflexivity. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H0)). Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H0))). Unfold bool_fun_eq. Unfold bool_fun_eval bool_fun_zero bool_fun_one bool_fun_neg. Reflexivity. Clear H3. Intro. Unfold in_dom in H3. Rewrite y in H3. Discriminate H3. Intro. Intro. Intro. Intro cfg. Elim cfg. Clear cfg. Intros bs y. Elim y. Clear y. Intros share counter. Intros. Elim H2. Intro. Rewrite H4. Unfold BDDneg_2. (Simpl; Rewrite (proj1 ? ? (proj1 ? ? H1))). Split. Exact H1. Split. Intros. Exact H5. Split. Intros. Unfold is_internal_node in H5. (Elim H5; Intros; Elim H6; Intros; Elim H7; Intros). Simpl in H8. Rewrite (proj1 ? ? (proj1 ? ? H1)) in H8. Discriminate H8. Split. Simpl. Right. Left. Reflexivity. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1)). Simpl. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1))). Unfold bool_fun_eq. Reflexivity. (Intro; Elim H4; Clear H4; Intro). Rewrite H4. (Simpl; Rewrite (proj1 ? ? (proj2 ? ? (proj1 ? ? H1)))). Split. Unfold BDDneg_2. Exact H1. Split. Intros. Exact H5. Split. Intro. Unfold is_internal_node in H5. (Elim H5; Intros). (Elim H6; Intros; Elim H7; Intros). (Simpl in H8; Rewrite (proj1 ? ? (proj2 ? ? (proj1 ? ? H1))) in H8; Discriminate H8). Split. Simpl. (Left; Reflexivity). (Simpl; Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1)); Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1)))). Unfold bool_fun_eq. Reflexivity. Elim (option_sum ? (MapGet ? (Fst (bs,(share,counter))) node)). (Intros; Elim y; Clear y; Intro y; Elim y; Clear y; Intros x y; Elim y; Clear y; Intros l r). Intro. Cut (config_node_OK (bs,(share,counter)) l). Cut (config_node_OK (bs,(share, counter)) r). Intros. Simpl in y. (Unfold BDDneg_2; Simpl; Rewrite y; Fold BDDneg_2). Cut (is_internal_node (bs,(share,counter)) l) ->(lt (nat_of_N (var (bs,(share,counter)) l)) n0). Cut (BDDconfig_OK (Fst (BDDneg_2 (bs, (share,counter)) l n0))) /\((x0:BDDvar; l0,r0,a:ad) (MapGet ? (Fst (bs,(share, counter))) a)=(Some (x0,(l0,r0))) ->(MapGet ? (Fst (Fst (BDDneg_2 (bs, (share,counter)) l n0))) a) =(Some (x0,(l0,r0)))) /\((is_internal_node (bs, (share,counter)) l) ->(is_internal_node (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) /\(var (bs,(share,counter)) l) =(var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share, counter)) l n0)))) /\(config_node_OK (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) /\(bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) (bool_fun_neg (bool_fun_of_BDD (bs,(share, counter)) l))). Intros. (Elim H7; Clear H7; Intros). (Elim H9; Clear H9; Intros). (Elim H10; Clear H10; Intros). (Elim H11; Clear H11; Intros). Cut (config_node_OK (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r). Cut (is_internal_node (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r) ->(lt (nat_of_N (var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r)) n0). Intros. Cut (BDDconfig_OK (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) /\((x0:BDDvar; l0,r0,a:ad) (MapGet ? (Fst (Fst (BDDneg_2 (bs,(share, counter)) l n0))) a) =(Some (x0,(l0,r0))) ->(MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) a)=(Some (x0,(l0,r0)))) /\((is_internal_node (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r) ->(is_internal_node (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) /\(var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r) =(var (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))) /\(config_node_OK (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) /\(bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) (bool_fun_neg (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r))). Intros. (Elim H15; Clear H15; Intros; Elim H16; Clear H16; Intros; Elim H17; Clear H17; Intros). Elim H18. Clear H18. Intros. Cut (node_OK (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Cut (node_OK (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))). Cut (xl:BDDvar; ll,rl:ad) (MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) =(Some (xl,(ll,rl))) ->(BDDcompare xl x)=INFERIEUR. Cut (xr:BDDvar; lr,rr:ad) (MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) =(Some (xr,(lr,rr))) ->(BDDcompare xr x) =INFERIEUR. Intros. Cut (BDDconfig_OK (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) /\((Neqb (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) =false ->(MapGet ? (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) =(Some (x, ((Snd (BDDneg_2 (bs,(share,counter)) l n0)), (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))))) /\((Neqb (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0))) =true ->(Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))=(Snd (BDDneg_2 (bs,(share,counter)) l n0))) /\((a,l',r':ad; x':BDDvar) ((MapGet ? (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) a)=(Some (x', (l',r'))) ->(MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) a)=(Some (x',(l',r'))) \/(Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))=a) /\((MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0))) a)=(Some (x',(l',r'))) ->(MapGet ? (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0))))) a)=(Some (x',(l',r'))))) /\(node_OK (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))). Intros. (Elim H24; Clear H24; Intros; Elim H25; Clear H25; Intros; Elim H26; Clear H26; Intros). (Elim H27; Clear H27; Intros). Split. Assumption. Cut (x0:BDDvar; l0,r0,a:ad) (MapGet BDDvar*ad*ad bs a)=(Some BDDvar*ad*ad (x0,(l0,r0))) ->(MapGet BDDvar*ad*ad (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0))))) a)=(Some BDDvar*ad*ad (x0,(l0,r0))). Intros. Split. Assumption. Cut (is_internal_node (bs,(share,counter)) node) ->(is_internal_node (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0))))) /\(var (bs,(share,counter)) node) =(var (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0)))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))). Intros. Split. Assumption. Cut (config_node_OK (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))). Intros. Split. Assumption. Cut (bool_fun_eq (bool_fun_of_BDD (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) (bool_fun_neg (bool_fun_of_BDD (bs, (share,counter)) l))). Intro. Cut (bool_fun_eq (bool_fun_of_BDD (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0)))) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0))) (bool_fun_neg (bool_fun_of_BDD (bs,(share,counter)) r))). Intro. Cut (Neqb (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) =false. Intro. Cut (MapGet BDDvar*ad*ad (Fst (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0))))) =(Some BDDvar*ad*ad (x, ((Snd (BDDneg_2 (bs, (share,counter)) l n0)), (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))). Intro. Cut (is_internal_node (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))) (Snd (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))))). Intro. Rewrite (proj2 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics ? H24)) ? H36). Cut (is_internal_node (bs,(share,counter)) node). Intro. Rewrite (proj2 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics ? H1)) ? H37). Unfold var high low. Rewrite H35. Simpl. Rewrite y. Unfold bool_fun_eq in H32. Unfold bool_fun_eval in H32. Unfold bool_fun_eq. Unfold bool_fun_eval. Unfold bool_fun_neg. Intro. Rewrite (H32 vb). Unfold bool_fun_eq in H33. Unfold bool_fun_eval in H33. Rewrite (H33 vb). (Elim (vb x); Reflexivity). Unfold is_internal_node. Split with x. Split with l. Split with r. Assumption. Unfold is_internal_node. Split with x. Split with (Snd (BDDneg_2 (bs,(share, counter)) l n0)). Split with (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0)). Assumption. Apply H25. Assumption. Cut ~(Neqb (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0))) =true. Elim (Neqb (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))). (* Goal: and (forall _ : @eq bool false true, @eq bool true false) (forall _ : @eq bool false false, @eq bool true true) *) Unfold not. Intro. Cut False. Tauto. Apply H34. Reflexivity. Intro. Reflexivity. Unfold not. Intro. Cut (Snd (BDDneg_2 (bs,(share, counter)) l n0)) =(Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)). Intro. Rewrite <- H35 in H33. Cut (bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (bs,(share,counter)) r)) (bool_fun_neg (bool_fun_of_BDD (bs, (share,counter)) l))). Intro. Cut (bool_fun_eq (bool_fun_of_BDD (bs,(share, counter)) r) (bool_fun_of_BDD (bs,(share,counter)) l)). Intro. Cut r=l. Intro. Cut (Neqb l r)=true. Intro. Elim H1. Intros. Elim H40. Intros. Elim H43. Intros. Cut (BDD_OK bs node). Unfold BDD_OK. Unfold BDDordered. Rewrite y. Intro. Cut node=BDDzero \/node=BDDone \/(EX x0:BDDvar | (EX l0:BDDvar | (EX r0:BDDvar | (MapGet ? bs node)=(Some (x0,(l0,r0))) /\(BDDcompare x0 (ad_S x))=INFERIEUR /\(Neqb l0 r0)=false /\(BDDbounded bs l0 x0)/\(BDDbounded bs r0 x0)))). Intro. Elim H47. Intro. Rewrite H48 in y. Rewrite y in H42. Discriminate H42. (Clear H47; Intro). Elim H47. Clear H47. Intro. (Rewrite H47 in y; Rewrite y in H44; Discriminate). Intro. Elim H48. Intros. (Elim H49; Intros; Elim H50; Intros). Elim H51. Intros. Rewrite y in H52. Injection H52. Intros. Rewrite <- H54 in H53. Rewrite <- H55 in H53. Rewrite H39 in H53. (Elim H53; Intros). (Elim H58; Intros). Discriminate H59. Apply BDDbounded_lemma. Assumption. Apply H45. Unfold in_dom. Rewrite y. Reflexivity. Rewrite H38. Apply Neqb_correct. Apply BDDunique with cfg:=(bs,(share,counter)). Assumption. Assumption. Assumption. Assumption. Apply bool_fun_eq_neg. Assumption. Apply bool_fun_eq_trans with bf2:=(bool_fun_of_BDD (Fst (BDDmake (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) x (Snd (BDDneg_2 (bs,(share, counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0)))) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Apply bool_fun_eq_symm. Assumption. Rewrite H35. Rewrite H35 in H32. Assumption. Apply Neqb_complete. Assumption. Apply bool_fun_eq_trans with bf2:=(bool_fun_of_BDD (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))). Apply bool_fun_preservation. Assumption. Assumption. Intros. Apply (proj2 ? ? (H27 a l0 r0 x0)). Assumption. Assumption. Apply bool_fun_eq_trans with bf2:=(bool_fun_neg (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r)). Assumption. Apply bool_fun_eq_neg_1. Apply bool_fun_preservation. Assumption. Assumption. Assumption. Assumption. Apply bool_fun_eq_trans with bf2:= (bool_fun_of_BDD (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Apply bool_fun_preservation. Assumption. Assumption. Intros. Apply (proj2 ? ? (H27 a l0 r0 x0)). Assumption. Assumption. Apply bool_fun_eq_trans with bf2 :=(bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Apply bool_fun_preservation. Assumption. Assumption. Assumption. Assumption. Assumption. Assumption. Intro. Elim (sumbool_of_bool (Neqb (Snd (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)))). Intro. Cut (Snd (BDDneg_2 (bs,(share,counter)) l n0)) =(Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) r n0)). Intro. Rewrite <- H31 in H19. Cut (bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) (bool_fun_neg (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r))). Intro. Cut (bool_fun_eq (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) (bool_fun_neg (bool_fun_of_BDD (bs,(share, counter)) r))). Intro. Cut (Neqb l r)=true. Intro. Elim H1. Intros. (Elim H35; Intros). (Elim H38; Intros). Cut (BDD_OK bs node). Unfold BDD_OK. Unfold BDDordered. Rewrite y. Intro. Cut node=BDDzero \/node=BDDone \/(EX x0:BDDvar | (EX l0:BDDvar | (EX r0:BDDvar | (MapGet ? bs node)=(Some (x0,(l0,r0))) /\(BDDcompare x0 (ad_S x))=INFERIEUR /\(Neqb l0 r0)=false /\(BDDbounded bs l0 x0)/\(BDDbounded bs r0 x0)))). Intro. (Elim H42; Intros). (Rewrite H43 in y; Rewrite y in H37; Discriminate). Elim H43. Intro. (Rewrite H44 in y; Rewrite y in H39; Discriminate). Intro. (Elim H44; Intros; Elim H45; Intros; Elim H46; Intros). (Elim H47; Intros; Elim H48; Intros; Elim H49; Intros). (Elim H51; Intros). (Rewrite y in H48; Injection H48). Intros. Rewrite <- H54 in H52. Rewrite <- H55 in H52. Rewrite H34 in H52. Discriminate H52. Apply BDDbounded_lemma. Assumption. Apply H40. Assumption. Cut l=r. Intro. (Rewrite H34; Apply Neqb_correct). Apply BDDunique with cfg:=(bs,(share,counter)). Assumption. Assumption. Assumption. Apply bool_fun_eq_neg. Apply bool_fun_eq_trans with bf2:= (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Apply bool_fun_eq_symm. Assumption. Assumption. Apply bool_fun_eq_trans with bf2:=(bool_fun_neg (bool_fun_of_BDD (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r)). Assumption. Apply bool_fun_eq_neg_1. Apply bool_fun_preservation. Assumption. Assumption. Assumption. Assumption. Apply bool_fun_eq_trans with bf2:=(bool_fun_of_BDD (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))). Rewrite <- H31. Apply bool_fun_eq_symm. Apply bool_fun_preservation. Assumption. Assumption. Intros. Apply H16. Assumption. Assumption. Rewrite <- H31. Assumption. Apply Neqb_complete. Assumption. Intro. Unfold is_internal_node var. Rewrite (H25 y0). Simpl. Rewrite y. Split. Split with x. Split with (Snd (BDDneg_2 (bs,(share,counter)) l n0)). Split with (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)). Reflexivity. Reflexivity. Intros. Apply (proj2 ? ? (H27 a l0 r0 x0)). Apply H16. Apply H9. Exact H29. Apply BDDmake_semantics. Assumption. Assumption. Assumption. Assumption. Assumption. Intros. Elim H5. Intro. Rewrite H21 in H19. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (bs,(share,counter)) l n0)) H7)) in H19. Rewrite bool_fun_neg_zero in H19. Rewrite H21 in H15. Rewrite <- (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) BDDzero n0)) H15))) in H19. Cut (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) BDDzero n0)) =BDDone. Intro. Rewrite H21 in H20. Rewrite H22 in H20. Rewrite (config_OK_one (Fst (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) BDDzero n0)) H15) in H20. Discriminate H20. Apply BDDunique with cfg:=(Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) BDDzero n0)). Assumption. Rewrite H21 in H18. Assumption. Right. Left. Reflexivity. Assumption. Intro. Elim H21. (Clear H21; Intro). Rewrite H21 in H19. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (bs,(share,counter)) l n0)) H7))) in H19. Rewrite bool_fun_neg_one in H19. Rewrite H21 in H15. Rewrite <- (proj1 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) BDDone n0)) H15)) in H19. Cut (Snd (BDDneg_2 (Fst (BDDneg_2 (bs, (share,counter)) l n0)) BDDone n0)) =BDDzero. Intro. Rewrite H21 in H20. Rewrite H22 in H20. Rewrite (config_OK_zero (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) BDDone n0)) H15) in H20. Discriminate H20. Apply BDDunique with cfg:=(Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) BDDone n0)). Assumption. Rewrite H21 in H18. Assumption. (Left; Reflexivity). Assumption. Intro. Unfold in_dom in H22. Elim (option_sum ? (MapGet BDDvar*ad*ad (Fst (bs,(share,counter))) r)). Intro. (Elim y0; Clear y0; Intro). (Elim x0; Clear x0; Intro; Intro). (Elim y1; Clear y1; Intros). Cut (is_internal_node (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r). Intro. Cut (var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r) =(var (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0)) (Snd (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))). Intro. Cut (var (bs,(share, counter)) r) =(var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r). Intro. Rewrite <- H25 in H24. Cut (BDDcompare (var (bs,(share,counter)) (high (bs, (share,counter)) node)) (var (bs,(share,counter)) node))=INFERIEUR. Unfold var high low. Simpl. Rewrite y. Simpl in y3. Rewrite y3. Unfold var in H24. Simpl in H24. Rewrite y3 in H24. Rewrite H20 in H24. Rewrite H24. Trivial. Apply BDDvar_ordered_high. Assumption. Unfold is_internal_node. (Split with x; Split with l; Split with r; Assumption). Unfold high. (Simpl; Rewrite y). (Split with y0; Split with y1; Split with y2; Assumption). Unfold var. Rewrite y3. Cut (MapGet BDDvar*ad*ad (Fst (Fst (BDDneg_2 (bs, (share,counter)) l n0))) r) =(Some (y0,(y1,y2))). Intro. Rewrite H25. Reflexivity. Apply H9. Assumption. Exact (proj2 ? ? (H17 H23)). Unfold is_internal_node. Split with y0. Split with y1. Split with y2. Rewrite (H9 y0 y1 y2 r). Reflexivity. Assumption. Intro. (Rewrite y0 in H22; Discriminate). Intros. Elim (option_sum ? (MapGet ? (Fst (bs,(share, counter))) l)). Intros. Elim y0. Clear y0. Intro. (Elim x0; Clear x0; Intro; Intro). (Elim y1; Clear y1; Intros). Cut (is_internal_node (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) /\(var (bs,(share,counter)) l) =(var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Intros. (Elim H21; Clear H21; Intros). Elim (option_sum ? (MapGet ? (Fst (Fst (BDDneg_2 (bs,(share, counter)) l n0))) (Snd (BDDneg_2 (bs,(share,counter)) l n0)))). Intros. (Elim y4; Clear y4; Intro). (Elim x0; Clear x0; Intro; Intro). (Elim y5; Clear y5; Intros). Unfold var in H22. Rewrite y3 in H22. Rewrite y7 in H22. Cut (MapGet BDDvar*ad*ad (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share, counter)) l n0)) r n0))) (Snd (BDDneg_2 (bs,(share,counter)) l n0))) =(Some BDDvar*ad*ad (y4,(y5,y6))). Intros. Rewrite H20 in H23. Injection H23. Intros. Rewrite H26. Rewrite <- H22. Cut (BDDcompare (var (bs,(share,counter)) (low (bs,(share,counter)) node)) (var (bs,(share,counter)) node))=INFERIEUR. Unfold var high low. Simpl. Rewrite y. Simpl in y3. Rewrite y3. Trivial. Apply BDDvar_ordered_low. Assumption. Unfold is_internal_node. (Split with x; Split with l; Split with r). Assumption. Unfold low is_internal_node. Simpl. Rewrite y. (Split with y0; Split with y1; Split with y2). Exact y3. Apply H16. Assumption. Intro. Unfold is_internal_node in H21. Rewrite y4 in H21. Inversion H21. Inversion H23. Inversion H24. Discriminate H25. Apply H10. Unfold is_internal_node. (Split with y0; Split with y1; Split with y2; Assumption). Intro. Elim H6. Intro. Cut (Snd (BDDneg_2 (bs,(share,counter)) l n0))=BDDone. Intro. Rewrite H22 in H20. Unfold BDDconfig_OK in H15. Cut (MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) BDDone)=(None). Intros. Rewrite H23 in H20. Discriminate H20. Apply config_OK_one. Assumption. Apply BDDunique with cfg:=(Fst (BDDneg_2 (bs,(share,counter)) l n0)). Assumption. Assumption. (Right; Left; Reflexivity). Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (bs,(share,counter)) l n0)) H7))). Rewrite <- bool_fun_neg_zero. Rewrite <- (proj1 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1)). (Rewrite <- H21; Exact H12). Intro. (Elim H21; Clear H21). Intro. Cut (Snd (BDDneg_2 (bs,(share,counter)) l n0))=BDDzero. Intro. Rewrite H22 in H20. Unfold BDDconfig_OK in H15. Cut (MapGet ? (Fst (Fst (BDDneg_2 (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r n0))) BDDzero)=(None). Intros. Rewrite H23 in H20. Discriminate H20. Apply config_OK_zero. Assumption. Apply BDDunique with cfg:=(Fst (BDDneg_2 (bs,(share,counter)) l n0)). Assumption. Assumption. (Left; Reflexivity). Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics (Fst (BDDneg_2 (bs,(share,counter)) l n0)) H7)). Rewrite <- bool_fun_neg_one. Rewrite <- (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics (bs,(share,counter)) H1))). (Rewrite <- H21; Exact H12). Unfold in_dom. Rewrite y0. (Intro; Discriminate). Assumption. Elim H11. Intro. Rewrite H20. (Left; Reflexivity). Intro. (Elim H20; Intro). (Rewrite H21; Right; Left; Reflexivity). Elim (option_sum ? (MapGet ? (Fst (Fst (BDDneg_2 (bs,(share,counter)) l n0))) (Snd (BDDneg_2 (bs,(share,counter)) l n0)))). Intro. (Elim y0; Clear y0; Intro). (Elim x0; Clear x0; Intro; Intro). (Elim y1; Clear y1; Intros). Right. Right. Unfold in_dom. Rewrite (H16 y0 y1 y2 (Snd (BDDneg_2 (bs,(share,counter)) l n0))). Reflexivity. Assumption. Intro. Unfold in_dom in H21. (Rewrite y0 in H21; Discriminate). Apply H0. Unfold lt. Apply le_n. Assumption. Assumption. Assumption. Intro. Apply lt_trans_1 with y:=(nat_of_N (var (bs,(share,counter)) node)). Apply BDDcompare_lt. Cut (BDDcompare (var (bs,(share,counter)) (high (bs,(share,counter)) node)) (var (bs,(share,counter)) node))=INFERIEUR. Cut (var (bs,(share,counter)) r) =(var (Fst (BDDneg_2 (bs,(share,counter)) l n0)) r). Intro. Unfold high. Simpl. Rewrite y. Rewrite H14. Trivial. Unfold is_internal_node in H13. Inversion H13. Inversion H14. Inversion H15. Elim H5. Intro. Rewrite H17 in H16. Rewrite (config_OK_zero (Fst (BDDneg_2 (bs,(share,counter)) l n0))) in H16. Discriminate H16. Assumption. Intro. (Elim H17; Intro). Rewrite H18 in H16. Rewrite (config_OK_one (Fst (BDDneg_2 (bs,(share,counter)) l n0))) in H16. Discriminate H16. Assumption. Elim (option_sum ? (MapGet ? (Fst (bs,(share,counter))) r)). Intro. (Elim y0; Clear y0; Intro). (Elim x3; Clear x3; Intro). Intro. (Elim y1; Clear y1; Intros). Unfold var. Rewrite y3. Rewrite (H9 y0 y1 y2 r). Reflexivity. Assumption. Intro. Unfold in_dom in H18. (Rewrite y0 in H18; Discriminate). Apply BDDvar_ordered_high. Assumption. Unfold is_internal_node. (Split with x; Split with l; Split with r; Assumption). Unfold high. Simpl. Rewrite y. Unfold is_internal_node in H13. (Inversion H13; Inversion H14; Inversion H15). (Elim H5; Intro). Rewrite H17 in H16. Rewrite (config_OK_zero (Fst (BDDneg_2 (bs,(share,counter)) l n0))) in H16. Discriminate H16. Assumption. (Elim H17; Intro). Rewrite H18 in H16. Rewrite (config_OK_one (Fst (BDDneg_2 (bs,(share,counter)) l n0))) in H16. Discriminate H16. Assumption. Unfold in_dom in H18. Unfold is_internal_node. Elim (option_sum ? (MapGet BDDvar*ad*ad (Fst (bs,(share,counter))) r)). Intros. (Elim y0; Intro). (Elim x3; Intro; Intro). (Elim y2; Intros). (Split with y1; Split with y3; Split with y4; Assumption). Intro. (Rewrite y0 in H18; Discriminate). Apply H3. Unfold is_internal_node. (Split with x; Split with l; Split with r; Exact y). (Elim H5; Intro). (Rewrite H13; Left; Reflexivity). (Elim H13; Intro). (Rewrite H14; Right; Left; Reflexivity). Unfold in_dom in H14. Elim (option_sum ? (MapGet BDDvar*ad*ad (Fst (bs,(share,counter))) r)). Intro. (Elim y0; Intro). (Elim x0; Intro; Intro). (Elim y2; Intros). (Right; Right). Unfold in_dom. Rewrite (H9 y1 y3 y4 r y5). Reflexivity. Intro. (Rewrite y0 in H14; Discriminate). Apply H0. Unfold lt. Apply le_n. Assumption. Assumption. Intro. Apply lt_trans_1 with y:=(nat_of_N (var (bs,(share,counter)) node)). Cut (lt (nat_of_N (var (bs,(share,counter)) (low (bs,(share,counter)) node))) (nat_of_N (var (bs,(share,counter)) node))). Unfold low. Simpl. Rewrite y. Trivial. Apply BDDcompare_lt. Apply BDDvar_ordered_low. Assumption. Unfold is_internal_node. (Split with x; Split with l; Split with r; Exact y). Unfold low. (Simpl; Rewrite y; Assumption). Apply H3. Unfold is_internal_node. (Split with x; Split with l; Split with r; Assumption). Intro. Apply lt_trans_1 with y:=(nat_of_N (var (bs,(share,counter)) node)). Cut (lt (nat_of_N (var (bs,(share,counter)) (low (bs,(share,counter)) node))) (nat_of_N (var (bs,(share,counter)) node))). Unfold low. Simpl. Rewrite y. Trivial. Apply BDDcompare_lt. Apply BDDvar_ordered_low. Assumption. Unfold is_internal_node. (Split with x; Split with l; Split with r; Exact y). Unfold low. (Simpl; Rewrite y; Assumption). Apply H3. Unfold is_internal_node. (Split with x; Split with l; Split with r; Assumption). Elim H1. Intros. Elim H5. Intros. Cut (BDD_OK bs node). Unfold BDD_OK. Unfold BDDordered. Simpl in y. Rewrite y. Intro. Cut node=BDDzero \/node=BDDone \/(EX x0:BDDvar | (EX l0:BDDvar | (EX r0:BDDvar | (MapGet ? bs node)=(Some (x0,(l0,r0))) /\(BDDcompare x0 (ad_S x))=INFERIEUR /\(Neqb l0 r0)=false /\(BDDbounded bs l0 x0)/\(BDDbounded bs r0 x0)))). Intro. (Elim H10; Intro). (Rewrite H11 in y; Rewrite y in H7; Discriminate). (Elim H11; Intro). (Rewrite H12 in y; Rewrite (proj1 ? ? H8) in y; Discriminate). Inversion H12. Inversion H13. Inversion H14. Inversion H15. Rewrite y in H16. Injection H16. Intros. Rewrite <- H18 in H17. Rewrite <- H19 in H17. Unfold config_node_OK. Apply BDDbounded_node_OK with n:=x0. Exact (proj2 ? ? (proj2 ? ? (proj2 ? ? H17))). Apply BDDbounded_lemma. Assumption. Apply (proj2 ? ? H8). Unfold in_dom. Simpl in y. Rewrite y. Reflexivity. Elim H1. Intros. Elim H5. Intros. Cut (BDD_OK bs node). Unfold BDD_OK. Unfold BDDordered. Simpl in y. Rewrite y. Intro. Cut node=BDDzero \/node=BDDone \/(EX x0:BDDvar | (EX l0:BDDvar | (EX r0:BDDvar | (MapGet ? bs node)=(Some (x0,(l0,r0))) /\(BDDcompare x0 (ad_S x))=INFERIEUR /\(Neqb l0 r0)=false /\(BDDbounded bs l0 x0)/\(BDDbounded bs r0 x0)))). Intro. (Elim H10; Intro). (Rewrite H11 in y; Rewrite y in H7; Discriminate). (Elim H11; Intro). (Rewrite H12 in y; Rewrite (proj1 ? ? H8) in y; Discriminate). Inversion H12. Inversion H13. Inversion H14. Inversion H15. Rewrite y in H16. Injection H16. Intros. Rewrite <- H18 in H17. Rewrite <- H19 in H17. Unfold config_node_OK. Apply BDDbounded_node_OK with n:=x0. Exact (proj1 ? ? (proj2 ? ? (proj2 ? ? H17))). Apply BDDbounded_lemma. Assumption. Apply (proj2 ? ? H8). Unfold in_dom. Simpl in y. Rewrite y. Reflexivity. Intro. Unfold in_dom in H4. Rewrite y in H4. Discriminate H4. Qed. *) (* Fixpoint BDDneg_1 [cfg:BDDconfig; node:ad; memo:BDDneg_memo; bound:nat] : BDDconfig*ad*BDDneg_memo := let (cfg',node'_memo') = Cases (BDDneg_memo_lookup memo node) of (Some node') => (cfg,(node',memo)) | None => Cases (MapGet ? (Fst cfg) node) of None => if (Neqb node BDDzero) then (cfg,(BDDone,memo)) else (cfg,(BDDzero,memo)) | (Some (x,(l,r))) => Cases bound of O => ( * Error * ) (initBDDconfig, (BDDzero, (newMap ad))) | (S bound') => let (cfgl,nodel_memol) = (BDDneg_1 cfg l memo bound') in let (nodel,memol) = nodel_memol in let (cfgr,noder_memor) = (BDDneg_1 cfgl r memol bound') in let (noder,memor) = noder_memor in let (cfg'', node'') = (BDDmake cfgr x nodel noder) in (cfg'',(node'',memor)) end end end in let (node',memo') = node'_memo' in (cfg',(node',(BDDneg_memo_put memo' node node'))). Lemma BDDneg_1_looksup_memo : (cfg:BDDconfig)(node1,node2:ad)(memo:BDDneg_memo)(bound:nat) (BDDneg_memo_lookup memo node1)=(Some node2) -> (Fst (Snd (BDDneg_1 cfg node1 memo bound)))=node2. Proof. Intros. Unfold BDDneg_1. Elim bound. Rewrite H. Simpl. Trivial. Rewrite H. Intros. Simpl. Trivial. Qed. Lemma BDDneg_1_zero : (cfg:BDDconfig)(memo:BDDneg_memo)(bound:nat) (BDDconfig_OK cfg) -> (BDDneg_memo_OK cfg memo) -> (bool_fun_of_BDD cfg (Fst (Snd (BDDneg_1 cfg BDDzero memo bound)))) =bool_fun_one. Proof. Intros. Elim (option_sum ? (BDDneg_memo_lookup memo BDDzero)). Intros. Elim y. Clear y. Intros. Elim bound. Simpl. Rewrite y. Simpl. Cut (bool_fun_of_BDD cfg x) =(bool_fun_neg (bool_fun_of_BDD cfg BDDzero)). Intros. Rewrite H1. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). Exact bool_fun_neg_zero. Exact (proj1 ? ? (proj2 ? ? (H0 BDDzero x y))). Intros. Simpl. Rewrite y. Simpl. Cut (bool_fun_of_BDD cfg x) =(bool_fun_neg (bool_fun_of_BDD cfg BDDzero)). Intros. Rewrite H2. Rewrite (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). Exact bool_fun_neg_zero. Exact (proj1 ? ? (proj2 ? ? (H0 BDDzero x y))). Intros. Elim bound. Simpl. Rewrite y. Cut (MapGet BDDvar*ad*ad (Fst cfg) BDDzero)=(None). Intro. Rewrite H1. Simpl. Exact (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Unfold BDDconfig_OK in H. Apply config_OK_zero. Assumption. Intros. Unfold BDDneg_1. Rewrite y. Rewrite (config_OK_zero cfg H). Simpl. Exact (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Qed. Lemma BDDneg_1_one : (cfg:BDDconfig)(memo:BDDneg_memo)(bound:nat) (BDDconfig_OK cfg) -> (BDDneg_memo_OK cfg memo) -> (bool_fun_of_BDD cfg (Fst (Snd (BDDneg_1 cfg BDDone memo bound)))) =bool_fun_zero. Proof. Intros. Elim (option_sum ? (BDDneg_memo_lookup memo BDDone)). Intros. Elim y. Clear y. Intros. Elim bound. Simpl. Rewrite y. Simpl. Cut (bool_fun_of_BDD cfg x)=(bool_fun_neg (bool_fun_of_BDD cfg BDDone)). Intros. Rewrite H1. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Exact bool_fun_neg_one. Intros. Simpl. Simpl. Cut (bool_fun_of_BDD cfg x)=(bool_fun_neg (bool_fun_of_BDD cfg BDDone)). Intros. Rewrite H1. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Exact bool_fun_neg_one. Exact (proj1 ? ? (proj2 ? ? (H0 BDDone x y))). Intros. Elim bound. Simpl. Rewrite y. Cut (MapGet BDDvar*ad*ad (Fst cfg) BDDone)=(None). Intro. Simpl. Rewrite (proj1 ? ? (proj2 ? ? (H0 BDDone x y))). Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Exact bool_fun_neg_one. Apply config_OK_one. Assumption. Intro. Auto. Intro. Unfold BDDneg_1. Elim bound. Rewrite y. Simpl. Cut (MapGet BDDvar*ad*ad (Fst cfg) BDDone)=(None). Intro. Rewrite H1. Simpl. Exact (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). Apply config_OK_one. Assumption. Intros. Unfold BDDneg_1. Rewrite y. Rewrite (config_OK_one cfg H). Simpl. Exact (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). (* Intros. Elim (option_sum ? (BDDneg_memo_lookup memo BDDone)). Intros. Elim y. Clear y. Intros. Elim bound. Simpl. Rewrite y. Simpl. Cut (bool_fun_of_BDD cfg x)=(bool_fun_neg (bool_fun_of_BDD cfg BDDone)). Intros. Rewrite H1. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Exact bool_fun_neg_one. Exact (proj2 ? ? (H0 BDDzero x y)). Intros. Simpl. Rewrite y. Simpl. Cut (bool_fun_of_BDD cfg x)=(bool_fun_neg (bool_fun_of_BDD cfg BDDone)). Intros. Rewrite H1. Rewrite (proj1 ? ? (proj2 ? ? (bool_fun_of_BDD_semantics cfg H))). Exact bool_fun_neg_one. Exact (proj2 ? ? (H0 BDDone x y)). Intros. Elim bound. Simpl. Rewrite y. Cut (MapGet BDDvar*ad*ad (Fst cfg) BDDone)=(None). Intro. Rewrite H1. Simpl. Exact (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). Unfold BDDconfig_OK in H. Apply config_OK_one. Assumption. Intros. Unfold BDDneg_1. Rewrite y. Rewrite (config_OK_one cfg H). Simpl. Exact (proj1 ? ? (bool_fun_of_BDD_semantics cfg H)). *) Qed. (* Lemma BDDneg_1_internal_node : (bound:nat)(cfg:BDDconfig)(node:ad)(memo:BDDneg_memo) (BDDconfig_OK cfg) -> (BDDneg_memo_OK cfg memo) -> (config_node_OK cfg node) -> (lt (nat_of_N (var cfg node)) bound) -> (BDDconfig_OK (Fst (BDDneg_1 cfg node memo bound))) /\ (BDDneg_memo_OK (Fst (BDDneg_1 cfg node memo bound)) (Snd (Snd (BDDneg_1 cfg node memo bound)))) /\ ( (x:BDDvar)(l,r,a:ad) (MapGet ? (Fst cfg) a)=(Some (x,(l,r))) -> (MapGet ? (Fst (Fst (BDDneg_1 cfg node memo bound))) a)= (Some (x,(l,r))) ) /\ ( (is_internal_node cfg node) -> (is_internal_node (Fst (BDDneg_1 cfg node memo bound)) (Fst (Snd (BDDneg_1 cfg node memo bound)))) /\ (var cfg node)=(var (Fst (BDDneg_1 cfg node memo bound)) (Fst (Snd (BDDneg_1 cfg node memo bound)))) ) /\ (config_node_OK (Fst (BDDneg_1 cfg node memo bound)) (Fst (Snd (BDDneg_1 cfg node memo bound)))) /\ (bool_fun_of_BDD (Fst (BDDneg_1 cfg node memo bound)) (Fst (Snd (BDDneg_1 cfg node memo bound)))) =(bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. Qed. *) Definition BDDneg := [cfg:BDDconfig; node:ad] Cases (MapGet ? (Fst cfg) node) of None => if (Neqb node BDDzero) then (cfg,BDDone) else (cfg,BDDone) | (Some (x,(l,r))) => let (cfg',node'_memo) = (BDDneg_1 cfg node (newMap ad) (S (nat_of_N x))) in let (node',memo) = node'_memo in (cfg',node') end. *)
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Lemma bool_fun_one_zero_eq : ~ bool_fun_eq bool_fun_one bool_fun_zero. Proof. (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) *) unfold bool_fun_eq, bool_fun_zero, bool_fun_one in |- *. unfold not in |- *. intro H. unfold bool_fun_eval in H. (* Goal: False *) cut (true = false). intro; discriminate. apply H. exact (fun x : BDDvar => true). Qed. Lemma bool_fun_zero_one_eq : ~ bool_fun_eq bool_fun_zero bool_fun_one. Proof. (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) *) unfold bool_fun_eq, bool_fun_zero, bool_fun_one in |- *. unfold not in |- *. intro H. unfold bool_fun_eval in H. (* Goal: forall _ : @eq bool true false, and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) false *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) cut (false = true). intro; discriminate. apply H. exact (fun x : BDDvar => true). Qed. Definition augment (vb : var_binding) (x : BDDvar) (b : bool) (y : BDDvar) := if BDDvar_eq x y then b else vb y. Definition bool_fun_restrict (bf : bool_fun) (x : BDDvar) (b : bool) (vb : var_binding) := bool_fun_eval bf (augment vb x b). Lemma bool_fun_restrict_zero : forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_zero x b) bool_fun_zero. Proof. (* Goal: forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_one x b) bool_fun_one *) intros x b. unfold bool_fun_eq, bool_fun_restrict, bool_fun_zero, bool_fun_one in |- *. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => bool_fun_eval (fun _ : var_binding => true) (augment vb0 x b)) vb) (bool_fun_eval (fun _ : var_binding => true) vb) *) intros vb. unfold bool_fun_eval, augment in |- *. reflexivity. Qed. Lemma bool_fun_restrict_one : forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_one x b) bool_fun_one. Proof. (* Goal: forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_one x b) bool_fun_one *) intros x b. unfold bool_fun_eq, bool_fun_restrict, bool_fun_zero, bool_fun_one in |- *. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => bool_fun_eval (fun _ : var_binding => true) (augment vb0 x b)) vb) (bool_fun_eval (fun _ : var_binding => true) vb) *) intros vb. unfold bool_fun_eval, augment in |- *. reflexivity. Qed. Lemma bool_fun_restrict_eq : forall (bf bf' : bool_fun) (x : BDDvar) (b : bool), bool_fun_eq bf bf' -> bool_fun_eq (bool_fun_restrict bf x b) (bool_fun_restrict bf' x b). Proof. (* Goal: forall (bf bf' : bool_fun) (x : BDDvar) (b : bool) (_ : bool_fun_eq bf bf'), bool_fun_eq (bool_fun_restrict bf x b) (bool_fun_restrict bf' x b) *) intros bf bf' x b H. unfold bool_fun_eq in |- *. unfold bool_fun_restrict in |- *. unfold bool_fun_eval at 1 3 in |- *. (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) intro vb. apply H. Qed. Definition var_binding_eq (vb vb' : var_binding) := forall x : BDDvar, vb x = vb' x. Definition bool_fun_ext (bf : bool_fun) := forall vb vb' : var_binding, var_binding_eq vb vb' -> bool_fun_eval bf vb = bool_fun_eval bf vb'. Lemma bool_fun_of_BDD_1_ext : forall (bound : nat) (cfg : BDDconfig) (node : ad), bool_fun_ext (bool_fun_of_BDD_1 cfg node bound). Proof. simple induction bound. intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. intros share counter. intros node. simpl in |- *. elim (MapGet (BDDvar * (ad * ad)) bs node). Focus 2. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim (Neqb node BDDzero). unfold bool_fun_ext in |- *. unfold bool_fun_eval, bool_fun_zero in |- *; reflexivity. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_ext in |- *. unfold bool_fun_eval, bool_fun_one in |- *; reflexivity. unfold bool_fun_ext in |- *. unfold bool_fun_eval in |- *. unfold bool_fun_zero in |- *. intro a. (* Goal: forall (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (n : nat) (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) intro vb. intro vb'. intro H. elim a. intros y y0. elim y0. reflexivity. intro n. (* Goal: forall (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (n : nat) (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) intro H. intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. intros share counter. intros node. simpl in |- *. elim (MapGet (BDDvar * (ad * ad)) bs node). Focus 2. elim (Neqb node BDDzero). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_ext, bool_fun_zero in |- *. unfold bool_fun_eval in |- *; reflexivity. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_ext, bool_fun_one in |- *. unfold bool_fun_eval in |- *; reflexivity. intros a. elim a. intros y y0. elim y0. intros y1 y2. cut (bool_fun_ext (bool_fun_of_BDD_1 (bs, (share, counter)) y2 n)). (* Goal: forall _ : @eq BDDvar x x0, @eq bool b (vb x0) *) (* Goal: @eq BDDvar x x0 *) (* Goal: forall _ : @eq bool (BDDvar_eq x x0) false, @eq bool (if BDDvar_eq x x0 then b else vb x0) (vb x0) *) intro H0. cut (bool_fun_ext (bool_fun_of_BDD_1 (bs, (share, counter)) y1 n)). intro H1. unfold bool_fun_ext in |- *. intros vb vb' H2. unfold bool_fun_eval in |- *. unfold bool_fun_ext in H0, H1. unfold bool_fun_eval in H0, H1. rewrite (H1 vb vb' H2). rewrite (H0 vb vb' H2). (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) unfold var_binding_eq in H2. rewrite (H2 y). reflexivity. apply H. apply H. Qed. Lemma bool_fun_of_BDD_ext : forall (cfg : BDDconfig) (node : ad), bool_fun_ext (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad), bool_fun_ext (bool_fun_of_BDD cfg node) *) unfold bool_fun_of_BDD in |- *. intros cfg node. apply bool_fun_of_BDD_1_ext. Qed. Lemma augment_eq : forall (vb : var_binding) (x : BDDvar) (b : bool), vb x = b -> var_binding_eq (augment vb x b) vb. Proof. (* Goal: forall (vb : var_binding) (x : BDDvar) (b : bool) (_ : @eq bool (vb x) b), var_binding_eq (augment vb x b) vb *) unfold var_binding_eq in |- *. intros vb x b H x0. unfold augment in |- *. elim (sumbool_of_bool (BDDvar_eq x x0)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro y. rewrite y. cut (x = x0). intro H0. rewrite <- H0. rewrite H; reflexivity. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply Neqb_complete. exact y. intro y. rewrite y. reflexivity. Qed. Definition bool_fun_independent (bf : bool_fun) (x : BDDvar) := forall vb : var_binding, bool_fun_eval bf (augment vb x true) = bool_fun_eval bf (augment vb x false). Lemma bool_fun_independent_lemma : forall (bf : bool_fun) (x : BDDvar) (vb : var_binding) (b : bool), bool_fun_ext bf -> bool_fun_independent bf x -> bool_fun_eval bf (augment vb x b) = bool_fun_eval bf vb. Proof. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) intros bf x vb b H H0. elim (sumbool_of_bool (vb x)). intro y. elim b. cut (var_binding_eq (augment vb x true) vb). (* Goal: forall (_ : @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true) (vb : var_binding), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (if if N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then false else vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) intro H1. rewrite (H (augment vb x true) vb H1). cut (bool_fun_eval bf (augment vb x true) = bool_fun_eval bf vb). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eval in |- *. intro H2. reflexivity. rewrite (H (augment vb x true) vb H1). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. apply augment_eq. assumption. rewrite <- (H0 vb). cut (var_binding_eq (augment vb x true) vb). (* Goal: forall (_ : @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true) (vb : var_binding), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (if if N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then false else vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) intro H1. rewrite (H (augment vb x true) vb H1). cut (bool_fun_eval bf (augment vb x true) = bool_fun_eval bf vb). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eval in |- *. intro H2. reflexivity. rewrite (H (augment vb x true) vb H1). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. apply augment_eq. assumption. intro y. elim b. cut (var_binding_eq (augment vb x false) vb). (* Goal: forall (_ : @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true) (vb : var_binding), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (if if N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then false else vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) intro H1. cut (bool_fun_eval bf (augment vb x false) = bool_fun_eval bf vb). (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) intro H2. rewrite <- H2. apply H0. apply H. assumption. apply augment_eq. (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) assumption. cut (var_binding_eq (augment vb x false) vb). intro H1. apply H. (* Goal: var_binding_eq (augment vb x false) vb *) assumption. apply augment_eq. assumption. Qed. Lemma bool_fun_independent_zero : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> bool_fun_independent (bool_fun_of_BDD cfg BDDzero) x. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))), bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone) x *) intros x H. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_independent in |- *. intro vb. unfold bool_fun_eval, bool_fun_zero in |- *. reflexivity. Qed. Lemma bool_fun_independent_one : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> bool_fun_independent (bool_fun_of_BDD cfg BDDone) x. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))), bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone) x *) intros x H. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_independent in |- *. intro vb. unfold bool_fun_eval, bool_fun_one in |- *. reflexivity. Qed. Lemma in_dom_is_internal : forall (cfg : BDDconfig) (node : ad), in_dom _ node (fst cfg) = true -> is_internal_node cfg node. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) intros node H. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) node)). intros y. (* Goal: @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x) Lt *) (* Goal: node_OK bs (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) elim y. intro x. elim x. intro y0. intro y1. elim y1. intros y2 y3 y4. split with y0; split with y2; split with y3; assumption. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) intro y. unfold in_dom in H. rewrite y in H. discriminate H. Qed. Lemma internal_node_lemma : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> Neqb (low cfg node) (high cfg node) = false /\ BDDbounded (fst cfg) (low cfg node) (var cfg node) /\ BDDbounded (fst cfg) (high cfg node) (var cfg node). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) intros node H H0. elim H. intros H1 H2. elim H1. intros H3 H4. inversion H0. inversion H5. (* Goal: @eq ad node1 node2 *) inversion H6. cut (BDD_OK bs node). unfold BDD_OK in |- *. unfold BDDordered in |- *. simpl in H7; rewrite H7. (* Goal: and (@eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => r | None => N0 end) false) (and (BDDbounded (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end) (BDDbounded (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => r | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end)) *) (* Goal: BDD_OK bs node *) intro H8. unfold var, high, low in |- *. simpl in |- *. rewrite H7. cut (node = BDDzero \/ node = BDDone \/ (exists x' : BDDvar, (exists l' : BDDvar, (exists r' : BDDvar, MapGet _ bs node = Some (x', (l', r')) /\ BDDcompare x' (ad_S x) = Datatypes.Lt /\ Neqb l' r' = false /\ BDDbounded bs l' x' /\ BDDbounded bs r' x')))). (* Goal: forall _ : or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x' : BDDvar => @ex BDDvar (fun l' : BDDvar => @ex BDDvar (fun r' : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x' (@pair BDDvar BDDvar l' r')))) (and (@eq comparison (BDDcompare x' (ad_S x)) Lt) (and (@eq bool (N.eqb l' r') false) (and (BDDbounded bs l' x') (BDDbounded bs r' x'))))))))), and (@eq bool (N.eqb x0 x1) false) (and (BDDbounded bs x0 x) (BDDbounded bs x1 x)) *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x' : BDDvar => @ex BDDvar (fun l' : BDDvar => @ex BDDvar (fun r' : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x' (@pair BDDvar BDDvar l' r')))) (and (@eq comparison (BDDcompare x' (ad_S x)) Lt) (and (@eq bool (N.eqb l' r') false) (and (BDDbounded bs l' x') (BDDbounded bs r' x'))))))))) *) (* Goal: BDD_OK bs node *) intros H9. elim H9; intros. rewrite H10 in H7; rewrite H3 in H7; discriminate. (* Goal: and (@eq bool (N.eqb x0 x1) false) (and (BDDbounded bs x0 x) (BDDbounded bs x1 x)) *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x' : BDDvar => @ex BDDvar (fun l' : BDDvar => @ex BDDvar (fun r' : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x' (@pair BDDvar BDDvar l' r')))) (and (@eq comparison (BDDcompare x' (ad_S x)) Lt) (and (@eq bool (N.eqb l' r') false) (and (BDDbounded bs l' x') (BDDbounded bs r' x'))))))))) *) (* Goal: BDD_OK bs node *) elim H10; intros. rewrite H11 in H7; rewrite (proj1 H4) in H7; discriminate. (* Goal: @eq ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter'))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) inversion H11. inversion H12. inversion H13. inversion H14. rewrite H7 in H15. (* Goal: and (@eq bool (N.eqb x0 x1) false) (and (BDDbounded bs x0 x) (BDDbounded bs x1 x)) *) (* Goal: or (@eq ad node BDDzero) (or (@eq ad node BDDone) (@ex BDDvar (fun x' : BDDvar => @ex BDDvar (fun l' : BDDvar => @ex BDDvar (fun r' : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x' (@pair BDDvar BDDvar l' r')))) (and (@eq comparison (BDDcompare x' (ad_S x)) Lt) (and (@eq bool (N.eqb l' r') false) (and (BDDbounded bs l' x') (BDDbounded bs r' x'))))))))) *) (* Goal: BDD_OK bs node *) injection H15. intros H17 H18 H19. rewrite <- H17 in H16. rewrite <- H18 in H16. rewrite <- H19 in H16. (* Goal: config_node_OK cfg node *) exact (proj2 H16). apply BDDbounded_lemma. assumption. apply (proj2 H4). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold in_dom in |- *; simpl in H7; rewrite H7; reflexivity. Qed. Lemma high_bounded : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> BDDbounded (fst cfg) (high cfg node) (var cfg node). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. exact (proj2 (proj2 (internal_node_lemma cfg node H H0))). Qed. Lemma low_bounded : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> BDDbounded (fst cfg) (low cfg node) (var cfg node). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. exact (proj1 (proj2 (internal_node_lemma cfg node H H0))). Qed. Lemma high_OK : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> config_node_OK cfg (high cfg node). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) intros node H H0. inversion H0. inversion H1. inversion H2. unfold high in |- *. rewrite H3. cut (BDDbounded (fst (bs, (share, counter))) (high (bs, (share, counter)) node) (var (bs, (share, counter)) node)). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) n0 *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) unfold var, high in |- *. rewrite H3. intro H4. unfold config_node_OK in |- *. apply BDDbounded_node_OK with (n := x). (* Goal: config_node_OK cfg node *) assumption. apply high_bounded. assumption. assumption. Qed. Lemma low_OK : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> config_node_OK cfg (low cfg node). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) intros node H H0. inversion H0. inversion H1. inversion H2. unfold low in |- *. rewrite H3. cut (BDDbounded (fst (bs, (share, counter))) (low (bs, (share, counter)) node) (var (bs, (share, counter)) node)). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) n0 *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) unfold var, low in |- *. rewrite H3. intro H4. unfold config_node_OK in |- *. apply BDDbounded_node_OK with (n := x). (* Goal: config_node_OK cfg node *) assumption. apply low_bounded. assumption. assumption. Qed. Lemma low_high_neq : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> Neqb (low cfg node) (high cfg node) = false. Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. exact (proj1 (internal_node_lemma cfg node H H0)). Qed. Lemma BDDvar_independent_1 : forall (cfg : BDDconfig) (n : nat) (node : ad) (x : BDDvar), BDDconfig_OK cfg -> is_internal_node cfg node -> n = nat_of_N (var cfg node) -> BDDcompare (var cfg node) x = Datatypes.Lt -> bool_fun_independent (bool_fun_of_BDD cfg node) x. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (n : nat) (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) intro n. apply lt_wf_ind with (P := fun n : nat => forall (node : ad) (x : BDDvar), BDDconfig_OK (bs, (share, counter)) -> is_internal_node (bs, (share, counter)) node -> n = nat_of_N (var (bs, (share, counter)) node) -> BDDcompare (var (bs, (share, counter)) node) x = Datatypes.Lt -> bool_fun_independent (bool_fun_of_BDD (bs, (share, counter)) node) x). (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (node : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat m (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (_ : @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) x) Lt), bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) x) (node : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (_ : @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) x) Lt), bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) x *) intros n0 H node x H0 H1 H2 H3. cut (bool_fun_independent (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) x). cut (bool_fun_independent (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) x). (* Goal: forall (_ : @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb)) (_ : @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb)), @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) intros H4 H5. rewrite (proj2 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0)) node H1). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) unfold bool_fun_independent in |- *. unfold bool_fun_eval in |- *. intro vb. unfold bool_fun_independent in H4, H5. (* Goal: @eq ad node1 node2 *) unfold bool_fun_eval in H4, H5. inversion H1. inversion H6. inversion H7. (* Goal: @eq bool (if augment vb x true (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb x true) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb x true)) (if augment vb x false (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb x false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb x false)) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) unfold var, high, low in |- *. rewrite H8. unfold augment at 1 4 in |- *. cut (BDDvar_eq x x0 = false). (* Goal: forall _ : or (@eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro H9. rewrite H9. unfold var, high, low in H5, H4. rewrite H8 in H4. rewrite H8 in H5. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite (H4 vb). rewrite (H5 vb). reflexivity. unfold BDDvar_eq in |- *. cut (Neqb x x0 <> true). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim (Neqb x x0). intro H9. absurd (true = true). assumption. reflexivity. reflexivity. (* Goal: not (@eq bool (N.eqb x x0) true) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) unfold not in |- *. intro H9. unfold var in H3. rewrite H8 in H3. cut (nat_of_N x0 < nat_of_N x). (* Goal: forall _ : lt (N.to_nat x0) (N.to_nat x), False *) (* Goal: lt (N.to_nat x0) (N.to_nat x) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) cut (x = x0). intro H10. rewrite H10. exact (lt_irrefl (nat_of_N x0)). apply Neqb_complete. (* Goal: config_node_OK cfg node *) assumption. apply BDDcompare_lt. assumption. cut (node_OK bs (high (bs, (share, counter)) node)). (* Goal: config_node_OK cfg node *) intro H4. elim H4. intro H5. rewrite H5. apply bool_fun_independent_zero. assumption. (* Goal: config_node_OK cfg node *) intro H5. elim H5; intro H6. rewrite H6. apply bool_fun_independent_one. assumption. apply H with (m := nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H2. apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. (* Goal: config_node_OK cfg node *) assumption. unfold is_internal_node in |- *. elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (fst (bs, (share, counter))) (high (bs, (share, counter)) node))). (* Goal: @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x) Lt *) (* Goal: node_OK bs (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) intro y. elim y. intro x0. elim x0. intro y0. intro y1. elim y1. intro y2. intro y3. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) split with y0. split with y2. split with y3. assumption. intro y. unfold in_dom in H6. (* Goal: config_node_OK cfg node *) simpl in y. rewrite y in H6. discriminate H6. assumption. apply in_dom_is_internal. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. apply BDDcompare_trans with (y := var (bs, (share, counter)) node). (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_high. assumption. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. exact (high_OK (bs, (share, counter)) node H0 H1). (* Goal: forall _ : is_internal_node cfg (low cfg node), bool_fun_independent (bool_fun_of_BDD cfg (low cfg node)) (var cfg node) *) (* Goal: is_internal_node cfg (low cfg node) *) (* Goal: config_node_OK cfg (low cfg node) *) cut (node_OK bs (low (bs, (share, counter)) node)). intro H4. elim H4. intro H5. (* Goal: config_node_OK cfg node *) rewrite H5. apply bool_fun_independent_zero. assumption. intro H5. elim H5; intro H6. (* Goal: config_node_OK cfg node *) rewrite H6. apply bool_fun_independent_one. assumption. apply H with (m := nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H2. apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. assumption. apply in_dom_is_internal. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. apply BDDcompare_trans with (y := var (bs, (share, counter)) node). (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_low. assumption. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. exact (low_OK (bs, (share, counter)) node H0 H1). Qed. Lemma BDDvar_independent_high : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> bool_fun_independent (bool_fun_of_BDD cfg (high cfg node)) (var cfg node). Proof. (* Goal: forall _ : @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) intros cfg node H H0. cut (config_node_OK cfg (high cfg node)). intros H1. elim H1. intro H2. (* Goal: forall _ : @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) rewrite H2. apply bool_fun_independent_zero. assumption. intro H2. elim H2; intro. (* Goal: config_node_OK cfg node *) rewrite H3; apply bool_fun_independent_one; assumption. cut (is_internal_node cfg (high cfg node)). (* Goal: forall _ : is_internal_node cfg (low cfg node), bool_fun_independent (bool_fun_of_BDD cfg (low cfg node)) (var cfg node) *) (* Goal: is_internal_node cfg (low cfg node) *) (* Goal: config_node_OK cfg (low cfg node) *) intro H4. apply BDDvar_independent_1 with (n := nat_of_N (var cfg (high cfg node))). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. reflexivity. apply BDDvar_ordered_high. (* Goal: config_node_OK cfg node *) assumption. assumption. assumption. apply in_dom_is_internal. assumption. (* Goal: config_node_OK cfg node *) apply high_OK. assumption. assumption. Qed. Lemma BDDvar_independent_low : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> bool_fun_independent (bool_fun_of_BDD cfg (low cfg node)) (var cfg node). Proof. (* Goal: forall _ : @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) intros cfg node H H0. cut (config_node_OK cfg (low cfg node)). intros H1. elim H1. intro H2. (* Goal: forall _ : @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb), @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) (* Goal: @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) rewrite H2. apply bool_fun_independent_zero. assumption. intro H2. elim H2; intro. (* Goal: config_node_OK cfg node *) rewrite H3; apply bool_fun_independent_one; assumption. cut (is_internal_node cfg (low cfg node)). (* Goal: forall _ : is_internal_node cfg (low cfg node), bool_fun_independent (bool_fun_of_BDD cfg (low cfg node)) (var cfg node) *) (* Goal: is_internal_node cfg (low cfg node) *) (* Goal: config_node_OK cfg (low cfg node) *) intro H4. apply BDDvar_independent_1 with (n := nat_of_N (var cfg (low cfg node))). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. reflexivity. apply BDDvar_ordered_low. (* Goal: config_node_OK cfg node *) assumption. assumption. assumption. apply in_dom_is_internal. assumption. (* Goal: config_node_OK cfg node *) apply low_OK. assumption. assumption. Qed. Lemma bool_fun_of_BDDzero : forall cfg : BDDconfig, BDDconfig_OK cfg -> bool_fun_eq (bool_fun_of_BDD cfg BDDzero) bool_fun_zero. Proof. (* Goal: bool_fun_eq bf1 bf2 *) intros cfg H. unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. intro vb. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)). reflexivity. Qed. Lemma bool_fun_of_BDDone : forall cfg : BDDconfig, BDDconfig_OK cfg -> bool_fun_eq (bool_fun_of_BDD cfg BDDone) bool_fun_one. Proof. (* Goal: bool_fun_eq bf1 bf2 *) intros cfg H. unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. intro vb. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). reflexivity. Qed. Lemma bool_fun_of_BDDhigh : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> bool_fun_eq (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_restrict (bool_fun_of_BDD cfg node) (var cfg node) true). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) intros node H H0. rewrite (proj2 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)) node H0). (* Goal: bool_fun_eq bf1 bf2 *) unfold bool_fun_restrict in |- *. unfold bool_fun_eval in |- *. unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. (* Goal: forall vb : var_binding, @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (if if BDDvar_eq (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then false else vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) unfold augment at 1 in |- *. unfold BDDvar_eq in |- *. cut (Neqb (var (bs, (share, counter)) node) (var (bs, (share, counter)) node) = true). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) intro H1. rewrite H1. intro vb. cut (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node) (augment vb (var (bs, (share, counter)) node) true) = bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node) vb). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro H2. rewrite H2. reflexivity. change (bool_fun_eval (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) (augment vb (var (bs, (share, counter)) node) true) = bool_fun_eval (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) vb) in |- *. (* Goal: @eq bool (bool_fun_eval (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_eval (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) apply bool_fun_independent_lemma. apply bool_fun_of_BDD_ext. apply BDDvar_independent_high. (* Goal: config_node_OK cfg node *) assumption. assumption. apply Neqb_correct. Qed. Lemma bool_fun_of_BDDlow : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> bool_fun_eq (bool_fun_of_BDD cfg (low cfg node)) (bool_fun_restrict (bool_fun_of_BDD cfg node) (var cfg node) false). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) intros node H H0. rewrite (proj2 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)) node H0). (* Goal: bool_fun_eq bf1 bf2 *) unfold bool_fun_restrict in |- *. unfold bool_fun_eval in |- *. unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. (* Goal: forall vb : var_binding, @eq bool (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) vb) (if if BDDvar_eq (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then false else vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) then bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) else bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) *) unfold augment at 1 in |- *. unfold BDDvar_eq in |- *. cut (Neqb (var (bs, (share, counter)) node) (var (bs, (share, counter)) node) = true). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) intro H1. rewrite H1. intro vb. cut (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node) (augment vb (var (bs, (share, counter)) node) false) = bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node) vb). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro H2. rewrite H2. reflexivity. change (bool_fun_eval (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) (augment vb (var (bs, (share, counter)) node) false) = bool_fun_eval (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) vb) in |- *. (* Goal: @eq bool (bool_fun_eval (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (augment vb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false)) (bool_fun_eval (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) vb) *) (* Goal: @eq bool (N.eqb (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) apply bool_fun_independent_lemma. apply bool_fun_of_BDD_ext. apply BDDvar_independent_low. (* Goal: config_node_OK cfg node *) assumption. assumption. apply Neqb_correct. Qed. Lemma internal_node_not_constant_1 : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall (n : nat) (node : ad), is_internal_node cfg node -> n = nat_of_N (var cfg node) -> ~ bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_one. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (n : nat) (node : ad) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) intro H. intro n. apply lt_wf_ind with (P := fun n : nat => forall node : ad, is_internal_node (bs, (share, counter)) node -> n = nat_of_N (var (bs, (share, counter)) node) -> ~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node) bool_fun_one). (* Goal: @eq ad node1 node2 *) intros n0 H0 node H1 H2. inversion H1. inversion H3. inversion H4. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node)). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1, not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one *) (* Goal: @eq ad node1 node2 *) intros H6 H7. elim H6. intro H8. elim H7. intro H9. cut (Neqb (low (bs, (share, counter)) node) (high (bs, (share, counter)) node) = true). (* Goal: forall _ : @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true, and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) true *) (* Goal: forall _ : or (@eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) rewrite (low_high_neq (bs, (share, counter)) node H H1). (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro H10. discriminate H10. rewrite H8. rewrite H9. apply Neqb_correct. intro H9. (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) elim H9; clear H9; intro. cut (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node) = bool_fun_one). cut (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node) = bool_fun_zero). cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true)). (* Goal: forall (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true)) (_ : @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero) (_ : @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intros H10 H11 H12. cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false)). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intros H13. rewrite H12 in H10. rewrite H11 in H13. split; unfold not in |- *; intro. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true) (bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) true)). (* Goal: forall _ : @eq bool true false, @eq ad node1 node2 *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) false *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H15. cut (bool_fun_eq bool_fun_one (bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) true)). (* Goal: forall _ : bool_fun_eq bool_fun_zero (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false), False *) (* Goal: bool_fun_eq bool_fun_zero (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro H16. cut (bool_fun_eq bool_fun_one bool_fun_zero). intro H17. absurd (bool_fun_eq bool_fun_one bool_fun_zero). (* Goal: config_node_OK cfg node *) exact bool_fun_one_zero_eq. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_restrict_zero. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) assumption. assumption. apply bool_fun_restrict_eq. assumption. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false) (bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) false)). (* Goal: forall _ : @eq bool true false, @eq ad node1 node2 *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) false *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H15. cut (bool_fun_eq bool_fun_zero (bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) false)). (* Goal: forall _ : bool_fun_eq bool_fun_zero (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false), False *) (* Goal: bool_fun_eq bool_fun_zero (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_restrict bool_fun_one (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro H16. cut (bool_fun_eq bool_fun_zero bool_fun_one). intro H17. absurd (bool_fun_eq bool_fun_zero bool_fun_one). (* Goal: config_node_OK cfg node *) exact bool_fun_zero_one_eq. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_restrict_one. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) assumption. assumption. apply bool_fun_restrict_eq. assumption. apply bool_fun_of_BDDlow. (* Goal: config_node_OK cfg node *) assumption. assumption. apply bool_fun_of_BDDhigh. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H8. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. rewrite H9. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. cut (~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) bool_fun_one). (* Goal: forall _ : @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intro H10. split; unfold not in |- *; intro. apply (proj1 H10). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_zero. apply (proj2 H10). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_one. apply H0 with (m := nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H2. apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. apply in_dom_is_internal. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. intro H8. elim H8; intro. elim H7; intro. split; unfold not in |- *; intro. (* Goal: False *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) apply bool_fun_zero_one_eq. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) false). (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_zero (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) bool_fun_zero *) (* Goal: False *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) apply bool_fun_eq_symm. apply bool_fun_restrict_zero. apply bool_fun_restrict_eq. (* Goal: config_node_OK cfg node *) apply bool_fun_eq_symm. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)). (* Goal: config_node_OK cfg node *) apply bool_fun_eq_symm. apply bool_fun_of_BDDlow. assumption. assumption. (* Goal: forall _ : @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) false, and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) false *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) rewrite H9. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq, bool_fun_one in |- *. reflexivity. apply bool_fun_zero_one_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H10. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_one. elim H10; intro. cut (Neqb (low (bs, (share, counter)) node) (high (bs, (share, counter)) node) = false). (* Goal: forall _ : @eq bool true false, and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) false *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) rewrite H9. rewrite H11. rewrite (Neqb_correct BDDone). intro; discriminate. (* Goal: config_node_OK cfg node *) apply low_high_neq. assumption. assumption. cut (~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)) bool_fun_one). (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) bool_fun_one)) *) (* Goal: and (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_zero)) (not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) bool_fun_one)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro H12. split; unfold not in |- *; intro. apply (proj1 H12). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_zero. apply (proj2 H12). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) true). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_one. apply H0 with (m := nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H2. apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. apply in_dom_is_internal. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. cut (~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)) bool_fun_one). (* Goal: forall _ : @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intro H10. split; unfold not in |- *; intro. apply (proj1 H10). apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_zero. apply (proj2 H10). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one (var (bs, (share, counter)) node) false). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_restrict_one. apply H0 with (m := nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H2. apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. apply in_dom_is_internal. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. apply low_OK. assumption. assumption. apply high_OK. (* Goal: config_node_OK cfg node *) assumption. assumption. Qed. Lemma internal_node_not_constant : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> ~ bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_zero /\ ~ bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_one. Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. apply internal_node_not_constant_1 with (n := nat_of_N (var cfg node)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. assumption. reflexivity. Qed. Lemma bool_fun_neq_internal_zero : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> ~ bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDzero). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)). (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_zero) *) exact (proj1 (internal_node_not_constant cfg node H H0)). Qed. Lemma bool_fun_neq_internal_one : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> ~ bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), not (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_BDD cfg BDDone)) *) intros cfg node H H0. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg node) bool_fun_one) *) exact (proj2 (internal_node_not_constant cfg node H H0)). Qed. Lemma bool_fun_neq_zero_one : forall cfg : BDDconfig, BDDconfig_OK cfg -> ~ bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone). Proof. (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) *) intros cfg H. unfold bool_fun_eq, bool_fun_zero, bool_fun_one in |- *. unfold bool_fun_eval in |- *. (* Goal: not (forall vb : var_binding, @eq bool (bool_fun_of_BDD cfg BDDone vb) (bool_fun_of_BDD cfg BDDzero vb)) *) rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)). rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). (* Goal: forall (bf1 bf2 : bool_fun) (_ : not (bool_fun_eq bf1 bf2)), not (bool_fun_eq bf2 bf1) *) unfold not in |- *; intros. absurd (true = false). unfold not in |- *; discriminate. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_zero, bool_fun_one in H0. rewrite (H0 (fun x : BDDvar => true)). reflexivity. Qed. Lemma bool_fun_neq_one_zero : forall cfg : BDDconfig, BDDconfig_OK cfg -> ~ bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero). Proof. (* Goal: not (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) *) intros cfg H. unfold bool_fun_eq, bool_fun_zero, bool_fun_one in |- *. unfold bool_fun_eval in |- *. (* Goal: not (forall vb : var_binding, @eq bool (bool_fun_of_BDD cfg BDDone vb) (bool_fun_of_BDD cfg BDDzero vb)) *) rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)). rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). (* Goal: forall (bf1 bf2 : bool_fun) (_ : not (bool_fun_eq bf1 bf2)), not (bool_fun_eq bf2 bf1) *) unfold not in |- *; intros. absurd (false = true). unfold not in |- *; discriminate. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_zero, bool_fun_one in H0. rewrite (H0 (fun x : BDDvar => true)). reflexivity. Qed. Lemma bool_fun_neq_lemma : forall bf1 bf2 : bool_fun, ~ bool_fun_eq bf1 bf2 -> ~ bool_fun_eq bf2 bf1. Proof. (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) unfold not in |- *; intros. apply H. apply bool_fun_eq_symm. assumption. Qed. Lemma no_duplicate_node : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> var cfg node1 = var cfg node2 -> high cfg node1 = high cfg node2 -> low cfg node1 = low cfg node2 -> node1 = node2. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: @eq ad node1 node2 *) intros node1 node2 H H0 H1 H2 H3 H4. inversion H0. inversion H5. inversion H6. inversion H1. inversion H8. (* Goal: @eq ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter'))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) inversion H9. unfold var in H2; rewrite H7 in H2; rewrite H10 in H2. (* Goal: @eq ad node1 node2 *) unfold high in H3; rewrite H7 in H3; rewrite H10 in H3. unfold low in H4; rewrite H7 in H4; rewrite H10 in H4. (* Goal: @eq ad node1 node2 *) cut (BDDshare_lookup share x x0 x1 = Some node1). cut (BDDshare_lookup share x2 x3 x4 = Some node2). (* Goal: forall (_ : BDDstate_OK bs) (_ : and (BDDsharing_OK bs share) (and (forall (a : ad) (_ : @eq bool (Nleb counter a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) counter) true))), @eq (option ad) (BDDshare_lookup share x2 x3 x4) (@Some ad node2) *) (* Goal: @eq (option ad) (BDDshare_lookup share x x0 x1) (@Some ad node1) *) intros H11 H12. rewrite H2 in H12. rewrite H3 in H12. rewrite H4 in H12. rewrite H11 in H12. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) injection H12. intro H13. rewrite H13; reflexivity. elim H. intros H11 H12. apply (proj2 (proj1 H12 x2 x3 x4 node2)). (* Goal: config_node_OK cfg node *) assumption. elim H; intros. apply (proj2 (proj1 H12 x x0 x1 node1)). (* Goal: config_node_OK cfg node *) assumption. Qed. Lemma BDDunique_1 : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall (n : nat) (node1 node2 : ad), n = max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2) -> node1 = node2. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (n : nat) (node1 node2 : ad) (_ : @eq nat n (max (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)), @eq ad node1 node2 *) intros H n. apply lt_wf_ind with (P := fun n : nat => forall node1 node2 : ad, n = max (nat_of_N (var (bs, (share, counter)) node1)) (nat_of_N (var (bs, (share, counter)) node2)) -> config_node_OK (bs, (share, counter)) node1 -> config_node_OK (bs, (share, counter)) node2 -> bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node1) (bool_fun_of_BDD (bs, (share, counter)) node2) -> node1 = node2). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intros n0 H00. intros node1 node2 H0 H1 H2 H3. elim H1; intro. elim H2; intro. rewrite H4; rewrite H5; reflexivity. (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) elim H5; intro. rewrite H4 in H3. rewrite H6 in H3. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)) in H3. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) in H3. (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) absurd (bool_fun_eq bool_fun_zero bool_fun_one). exact bool_fun_zero_one_eq. (* Goal: config_node_OK cfg node *) assumption. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node2) bool_fun_zero). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1, @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) cut (is_internal_node (bs, (share, counter)) node2). intro H7. exact (proj1 (internal_node_not_constant (bs, (share, counter)) node2 H H7)). (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. apply bool_fun_eq_trans with (bool_fun_of_BDD (bs, (share, counter)) node1). apply bool_fun_eq_symm; assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H4. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. elim H4; intro. elim H2; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_zero *) (* Goal: @eq ad node1 node2 *) rewrite H5 in H3; rewrite H6 in H3. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)) in H3. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) in H3. (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) absurd (bool_fun_eq bool_fun_one bool_fun_zero). exact bool_fun_one_zero_eq. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. elim H6; intro. rewrite H5; rewrite H7; reflexivity. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node2) bool_fun_one). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1, not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one *) (* Goal: @eq ad node1 node2 *) cut (is_internal_node (bs, (share, counter)) node2). intro H8. exact (proj2 (internal_node_not_constant (bs, (share, counter)) node2 H H8)). (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. rewrite H5 in H3. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) in H3. (* Goal: config_node_OK cfg node *) apply bool_fun_eq_symm. assumption. elim H2; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node1) bool_fun_zero). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1, not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_zero) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_zero *) (* Goal: @eq ad node1 node2 *) cut (is_internal_node (bs, (share, counter)) node1). intro H7. exact (proj1 (internal_node_not_constant (bs, (share, counter)) node1 H H7)). (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. rewrite H6 in H3. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)) in H3. (* Goal: config_node_OK cfg node *) assumption. elim H6; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) node1) bool_fun_one). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1, not (bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) bool_fun_one *) (* Goal: @eq ad node1 node2 *) cut (is_internal_node (bs, (share, counter)) node1). intro H8. exact (proj2 (internal_node_not_constant (bs, (share, counter)) node1 H H8)). (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. rewrite H7 in H3. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) in H3. (* Goal: config_node_OK cfg node *) assumption. cut (is_internal_node (bs, (share, counter)) node1). cut (is_internal_node (bs, (share, counter)) node2). (* Goal: forall (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intros H8 H9. elim (relation_sum (BDDcompare (var (bs, (share, counter)) node1) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) (var (bs, (share, counter)) node2))); intro y. (* Goal: forall (a : BDDvar) (b : prod ad ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) a b))), @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@None (prod BDDvar (prod ad ad))), @ex BDDvar (fun x : BDDvar => @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))))) *) (* Goal: BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x) Lt *) (* Goal: node_OK bs (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) x *) elim y; clear y; intro y0. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node1)). cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node2)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node1)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node2)). (* Goal: forall (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)), @eq ad node1 node2 *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intros H10 H11 H12 H13. cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: forall (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2))) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2))), @eq ad node1 node2 *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intros H14 H15. cut (high (bs, (share, counter)) node1 = high (bs, (share, counter)) node2). (* Goal: forall _ : @eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2), @eq ad node1 node2 *) (* Goal: @eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) cut (low (bs, (share, counter)) node1 = low (bs, (share, counter)) node2). intros H16 H17. (* Goal: config_node_OK cfg node *) apply no_duplicate_node with (cfg := (bs, (share, counter))). assumption. assumption. (* Goal: config_node_OK cfg node *) assumption. apply BDDcompare_eq; assumption. assumption. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim H11; intro. elim H10; intro. rewrite H16; rewrite H17; reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) elim H17; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H16; rewrite H18. apply bool_fun_neq_zero_one. assumption. assumption. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) apply bool_fun_neq_lemma. rewrite H16. apply bool_fun_neq_internal_zero. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. assumption. elim H16; intro. elim H10; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H17; rewrite H18. apply bool_fun_neq_one_zero. assumption. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim H18; intro. rewrite H17; rewrite H19; reflexivity. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H17. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_one. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. assumption. elim H10; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H18. apply bool_fun_neq_internal_zero. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. elim H18; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H19. apply bool_fun_neq_internal_one. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. apply H00 with (m := max (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node1))) (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node2)))). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H0. apply lt_max_1_2. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: config_node_OK cfg node *) assumption. assumption. apply in_dom_is_internal; assumption. apply BDDcompare_lt. (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_low. assumption. apply in_dom_is_internal; assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. reflexivity. assumption. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. elim H13; intro. elim H12; intro. rewrite H16; rewrite H17; reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) elim H17; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H16; rewrite H18; apply bool_fun_neq_zero_one. assumption. assumption. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H16. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_zero. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. assumption. elim H16; intro. rewrite H17 in H15. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) elim H12; intro. rewrite H18 in H15. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) BDDone) (bool_fun_of_BDD (bs, (share, counter)) BDDzero)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_neq_one_zero. assumption. assumption. elim H18; intro. rewrite H17; rewrite H19; reflexivity. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) BDDone) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) apply bool_fun_neq_lemma. apply bool_fun_neq_internal_one. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. elim H12; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H18. apply bool_fun_neq_internal_zero. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. elim H18; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H19. apply bool_fun_neq_internal_one. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. apply H00 with (m := max (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node1))) (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node2)))). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H0. apply lt_max_1_2. apply BDDcompare_lt. apply BDDvar_ordered_high. (* Goal: config_node_OK cfg node *) assumption. assumption. apply in_dom_is_internal. assumption. apply BDDcompare_lt. (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_high. assumption. apply in_dom_is_internal. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. reflexivity. assumption. assumption. (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) false). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) false). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) true) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) cut (var (bs, (share, counter)) node1 = var (bs, (share, counter)) node2). intro H14. (* Goal: config_node_OK cfg node *) rewrite H14. apply bool_fun_restrict_eq. assumption. apply BDDcompare_eq. (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_symm. apply bool_fun_of_BDDlow. assumption. (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) true). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) true). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) true) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) cut (var (bs, (share, counter)) node1 = var (bs, (share, counter)) node2). intro H14. (* Goal: config_node_OK cfg node *) rewrite H14. apply bool_fun_restrict_eq. assumption. apply BDDcompare_eq. (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_symm. apply bool_fun_of_BDDhigh. assumption. (* Goal: config_node_OK cfg node *) assumption. apply low_OK. assumption. assumption. apply low_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply high_OK. assumption. assumption. apply high_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node1)). cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node2)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node1)). cut (* Goal: forall (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)), @eq ad node1 node2 *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node2)). intros H10 H11 H12 H13. (* Goal: @eq ad node1 node2 *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad node1 node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) cut (low (bs, (share, counter)) node2 = high (bs, (share, counter)) node2). intros H14. cut (Neqb (low (bs, (share, counter)) node2) (high (bs, (share, counter)) node2) = false). (* Goal: forall _ : @eq bool true false, @eq ad node1 node2 *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) false *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) rewrite H14. rewrite (Neqb_correct (high (bs, (share, counter)) node2)). intro H15. (* Goal: config_node_OK cfg node *) discriminate H15. apply low_high_neq. assumption. assumption. cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro H14. elim H10; intro. elim H12; intro. rewrite H15; rewrite H16; reflexivity. (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) elim H16; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H15; rewrite H17. apply bool_fun_neq_zero_one. assumption. assumption. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H15. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_zero. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. assumption. elim H15; intro. elim H12; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H16; rewrite H17. apply bool_fun_neq_one_zero. assumption. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim H17; intro. rewrite H16; rewrite H18; reflexivity. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H16. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_one. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. assumption. elim H12; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H17. apply bool_fun_neq_internal_zero. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. elim H17; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node2)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node2))). (* Goal: config_node_OK cfg node *) rewrite H18. apply bool_fun_neq_internal_one. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. apply H00 with (m := max (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node2))) (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node2)))). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H0. apply lt_max_2. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: config_node_OK cfg node *) assumption. assumption. apply in_dom_is_internal; assumption. apply BDDcompare_lt. (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_high. assumption. apply in_dom_is_internal; assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. reflexivity. assumption. assumption. (* Goal: config_node_OK cfg node *) assumption. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) false) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) true)). (* Goal: forall _ : bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1), bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H14. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) false). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node2) true). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_symm. apply bool_fun_of_BDDhigh. assumption. (* Goal: config_node_OK cfg node *) assumption. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node2) false) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node2) true)). (* Goal: forall _ : bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1), bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H14. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node2) false). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. apply bool_fun_eq_symm. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node2) true). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_restrict_eq. assumption. cut (bool_fun_independent (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node2)). (* Goal: bool_fun_eq bf1 bf2 *) intro H14. unfold bool_fun_independent in H14. unfold bool_fun_eq in |- *. unfold bool_fun_restrict in |- *. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eval at 1 3 in |- *. intro vb. rewrite (H14 vb); reflexivity. apply BDDvar_independent_1 with (n := nat_of_N (var (bs, (share, counter)) node1)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. assumption. reflexivity. assumption. apply low_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply low_OK. assumption. assumption. apply high_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply high_OK. assumption. assumption. cut (BDDcompare (var (bs, (share, counter)) node2) (var (bs, (share, counter)) node1) = Datatypes.Lt). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) clear y; intro y. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node1)). cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node2)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node1)). cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node2)). (* Goal: forall (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)), @eq ad node1 node2 *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intros H10 H11 H12 H13. cut (low (bs, (share, counter)) node1 = high (bs, (share, counter)) node1). (* Goal: forall _ : @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1), @eq ad node1 node2 *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intros H14. cut (Neqb (low (bs, (share, counter)) node1) (high (bs, (share, counter)) node1) = false). (* Goal: forall _ : @eq bool true false, @eq ad node1 node2 *) (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) false *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) rewrite H14. rewrite (Neqb_correct (high (bs, (share, counter)) node1)). intro H15. (* Goal: config_node_OK cfg node *) discriminate H15. apply low_high_neq. assumption. assumption. cut (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro H14. elim H11; intro. elim H13; intro. rewrite H15; rewrite H16; reflexivity. (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) elim H16; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H15; rewrite H17. apply bool_fun_neq_zero_one. assumption. assumption. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H15. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_zero. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. assumption. elim H15; intro. elim H13; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H16; rewrite H17. apply bool_fun_neq_one_zero. assumption. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) elim H17; intro. rewrite H16; rewrite H18; reflexivity. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H16. apply bool_fun_neq_lemma. apply bool_fun_neq_internal_one. assumption. (* Goal: config_node_OK cfg node *) apply in_dom_is_internal. assumption. assumption. elim H13; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H17. apply bool_fun_neq_internal_zero. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. elim H17; intro. absurd (bool_fun_eq (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node1)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node1))). (* Goal: config_node_OK cfg node *) rewrite H18. apply bool_fun_neq_internal_one. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. assumption. apply H00 with (m := max (nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node1))) (nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node1)))). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq nat (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H0. apply lt_max_12. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: config_node_OK cfg node *) assumption. assumption. apply in_dom_is_internal; assumption. apply BDDcompare_lt. (* Goal: config_node_OK cfg node *) apply BDDvar_ordered_high. assumption. apply in_dom_is_internal; assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) apply in_dom_is_internal; assumption. reflexivity. assumption. assumption. (* Goal: config_node_OK cfg node *) assumption. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) true)). (* Goal: forall _ : bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1), bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H14. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) false). (* Goal: config_node_OK cfg node *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node1) (var (bs, (share, counter)) node1) true). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_symm. apply bool_fun_of_BDDhigh. assumption. (* Goal: config_node_OK cfg node *) assumption. cut (bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node1) true)). (* Goal: forall _ : bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1), bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) true) *) (* Goal: bool_fun_independent (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1) *) (* Goal: @eq comparison (BDDcompare (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1)) Lt *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node2 *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node1 *) intro H14. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node1) false). (* Goal: config_node_OK cfg node *) apply bool_fun_restrict_eq. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node1) true). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_restrict_eq. apply bool_fun_eq_symm. assumption. cut (bool_fun_independent (bool_fun_of_BDD (bs, (share, counter)) node2) (var (bs, (share, counter)) node1)). (* Goal: bool_fun_eq bf1 bf2 *) intro H14. unfold bool_fun_independent in H14. unfold bool_fun_eq in |- *. unfold bool_fun_restrict in |- *. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eval at 1 3 in |- *. intro vb. rewrite (H14 vb); reflexivity. apply BDDvar_independent_1 with (n := nat_of_N (var (bs, (share, counter)) node2)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. assumption. reflexivity. assumption. apply low_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply low_OK. assumption. assumption. apply high_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply high_OK. assumption. assumption. apply BDDcompare_sup_inf. (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. apply in_dom_is_internal. (* Goal: config_node_OK cfg node *) assumption. Qed. Lemma BDDunique : forall cfg : BDDconfig, BDDconfig_OK cfg -> forall node1 node2 : ad, config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2) -> node1 = node2. Proof. (* Goal: forall (cfg : BDDconfig) (_ : BDDconfig_OK cfg) (node1 node2 : ad) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)), @eq ad node1 node2 *) intros cfg H node1 node2 H0 H1 H2. apply BDDunique_1 with (cfg := cfg) (n := max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. reflexivity. assumption. assumption. assumption. Qed. Lemma bool_fun_eq_lemma : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_eq (bool_fun_restrict bf1 x true) (bool_fun_restrict bf2 x true) -> bool_fun_eq (bool_fun_restrict bf1 x false) (bool_fun_restrict bf2 x false) -> bool_fun_eq bf1 bf2. Proof. (* Goal: bool_fun_eq bf1 bf2 *) intros bf1 bf2 x H H0 H1 H2. unfold bool_fun_eq in |- *. intro vb. elim (sumbool_of_bool (vb x)); intro. (* Goal: @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) cut (var_binding_eq (augment vb x true) vb). intro H3. cut (bool_fun_eval bf2 (augment vb x true) = bool_fun_eval bf2 vb). (* Goal: forall (_ : @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb)) (_ : @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb)), @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) cut (bool_fun_eval bf1 (augment vb x true) = bool_fun_eval bf1 vb). intros H4 H5. (* Goal: @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) rewrite <- H4. rewrite <- H5. unfold bool_fun_eq, bool_fun_restrict in H1. (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) unfold bool_fun_eval at 1 3 in H1. apply H1. apply H. assumption. apply H0. (* Goal: var_binding_eq (augment vb x false) vb *) assumption. apply augment_eq. assumption. cut (var_binding_eq (augment vb x false) vb). (* Goal: forall _ : var_binding_eq (augment vb x false) vb, @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) intro H3. cut (bool_fun_eval bf2 (augment vb x false) = bool_fun_eval bf2 vb). (* Goal: forall (_ : @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb)) (_ : @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb)), @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) cut (bool_fun_eval bf1 (augment vb x false) = bool_fun_eval bf1 vb). intros H4 H5. (* Goal: @eq bool (bool_fun_eval bf1 vb) (bool_fun_eval bf2 vb) *) (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) rewrite <- H4. rewrite <- H5. unfold bool_fun_eq, bool_fun_restrict in H2. (* Goal: @eq bool (bool_fun_eval bf1 (augment vb x false)) (bool_fun_eval bf1 vb) *) (* Goal: @eq bool (bool_fun_eval bf2 (augment vb x false)) (bool_fun_eval bf2 vb) *) (* Goal: var_binding_eq (augment vb x false) vb *) unfold bool_fun_eval at 1 3 in H2. apply H2. apply H. assumption. apply H0. (* Goal: var_binding_eq (augment vb x false) vb *) assumption. apply augment_eq. assumption. Qed. Lemma bool_fun_preservation_1 : forall cfg cfg' : BDDconfig, BDDconfig_OK cfg -> BDDconfig_OK cfg' -> (forall (x : BDDvar) (l r a : ad), MapGet _ (fst cfg) a = Some (x, (l, r)) -> MapGet _ (fst cfg') a = Some (x, (l, r))) -> forall (n : nat) (node : ad), n = nat_of_N (var cfg node) -> config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (cfg cfg' : BDDconfig) (_ : BDDconfig_OK cfg) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var cfg node))) (_ : config_node_OK cfg node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) intro cfg. elim cfg; clear cfg; intros bs y. elim y; clear y; intros share counter. (* Goal: forall (cfg' : BDDconfig) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDconfig_OK cfg') (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intro cfg'. elim cfg'; clear cfg'; intros bs' y'. elim y'; clear y'; intros share' counter'. (* Goal: forall (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter'))) (_ : forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) intros H H0 H1 n. apply lt_wf_ind with (P := fun n : nat => forall node : ad, n = nat_of_N (var (bs, (share, counter)) node) -> config_node_OK (bs, (share, counter)) node -> bool_fun_eq (bool_fun_of_BDD (bs', (share', counter')) node) (bool_fun_of_BDD (bs, (share, counter)) node)). (* Goal: forall _ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node, bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intros n0 H2 node H3 H4. cut (config_node_OK (bs', (share', counter')) node). intro H5. elim H4; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite H6. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite (proj1 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. elim H6; intro. rewrite H7. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0))) . rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. cut (is_internal_node (bs, (share, counter)) node). (* Goal: forall (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) cut (is_internal_node (bs', (share', counter')) node). intros H8 H9. cut (bool_fun_eq (bool_fun_of_BDD (bs', (share', counter')) (low (bs', (share', counter')) node)) (bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node))). cut (bool_fun_eq (bool_fun_of_BDD (bs', (share', counter')) (high (bs', (share', counter')) node)) (bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node))). (* Goal: forall (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intros H10 H11. cut (var (bs, (share, counter)) node = var (bs', (share', counter')) node). (* Goal: bool_fun_ext (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intro H12. apply bool_fun_eq_lemma with (x := var (bs, (share, counter)) node). apply bool_fun_of_BDD_ext. (* Goal: bool_fun_ext (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) apply bool_fun_of_BDD_ext. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs', (share', counter')) (high (bs', (share', counter')) node)). (* Goal: config_node_OK cfg node *) apply bool_fun_eq_symm. rewrite H12. apply bool_fun_of_BDDhigh. assumption. (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs, (share, counter)) (high (bs, (share, counter)) node)). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs', (share', counter')) (low (bs', (share', counter')) node)). (* Goal: config_node_OK cfg node *) rewrite H12. apply bool_fun_eq_symm; apply bool_fun_of_BDDlow; assumption; assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs, (share, counter)) (low (bs, (share, counter)) node)). (* Goal: config_node_OK cfg node *) assumption. apply bool_fun_of_BDDlow; assumption; assumption. unfold var in |- *. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) inversion H9. inversion H12. inversion H13. rewrite H14. rewrite (H1 x x0 x1 node H14). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node)). cut (config_node_OK (bs', (share', counter')) (high (bs', (share', counter')) node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (high (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intros H10 H11. inversion H9. inversion H12. inversion H13. cut (high (bs', (share', counter')) node = high (bs, (share, counter)) node). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) cut (low (bs', (share', counter')) node = low (bs, (share, counter)) node). intros H15 H16. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) elim H11; intro. rewrite H16; rewrite H17. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite (proj1 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. elim H17; intro. rewrite H16; rewrite H18. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0))) . rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. rewrite H16. apply H2 with (m := nat_of_N (var (bs, (share, counter)) (high (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H3. apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. reflexivity. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold low in |- *. rewrite H14. rewrite (H1 x x0 x1 node H14). reflexivity. unfold high in |- *. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite H14. rewrite (H1 x x0 x1 node H14). reflexivity. apply high_OK. assumption. (* Goal: config_node_OK cfg node *) assumption. apply high_OK. assumption. assumption. cut (low (bs', (share', counter')) node = low (bs, (share, counter)) node). (* Goal: forall _ : @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intro H10. rewrite H10. cut (config_node_OK (bs, (share, counter)) (low (bs, (share, counter)) node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) intro H11. elim H11. intro H12. rewrite H12. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq ad (low (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) rewrite (proj1 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. intro H12. elim H12; intro. rewrite H13. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H))) . rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs', (share', counter')) H0))) . (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) unfold bool_fun_eq in |- *; reflexivity. apply H2 with (m := nat_of_N (var (bs, (share, counter)) (low (bs, (share, counter)) node))). (* Goal: config_node_OK cfg node *) rewrite H3. apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. apply in_dom_is_internal. assumption. reflexivity. apply low_OK. (* Goal: config_node_OK cfg node *) assumption. assumption. apply low_OK. assumption. assumption. unfold low in |- *. (* Goal: @eq ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter'))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node with | Some (pair x (pair l r as p0) as p) => l | None => N0 end *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')) node *) inversion H9. inversion H10. inversion H11. rewrite H12. rewrite (H1 x x0 x1 node H12). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) reflexivity. apply in_dom_is_internal. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) node)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) intro y. elim y; intro x. elim x; intros x0 x1. elim x1; intros y0 y1 y2. unfold in_dom in |- *. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite (H1 x0 y0 y1 node y2). reflexivity. intro y. unfold in_dom in H7. (* Goal: config_node_OK cfg node *) rewrite y in H7; discriminate. apply in_dom_is_internal. assumption. elim H4; intro. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite H5. left; reflexivity. elim H5; intro. rewrite H6; right; left; reflexivity. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) right; right. elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) node)). (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) intro y. elim y; intro x. elim x; intro y0. intro y1. elim y1; intros y2 y3 y4. unfold in_dom in |- *; rewrite (H1 y0 y2 y3 node y4); reflexivity. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@None (prod BDDvar (prod ad ad))), @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs' (@pair BDDsharing_map ad share' counter')))) true *) intro y. unfold in_dom in H6; rewrite y in H6; discriminate. Qed. Lemma bool_fun_preservation : forall (cfg cfg' : BDDconfig) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> (forall (x : BDDvar) (l r a : ad), MapGet _ (fst cfg) a = Some (x, (l, r)) -> MapGet _ (fst cfg') a = Some (x, (l, r))) -> config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node). Proof. (* Goal: config_node_OK cfg node *) intros cfg cfg' node H H0 H1 H2. apply bool_fun_preservation_1 with (n := nat_of_N (var cfg node)). assumption. (* Goal: @eq nat (N.to_nat (var cfg node)) (N.to_nat (var cfg node)) *) (* Goal: config_node_OK cfg node *) assumption. assumption. reflexivity. assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Definition BDDstate := Map (BDDvar * (ad * ad)). (* BDDstates are maps from (node) addresses to actual nodes. These nodes contain a variable, the address of the left subBDD, and the address of the right subBDD. BDDstates should obey a few invariants: *) Definition initBDDstate := newMap (BDDvar * (ad * ad)). Inductive BDDbounded (bs : BDDstate) : ad -> BDDvar -> Prop := | BDDbounded_0 : forall n : BDDvar, BDDbounded bs BDDzero n | BDDbounded_1 : forall n : BDDvar, BDDbounded bs BDDone n | BDDbounded_2 : forall (node : ad) (n x : BDDvar) (l r : ad), MapGet _ bs node = Some (x, (l, r)) -> BDDcompare x n = Datatypes.Lt -> Neqb l r = false -> BDDbounded bs l x -> BDDbounded bs r x -> BDDbounded bs node n. Lemma BDDbounded_lemma : forall (bs : BDDstate) (node : ad) (n : BDDvar), BDDbounded bs node n -> node = BDDzero \/ node = BDDone \/ (exists x : BDDvar, (exists l : BDDvar, (exists r : BDDvar, MapGet _ bs node = Some (x, (l, r)) /\ BDDcompare x n = Datatypes.Lt /\ Neqb l r = false /\ BDDbounded bs l x /\ BDDbounded bs r x))). Proof. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map ad) (l r : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) a b)) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) l) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) r) (_ : forall (x' : BDDvar) (l' r' a0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), BDDsharing_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r))) (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r)))) *) intro bs. intro node. intro n. intro H. elim H. intros n0. left. trivial. intros n0. (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) right. left. trivial. intros node0 n0 x l r H0 H1 H2 H3 H4 H5 H6. right. right. split with x. (* Goal: @ex BDDvar (fun l : BDDvar => @ex BDDvar (fun r : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node0) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x (@pair BDDvar BDDvar l r)))) (and (@eq comparison (BDDcompare x n0) Lt) (and (@eq bool (N.eqb l r) false) (and (BDDbounded bs l x) (BDDbounded bs r x)))))) *) split with l. split with r. split. assumption. split. assumption. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) split. assumption. split. assumption. assumption. Qed. Lemma increase_bound : forall (bs : BDDstate) (n n' : BDDvar) (node : ad), BDDbounded bs node n -> BDDcompare n n' = Datatypes.Lt -> BDDbounded bs node n'. Proof. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map ad) (l r : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) a b)) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) l) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) r) (_ : forall (x' : BDDvar) (l' r' a0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), BDDsharing_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r))) (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r)))) *) intro bs. intro n. intro n'. intro node. intro H. elim H. intros n0 H0. (* Goal: forall (n : BDDvar) (_ : @eq comparison (BDDcompare n n') Lt), BDDbounded bs BDDone n' *) (* Goal: forall (node : ad) (n x : BDDvar) (l r : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : @eq comparison (BDDcompare x n) Lt) (_ : @eq bool (N.eqb l r) false) (_ : BDDbounded bs l x) (_ : forall _ : @eq comparison (BDDcompare x n') Lt, BDDbounded bs l n') (_ : BDDbounded bs r x) (_ : forall _ : @eq comparison (BDDcompare x n') Lt, BDDbounded bs r n') (_ : @eq comparison (BDDcompare n n') Lt), BDDbounded bs node n' *) apply BDDbounded_0. intros n0 H0. apply BDDbounded_1. intros node0 n0 x l r H0 H1 H2 H3 H4 H5 H6 H7. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDbounded_2 with (x := x) (l := l) (r := r). assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDcompare_trans with (y := n0). assumption. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. assumption. assumption. Qed. Lemma boundedness_preservation : forall bs bs' : BDDstate, (forall (a l r : ad) (x : BDDvar), MapGet _ bs a = Some (x, (l, r)) -> MapGet _ bs' a = Some (x, (l, r))) -> forall (n : BDDvar) (node : ad), BDDbounded bs node n -> BDDbounded bs' node n. Proof. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l BDDzero))) BDDzero x *) (* Goal: forall _ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r y) true), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros bs bs' H n node H0. elim H0. intro n0. apply BDDbounded_0. intro n0. apply BDDbounded_1. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S x) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros node0 n0 x l r H1 H2 H3 H4 H5 H6 H7. apply BDDbounded_2 with (x := x) (l := l) (r := r). apply H. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. assumption. assumption. assumption. assumption. Qed. Definition BDDordered (bs : BDDstate) (node : ad) := match MapGet _ bs node with | None => True | Some (n, _) => BDDbounded bs node (ad_S n) end. Definition BDD_OK (bs : BDDstate) (node : ad) := BDDordered bs node. Definition BDDstate_OK (bs : BDDstate) := MapGet _ bs BDDzero = None /\ MapGet _ bs BDDone = None /\ (forall a : ad, in_dom _ a bs = true -> BDD_OK bs a). Lemma initBDDstate_OK : BDDstate_OK initBDDstate. Proof. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDstate_OK, initBDDstate in |- *. split. simpl in |- *. trivial. split. simpl in |- *. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) trivial. intros a H. compute in H. discriminate H. Qed. Definition BDDsharing_map := Map (Map (Map ad)). (* These are maps from left-hand sides l to maps from right-hand sides r to maps from BDD variables x to the address of the unique node in the given BDDstate that contains (x, (l, r)). *) Definition initBDDsharing_map := newMap (Map (Map ad)). Definition BDDshare_lookup (share : BDDsharing_map) (x : BDDvar) (l r : ad) : option ad := match MapGet _ share l with | None => None | Some m1 => match MapGet _ m1 r with | None => None | Some m2 => match MapGet _ m2 x with | None => None | Some y => Some y end end end. Definition BDDshare_put (share : BDDsharing_map) (x : BDDvar) (l r counter : ad) : BDDsharing_map := let m1 := match MapGet _ share l with | Some y => y | None => newMap (Map ad) end in let m2 := match MapGet _ m1 r with | Some y => y | None => newMap ad end in let m2' := MapPut _ m2 x counter in let m1' := MapPut _ m1 r m2' in MapPut _ share l m1'. Lemma BDDshare_put_puts : forall (share : BDDsharing_map) (x : BDDvar) (l r counter : ad), BDDshare_lookup (BDDshare_put share x l r counter) x l r = Some counter. Proof. (* Goal: forall (share : BDDsharing_map) (x : BDDvar) (l r counter : ad), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x l r) (@Some ad counter) *) intros share x l r counter. unfold BDDshare_put in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim (option_sum _ (MapGet (Map (Map ad)) share l)). intro y. elim y. (* Goal: forall (x0 : ad) (_ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad x0)), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) clear y. intros x0 y. rewrite y. elim (option_sum _ (MapGet (Map ad) x0 r)). (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) intros y0. elim y0. clear y0. intros x1 y0. rewrite y0. unfold BDDshare_lookup in |- *. rewrite (MapPut_semantics _ share l (MapPut (Map ad) x0 r (MapPut ad x1 x counter)) l) . (* Goal: @eq (option ad) match (if N.eqb l l then @Some (Map (Map ad)) (MapPut (Map ad) x0 r (MapPut ad x1 x counter)) else MapGet (Map (Map ad)) share l) with | Some m1 => match MapGet (Map ad) m1 r with | Some m2 => match MapGet ad m2 x with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) cut (Neqb l l = true). intros H. rewrite H. (* Goal: @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad x1 x counter)) r with | Some m2 => match MapGet ad m2 x with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter) *) (* Goal: @eq bool (N.eqb l l) true *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) rewrite (MapPut_semantics _ x0 r (MapPut ad x1 x counter) r). (* Goal: @eq (option ad) match (if N.eqb r r then @Some (Map ad) (MapPut ad x1 x counter) else MapGet (Map ad) x0 r) with | Some m2 => match MapGet ad m2 x with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter) *) (* Goal: @eq bool (N.eqb l l) true *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) cut (Neqb r r = true). intros H0. rewrite H0. (* Goal: @eq (option ad) match MapGet ad (MapPut ad x1 x counter) x with | Some y => @Some ad y | None => @None ad end (@Some ad counter) *) (* Goal: @eq bool (N.eqb r r) true *) (* Goal: @eq bool (N.eqb l l) true *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) rewrite (MapPut_semantics _ x1 x counter x). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb x x = true). intros H1. rewrite H1. trivial. (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) apply Neqb_correct. apply Neqb_correct. apply Neqb_correct. intros y0. (* Goal: @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option ad) (MapGet ad x1 x') (@None ad), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@None (Map ad)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite y0. unfold BDDshare_lookup in |- *. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad (newMap ad) x counter)) l) . (* Goal: @eq (option ad) match (if N.eqb l l then @Some (Map (Map ad)) (M1 (Map ad) r (M1 ad x counter)) else MapGet (Map (Map ad)) share l) with | Some m1 => match MapGet (Map ad) m1 r with | Some m2 => match MapGet ad m2 x with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter) *) rewrite (Neqb_correct l). rewrite (MapPut_semantics (Map ad) x0 r (MapPut ad (newMap ad) x counter) r) . (* Goal: @eq (option ad) match (if N.eqb r r then @Some (Map ad) (M1 ad x counter) else @None (Map ad)) with | Some m2 => match MapGet ad m2 x with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter) *) rewrite (Neqb_correct r). (* Goal: @eq (option ad) match MapGet ad (MapPut ad (newMap ad) x counter) x with | Some y => @Some ad y | None => @None ad end (@Some ad counter) *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x l r) (@Some ad counter) *) rewrite (MapPut_semantics ad (newMap ad) x counter x). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite (Neqb_correct x). trivial. intros y. rewrite y. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDshare_lookup in |- *. simpl in |- *. rewrite (MapPut_semantics (Map (Map ad)) share l (M1 (Map ad) r (M1 ad x counter)) l). (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite (Neqb_correct l). simpl in |- *. rewrite (Neqb_correct r). simpl in |- *. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite (Neqb_correct x). trivial. Qed. Lemma BDDshare_put_no_new_node : forall (share : BDDsharing_map) (x x' : BDDvar) (l l' r r' counter counter' : ad), BDDshare_lookup (BDDshare_put share x l r counter) x' l' r' = Some counter' -> BDDshare_lookup share x' l' r' = Some counter' \/ (x, (l, r)) = (x', (l', r')). Proof. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (BDDshare_put share x l r counter) l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intros share x x' l l' r r' counter counter'. unfold BDDshare_put in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim (option_sum _ (MapGet (Map (Map ad)) share l)). intro y. elim y. (* Goal: forall (x0 : ad) (_ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad x0)), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) clear y. intros x0 y H. rewrite y in H. (* Goal: or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) elim (option_sum _ (MapGet (Map ad) x0 r)). intro y0. elim y0. clear y0. (* Goal: forall (x1 : Map ad) (_ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@Some (Map ad) x1)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@None (Map ad)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intros x1 y0. rewrite y0 in H. unfold BDDshare_lookup in |- *. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (BDDshare_put share x l r counter) l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) unfold BDDshare_lookup in H. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad x1 x counter)) l') in H. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) cut (Neqb l l' = true \/ Neqb l l' = false). intro H0. elim H0. clear H0. (* Goal: forall _ : @eq bool (N.eqb y1 BDDone) true, False *) intro H0. rewrite H0 in H. (* Goal: or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) rewrite (MapPut_semantics (Map ad) x0 r (MapPut ad x1 x counter) r') in H. (* Goal: forall _ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb r r' = true \/ Neqb r r' = false). intro H1. elim H1. clear H1. (* Goal: forall _ : @eq bool (N.eqb y1 a0) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb y1 a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) y a0) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (N.eqb y1 a0) false *) (* Goal: @eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1)) x l r))))) true *) intro H1. rewrite H1 in H. (* Goal: or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r) (@None (Map ad)), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) rewrite (MapPut_semantics ad x1 x counter x') in H. (* Goal: forall (_ : or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false)) (_ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false)), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb x x' = true \/ Neqb x x' = false). intro H2. elim H2. clear H2. (* Goal: or (@eq ad x0 BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) x0 bs) true) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H2. rewrite H2 in H. right. cut (x = x'). cut (l = l'). cut (r = r'). intros H3 H4 H5. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H3. rewrite H4. rewrite H5. trivial. apply Neqb_complete. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. apply Neqb_complete. assumption. apply Neqb_complete. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro H3. rewrite H3 in H. cut (l = l'). intro H4. cut (r = r'). (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) intro H5. rewrite <- H4. rewrite <- H5. rewrite y. rewrite y0. left. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. apply Neqb_complete. assumption. apply Neqb_complete. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. elim (Neqb x x'). auto. auto. intro H2. rewrite H2 in H. (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) cut (l = l'). intro H3. rewrite <- H3. rewrite y. left. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply Neqb_complete. assumption. elim (Neqb r r'). auto. auto. (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) intro H1. rewrite H1 in H. left. assumption. elim (Neqb l l'). auto. (* Goal: @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) auto. intro y0. unfold BDDshare_lookup in |- *. unfold BDDshare_lookup in H. (* Goal: @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite y0 in H. cut (Neqb l l' = true \/ Neqb l l' = false). intro H0. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim H0. clear H0. intro H0. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad (newMap ad) x counter)) l') in H. (* Goal: or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) rewrite H0 in H. rewrite (MapPut_semantics (Map ad) x0 r (MapPut ad (newMap ad) x counter) r') in H. (* Goal: forall _ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb r r' = true \/ Neqb r r' = false). intro H1. elim H1. clear H1. (* Goal: forall _ : @eq bool (N.eqb r r') true, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) intros H1. rewrite H1 in H. cut (l = l'). cut (r = r'). intros H2 H3. rewrite <- H2. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a), False *) (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite <- H3. rewrite y. rewrite y0. (* Goal: forall (_ : or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false)) (_ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false)), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb x x' = true \/ Neqb x x' = false). intro H4. elim H4. clear H4. (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intro H4. cut (x = x'). intro H5. rewrite <- H5. auto. apply Neqb_complete. (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) assumption. intro H5. left. (* Goal: @eq (option ad) (@None ad) (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: @eq ad r r' *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq (option ad) match MapGet (Map (Map ad)) share l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) (* Goal: forall (_ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad)))) (_ : @eq (option ad) (BDDshare_lookup (MapPut (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter))) x' l' r') (@Some ad counter')), or (@eq (option ad) (BDDshare_lookup share x' l' r') (@Some ad counter')) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) rewrite (MapPut_semantics ad (newMap ad) x counter x') in H. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H5 in H. simpl in H. assumption. elim (Neqb x x'). auto. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) auto. apply Neqb_complete. assumption. apply Neqb_complete. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro H2. rewrite H2 in H. cut (l = l'). intro H3. rewrite <- H3. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite y. auto. apply Neqb_complete. assumption. elim (Neqb r r'). (* Goal: forall _ : @eq bool (N.eqb y1 a0) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb y1 a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) y a0) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (N.eqb y1 a0) false *) (* Goal: @eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1)) x l r))))) true *) auto. auto. intro H1. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) x0 r (MapPut ad (newMap ad) x counter)) l') in H. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H1 in H. auto. elim (Neqb l l'). auto. auto. intro y. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a), False *) (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDshare_lookup in |- *. rewrite y. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) (newMap (Map ad)) r (MapPut ad match MapGet (Map ad) (newMap (Map ad)) r with | None => newMap ad | Some y => y end x counter)) l'). (* Goal: @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) cut (Neqb l l' = true \/ Neqb l l' = false). (* Goal: forall (_ : or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false)) (_ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false)), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb x x' = true \/ Neqb x x' = false). (* Goal: forall _ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb r r' = true \/ Neqb r r' = false). (* Goal: forall _ : @eq bool (N.eqb y1 a0) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb y1 a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) y a0) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (N.eqb y1 a0) false *) (* Goal: @eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1)) x l r))))) true *) intros H H0 H1 H2. elim H1. clear H1. intro H1. rewrite H1 in H2. rewrite (MapPut_semantics (Map ad) (newMap (Map ad)) r (MapPut ad match MapGet (Map ad) (newMap (Map ad)) r with | None => newMap ad | Some y => y end x counter) r') in H2. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) elim H. clear H. intro H. rewrite H in H2. simpl in H2. elim H0. (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intro H3. cut (l = l'). cut (r = r'). cut (x = x'). intros H4 H5 H6. rewrite <- H4. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite <- H5. rewrite <- H6. auto. apply Neqb_complete. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply Neqb_complete. assumption. apply Neqb_complete. assumption. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) intro H3. rewrite H3 in H2. discriminate H2. intro H3. rewrite H3 in H2. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) simpl in H2. discriminate H2. intro H3. rewrite H3 in H2. auto. (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim (Neqb r r'). auto. auto. elim (Neqb x x'). auto. auto. (* Goal: or (@eq bool false true) (@eq bool false false) *) elim (Neqb l l'). auto. auto. Qed. Lemma BDDshare_put_preserves_nodes : forall (share : BDDsharing_map) (x x' : BDDvar) (l l' r r' counter counter' : ad), BDDshare_lookup share x' l' r' = Some counter' -> (x, (l, r)) <> (x', (l', r')) -> BDDshare_lookup (BDDshare_put share x l r counter) x' l' r' = Some counter'. Proof. (* Goal: @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) intros share x x' l l' r r' counter counter' H H0. cut (Neqb l l' = true \/ Neqb l l' = false). (* Goal: forall _ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb r r' = true \/ Neqb r r' = false). (* Goal: forall (_ : or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false)) (_ : or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false)), @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) cut (Neqb x x' = true \/ Neqb x x' = false). intros H1 H2 H3. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))), @eq bool match MapGet (prod BDDvar (prod ad ad)) bs x0 with | Some a => true | None => false end true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb x x' = false \/ Neqb l l' = false \/ Neqb r r' = false). intro H4. (* Goal: @eq (option ad) (BDDshare_lookup (BDDshare_put share x l r counter) x' l' r') (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) unfold BDDshare_lookup in |- *. unfold BDDshare_lookup in H. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (BDDshare_put share x l r counter) l' with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) unfold BDDshare_put in |- *. rewrite (MapPut_semantics (Map (Map ad)) share l (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | None => newMap (Map ad) | Some y => y end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | None => newMap (Map ad) | Some y => y end r with | None => newMap ad | Some y => y end x counter)) l'). (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: @eq BDDvar x x' *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim H3. intro H5. rewrite H5. clear H3. cut (l = l'). intro H3. (* Goal: @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite <- H3 in H. elim (option_sum _ (MapGet (Map (Map ad)) share l)). (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro y. elim y. clear y. intros x0 y. rewrite y. rewrite y in H. elim H2. (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: @eq BDDvar x x' *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intro H6. cut (r = r'). intro H7. rewrite (MapPut_semantics (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | None => newMap ad | Some y => y end x counter) r'). (* Goal: forall (x : BDDvar) (l r _ : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) y y0)), and (forall (a0 : ad) (_ : @eq bool (Nleb (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r)))) a0) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r))) a0) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r))))) true) *) rewrite H6. elim (option_sum _ (MapGet (Map ad) x0 r')). intro y0. elim y0. (* Goal: forall (a : BDDsharing_map) (b : ad) (x : BDDvar) (l r _ : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad a b))), and (forall (a1 : ad) (_ : @eq bool (Nleb (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad a b)) x l r)))) a1) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad a b)) x l r))) a1) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad a b)) x l r))))) true) *) clear y0. intros x1 y0. rewrite y0 in H. elim (option_sum _ (MapGet ad x1 x')). (* Goal: forall _ : @sig ad (fun y : ad => @eq (option ad) (MapGet ad x1 x') (@Some ad y)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option ad) (MapGet ad x1 x') (@None ad), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@None (Map ad)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) intros y1. elim y1. clear y1. intros x2 y1. rewrite y1 in H. (* Goal: @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option ad) (MapGet ad x1 x') (@None ad), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@None (Map ad)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite <- H7 in y0. rewrite y0. elim H1. intros H8. rewrite H3 in H0. (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite H7 in H0. cut (x = x'). intro H9. rewrite H9 in H0. cut False. tauto. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply H0. reflexivity. apply Neqb_complete. assumption. intros H8. (* Goal: @eq (option ad) match MapGet ad (MapPut ad x1 x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option ad) (MapGet ad x1 x') (@None ad), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) x0 r') (@None (Map ad)), @eq (option ad) match MapGet ad (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter) x' with | Some y => @Some ad y | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: forall _ : @eq (option (Map (Map ad))) (MapGet (Map (Map ad)) share l) (@None (Map (Map ad))), @eq (option ad) match MapGet (Map ad) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: @eq ad l l' *) (* Goal: forall _ : @eq bool (N.eqb l l') false, @eq (option ad) match (if N.eqb l l' then @Some (Map (Map ad)) (MapPut (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r (MapPut ad match MapGet (Map ad) match MapGet (Map (Map ad)) share l with | Some y => y | None => newMap (Map ad) end r with | Some y => y | None => newMap ad end x counter)) else MapGet (Map (Map ad)) share l') with | Some m1 => match MapGet (Map ad) m1 r' with | Some m2 => match MapGet ad m2 x' with | Some y => @Some ad y | None => @None ad end | None => @None ad end | None => @None ad end (@Some ad counter') *) (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) rewrite (MapPut_semantics ad x1 x counter x'). rewrite H8. rewrite y1. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro y1. rewrite y1 in H. discriminate H. intro y0. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite y0 in H. discriminate H. apply Neqb_complete. assumption. (* Goal: forall _ : forall (n : BDDvar) (node : ad) (_ : BDDbounded y node n), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) node n, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H6. rewrite (MapPut_semantics (Map ad) x0 r (MapPut ad match MapGet (Map ad) x0 r with | None => newMap ad | Some y => y end x counter) r'). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H6. assumption. intro y. rewrite y in H. discriminate H. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply Neqb_complete. assumption. intro H5. rewrite H5. assumption. (* Goal: @eq bool (Nleb (Npos (xO xH)) (ad_S y1)) true *) elim H1. intro H4. cut (x = x'). intro H5. elim H2. intro H6. cut (r = r'). intro H7. (* Goal: or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: forall _ : @eq bool (N.eqb l l') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: @eq ad r r' *) (* Goal: forall _ : @eq bool (N.eqb r r') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: @eq BDDvar x x' *) (* Goal: forall _ : @eq bool (N.eqb x x') false, or (@eq bool (N.eqb x x') false) (or (@eq bool (N.eqb l l') false) (@eq bool (N.eqb r r') false)) *) (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim H3. intro H8. cut (l = l'). intro H9. rewrite H5 in H0. rewrite H7 in H0. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H9 in H0. cut False. tauto. apply H0. trivial. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply Neqb_complete. assumption. auto. apply Neqb_complete. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. auto. apply Neqb_complete. assumption. auto. (* Goal: or (@eq bool (N.eqb x x') true) (@eq bool (N.eqb x x') false) *) (* Goal: or (@eq bool (N.eqb r r') true) (@eq bool (N.eqb r r') false) *) (* Goal: or (@eq bool (N.eqb l l') true) (@eq bool (N.eqb l l') false) *) elim (Neqb x x'). auto. auto. elim (Neqb r r'). auto. auto. (* Goal: or (@eq bool false true) (@eq bool false false) *) elim (Neqb l l'). auto. auto. Qed. Definition BDDsharing_OK (bs : BDDstate) (share : BDDsharing_map) := forall (x : BDDvar) (l r a : ad), BDDshare_lookup share x l r = Some a <-> MapGet _ bs a = Some (x, (l, r)). Lemma initBDDsharing_map_OK : BDDsharing_OK initBDDstate initBDDsharing_map. Proof. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDsharing_OK, initBDDstate, initBDDsharing_map in |- *. split. intros H. (* Goal: @eq (option ad) (BDDshare_lookup (newMap (Map (Map ad))) x l r) (@Some ad a) *) compute in H. discriminate H. intros H. compute in H. discriminate H. Qed. Definition BDDconfig := (BDDstate * (BDDsharing_map * ad))%type. Definition initBDDconfig := (initBDDstate, (initBDDsharing_map, ad_S (ad_S N0))). Definition BDDconfig_OK (cfg : BDDconfig) := match cfg return Prop with | (bs, (share, counter)) => BDDstate_OK bs /\ BDDsharing_OK bs share /\ (forall a : ad, Nleb counter a = true -> MapGet _ bs a = None) /\ Nleb (ad_S (ad_S N0)) counter = true end. Lemma initBDDconfig_OK : BDDconfig_OK initBDDconfig. Proof. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDconfig_OK, initBDDconfig in |- *. split. exact initBDDstate_OK. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) split. exact initBDDsharing_map_OK. split. intros a H. simpl in |- *. trivial. trivial. Qed. Lemma config_OK_zero : forall cfg : BDDconfig, BDDconfig_OK cfg -> MapGet _ (fst cfg) BDDzero = None. Proof. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. intros share counter. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H. elim H. intros H0 H1. elim H0. intros H2 H3. simpl in |- *. exact H2. Qed. Lemma config_OK_one : forall cfg : BDDconfig, BDDconfig_OK cfg -> MapGet _ (fst cfg) BDDone = None. Proof. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. intros share counter. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H. elim H. intros H0 H1. elim H0. intros H2 H3. simpl in |- *. exact (proj1 H3). Qed. Definition BDDalloc (cfg : BDDconfig) (x : BDDvar) (l r : ad) := match cfg with | (bs, (share, counter)) => let share' := BDDshare_put share x l r counter in let bs' := MapPut _ bs counter (x, (l, r)) in let counter' := ad_S counter in (bs', (share', counter'), counter) end. Lemma BDDsharing_lookup_semantics : forall (bs : BDDstate) (share : BDDsharing_map) (n l r : ad) (x : BDDvar), BDDsharing_OK bs share -> (BDDshare_lookup share x l r = Some n <-> MapGet _ bs n = Some (x, (l, r))). Proof. (* Goal: or (@eq bool false true) (@eq bool false false) *) auto. Qed. Definition node_OK (bs : BDDstate) (node : ad) := node = BDDzero \/ node = BDDone \/ in_dom _ node bs = true. Lemma BDDbounded_node_OK : forall (bs : BDDstate) (node : ad) (n : BDDvar), BDDbounded bs node n -> node_OK bs node. Proof. (* Goal: forall (bs : BDDstate) (node : ad) (n : BDDvar) (_ : BDDbounded bs node n), node_OK bs node *) intros bs node n H. cut (node = BDDzero \/ node = BDDone \/ (exists x : BDDvar, (exists l : BDDvar, (exists r : BDDvar, MapGet _ bs node = Some (x, (l, r)) /\ BDDcompare x n = Datatypes.Lt /\ (* Goal: or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) Neqb l r = false /\ BDDbounded bs l x /\ BDDbounded bs r x)))). intros H0. elim H0; intro. left. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) elim H1; intro. right; left; assumption. inversion H2. inversion H3. (* Goal: or (@eq ad x0 BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) x0 bs) true) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) inversion H4. right; right. unfold in_dom in |- *. rewrite (proj1 H5); reflexivity. apply BDDbounded_lemma. assumption. Qed. Lemma BDDalloc_allocates : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), MapGet _ (fst (fst (BDDalloc cfg x l r))) (snd (BDDalloc cfg x l r)) = Some (x, (l, r)). Proof. (* Goal: forall (x : BDDvar) (l r _ : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) y y0)), and (forall (a0 : ad) (_ : @eq bool (Nleb (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r)))) a0) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r))) a0) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y y0) x l r))))) true) *) intro cfg. elim cfg. clear cfg. intros bs y0. elim y0. clear y0. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros share counter l r x. simpl in |- *. rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) counter) . (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) cut (Neqb counter counter = true). intro H. rewrite H. trivial. (* Goal: @eq bool (N.eqb counter counter) true *) apply Neqb_correct. Qed. Lemma BDDalloc_preserves_nodes : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> forall (a l1 r1 : ad) (x1 : BDDvar), MapGet _ (fst cfg) a = Some (x1, (l1, r1)) -> MapGet _ (fst (fst (BDDalloc cfg x l r))) a = Some (x1, (l1, r1)). Proof. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. intros y0 y1 l r x H a l1 r1 x1 H0. elim H. clear H. intros H H1. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) y y1 (x, (l, r)) a). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb y1 a = false). intro H2. rewrite H2. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb y1 a <> true). intros H2. apply not_true_is_false. assumption. (* Goal: @eq bool (Nleb (Npos (xO xH)) (ad_S y1)) true *) unfold not in |- *. intros H2. elim H1. intros H3 H4. elim H4. intros H5 H6. lapply (H5 a). (* Goal: False *) (* Goal: @eq bool (Nleb y1 a) true *) intros H7. rewrite H7 in H0. discriminate H0. lapply (Neqb_complete y1 a). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H7. rewrite H7. apply Nleb_refl. assumption. Qed. Lemma BDDalloc_no_new_node : forall (cfg : BDDconfig) (l l1 r r1 a : ad) (x x1 : BDDvar), MapGet _ (fst (fst (BDDalloc cfg x l r))) a = Some (x1, (l1, r1)) -> a = snd (snd cfg) \/ MapGet _ (fst cfg) a = Some (x1, (l1, r1)). Proof. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros share counter l l' r r' a x x'. simpl in |- *. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: or (@eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) a). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) cut (Neqb counter a = true \/ Neqb counter a = false). intro H. elim H. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) clear H. intro H. left. rewrite (Neqb_complete counter a). trivial. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro H0. rewrite H0. auto. elim (Neqb counter a). auto. (* Goal: or (@eq bool false true) (@eq bool false false) *) auto. Qed. Lemma BDDalloc_no_new_node_1 : forall (cfg : BDDconfig) (l l1 r r1 a : ad) (x x1 : BDDvar), MapGet _ (fst (fst (BDDalloc cfg x l r))) a = Some (x1, (l1, r1)) -> (x1, (l1, r1)) = (x, (l, r)) \/ MapGet _ (fst cfg) a = Some (x1, (l1, r1)). Proof. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. simpl in |- *. (* Goal: forall (b : prod BDDsharing_map ad) (x : BDDvar) (l r _ : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) y b)), and (forall (a0 : ad) (_ : @eq bool (Nleb (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y b) x l r)))) a0) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y b) x l r))) a0) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y b) x l r))))) true) *) intro y0. intro y1. intro l. intro l1. intro r. intro r1. intro a. intro x. intro x1. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) y y1 (x, (l, r)) a). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))), or (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1)))) *) case (Neqb y1 a). intro H. left. injection H. intros H0 H1 H2. rewrite H0. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H1. rewrite H2. trivial. intros H. right. assumption. Qed. Lemma BDDalloc_preserves_zero : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> MapGet _ (fst (fst (BDDalloc cfg x l r))) BDDzero = None. Proof. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros y0 y1 l r x H. simpl in |- *. elim H. clear H. intros H H0. elim H0. clear H0. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H0 H1. elim H1. clear H1. intros H1 H2. clear H1 H0. elim H. clear H. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) BDDone) (@None (prod BDDvar (prod ad ad))) *) intros H H0. clear H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) BDDzero) (@None (prod BDDvar (prod ad ad))) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) y y1 (x, (l, r)) BDDzero). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb y1 BDDzero = false). intro H0. rewrite H0. assumption. (* Goal: forall _ : @eq bool (N.eqb y1 BDDone) true, False *) cut (Neqb y1 BDDzero = true -> False). intro H0. apply not_true_is_false. (* Goal: forall _ : @eq bool (N.eqb y1 BDDone) true, False *) exact H0. intro H0. rewrite (Neqb_complete y1 BDDzero) in H2. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) compute in H2. discriminate H2. assumption. Qed. Lemma BDDalloc_preserves_one : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> MapGet _ (fst (fst (BDDalloc cfg x l r))) BDDone = None. Proof. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros y0 y1 l r x H. simpl in |- *. elim H. clear H. intros H H0. elim H0. clear H0. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H0 H1. elim H1. clear H1. intros H1 H2. clear H1 H0. elim H. clear H. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H H0. clear H. elim H0. clear H0. intros H H0. clear H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) BDDone) (@None (prod BDDvar (prod ad ad))) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) y y1 (x, (l, r)) BDDone). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb y1 BDDone = false). intro H0. rewrite H0. assumption. (* Goal: forall _ : @eq bool (N.eqb y1 BDDone) true, False *) cut (Neqb y1 BDDone = true -> False). intro H0. apply not_true_is_false. (* Goal: forall _ : @eq bool (N.eqb y1 BDDone) true, False *) exact H0. intro H0. rewrite (Neqb_complete y1 BDDone) in H2. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) compute in H2. discriminate H2. assumption. Qed. Lemma BDDalloc_keeps_state_OK : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> node_OK (fst cfg) l -> node_OK (fst cfg) r -> Neqb l r <> true -> (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt) -> (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt) -> BDDstate_OK (fst (fst (BDDalloc cfg x l r))). Proof. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros y0 y1 l r x H H0 H1 H2 H3 H4. split. apply BDDalloc_preserves_zero. assumption. split. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_preserves_one. simpl in H0, H1, H3, H4. assumption. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. simpl in H0, H1, H3, H4. intros a H5. unfold BDD_OK in |- *. (* Goal: BDDordered (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a *) unfold BDDordered in |- *. unfold in_dom in H5. elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (MapPut (BDDvar * (ad * ad)) y y1 (x, (l, r))) a)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros y2. elim y2. clear y2. intro x0. elim x0. intro y2. intro y3. elim y3. (* Goal: forall (a0 b : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad a0 b)))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p1 as p0) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intro y4. intro y5. intro y6. rewrite y6. clear H5 x0 y3. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim (BDDalloc_no_new_node_1 (y, (y0, y1)) l y4 r y5 a x y2 y6). intros H5. (* Goal: @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r) (@Some ad a) *) (* Goal: @eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) (* Goal: or (@eq ad a (@snd BDDsharing_map ad (@snd BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) *) injection H5. clear H5. intros H5 H6 H7. rewrite H7. rewrite H5 in y6. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S x) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) rewrite H6 in y6. rewrite H7 in y6. clear H5 H6 H7. clear y2 y4 y5. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDbounded_2 with (x := x) (l := l) (r := r). assumption. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDcompare_succ. apply not_true_is_false. assumption. elim H. (* Goal: forall (_ : forall _ : @eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (_ : forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: BDDsharing_OK bs share *) (* Goal: forall _ : @eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: or (@eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) intros H5 H6. elim H5. intros H7 H8. elim H8. intros H9 H10. unfold node_OK in H0. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l BDDzero))) BDDzero x *) (* Goal: forall _ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r y) true), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim H0. intro H11. rewrite H11. apply BDDbounded_0. intros H11. elim H11. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l BDDone))) BDDone x *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) r y) true, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H12. rewrite H12. apply BDDbounded_1. intros H12. lapply (H10 l). (* Goal: forall _ : BDD_OK y a, BDDbounded y a (ad_S y2) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) a y) true *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H13. unfold BDD_OK in H10. unfold BDDordered in H10. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l y) true *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) unfold in_dom in H12. clear H11. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l y) true *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) y l)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros y2. elim y2. clear y2. intro x0. elim x0. clear x0. intro y2. intro y3. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 y3)), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim y3. clear y3. intros y3 y4 y5. clear H8. clear H12. (* Goal: BDDbounded y a (ad_S y2) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) a y) true *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) unfold BDD_OK in H13. unfold BDDordered in H13. rewrite y5 in H13. (* Goal: forall _ : or (@eq comparison (BDDcompare (ad_S y2) x) Lt) (@eq N (ad_S y2) x), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y l) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l y) true *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (BDDcompare_1 y2 x). intros H8. elim H8. intros H11. (* Goal: forall _ : @eq N (ad_S y2) x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (increase_bound y (ad_S y2) x l). intros H12. cut (BDDbounded y l x). (* Goal: forall _ : BDDbounded y r x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: BDDbounded y r x *) (* Goal: BDDbounded y r (ad_S y2) *) (* Goal: forall _ : @eq N (ad_S y2) x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H14. lapply (boundedness_preservation y (MapPut _ y y1 (x, (l, r)))). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros. apply H15. assumption. intros. cut (MapGet _ (fst (fst (BDDalloc (y, (y0, y1)) x l r))) a0 = Some (x0, (l0, r0))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. trivial. apply BDDalloc_preserves_nodes. assumption. simpl in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. exact (H12 H11). assumption. intros. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y l) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) l x *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l y) true *) (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) rewrite H11 in H13. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (boundedness_preservation y (MapPut _ y y1 (x, (l, r)))). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros. apply H12. assumption. intros. cut (MapGet _ (fst (fst (BDDalloc (y, (y0, y1)) x l r))) a0 = Some (x0, (l0, r0))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. trivial. apply BDDalloc_preserves_nodes. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. apply H3 with (xl := y2) (ll := y3) (rl := y4). assumption. intro y2. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite y2 in H12. discriminate H12. assumption. unfold node_OK in H1. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l BDDzero))) BDDzero x *) (* Goal: forall _ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r y) true), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim H1. intro H5. rewrite H5. apply BDDbounded_0. intros H5. elim H5. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l BDDone))) BDDone x *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) r y) true, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) clear H5. intros H5. rewrite H5. apply BDDbounded_1. intros H6. (* Goal: forall (_ : forall _ : @eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (_ : forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: BDDsharing_OK bs share *) (* Goal: forall _ : @eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: or (@eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) unfold in_dom in H6. clear H5. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) y r)). intros y2. elim y2. (* Goal: forall (x0 : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@Some (prod BDDvar (prod ad ad)) x0)), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) clear y2. intro x0. elim x0. clear x0. intro y2. intro y3. elim y3. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) clear y3. intros y3 y4 y5. clear H6. elim H. intros H5 H6. elim H5. intros H7 H8. (* Goal: or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a) *) (* Goal: or (@eq ad a (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq ad a (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) *) elim H8. clear H8. intros H8 H9. unfold in_dom in H9. lapply (H9 r). (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H10. unfold BDD_OK in H10. unfold BDDordered in H10. (* Goal: forall _ : or (@eq comparison (BDDcompare (ad_S y2) x) Lt) (@eq N (ad_S y2) x), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) rewrite y5 in H10. lapply (BDDcompare_1 y2 x). intros H11. elim H11. (* Goal: forall _ : @eq N (ad_S y2) x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros H12. lapply (increase_bound y (ad_S y2) x r). intros H13. (* Goal: forall _ : BDDbounded y r x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: BDDbounded y r x *) (* Goal: BDDbounded y r (ad_S y2) *) (* Goal: forall _ : @eq N (ad_S y2) x, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) cut (BDDbounded y r x). intros H14. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (boundedness_preservation y (MapPut _ y y1 (x, (l, r)))). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H15. apply H15. assumption. intros a0 l0 r0 x0 H15. cut (MapGet _ (fst (fst (BDDalloc (y, (y0, y1)) x l r))) a0 = Some (x0, (l0, r0))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. trivial. apply BDDalloc_preserves_nodes. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. assumption. exact (H13 H12). assumption. intros H12. (* Goal: BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: @eq comparison (BDDcompare y2 x) Lt *) (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) y r with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y r) (@None (prod BDDvar (prod ad ad))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y2 (@pair ad ad y4 y5))), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) rewrite H12 in H10. (* Goal: forall _ : BDD_OK y a, BDDbounded y a (ad_S y2) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) a y) true *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (boundedness_preservation y (MapPut _ y y1 (x, (l, r)))). intros H13. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply H13. assumption. intros a0 l0 r0 x0 H13. cut (MapGet _ (fst (fst (BDDalloc (y, (y0, y1)) x l r))) a0 = Some (x0, (l0, r0))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. trivial. apply BDDalloc_preserves_nodes. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. assumption. apply H4 with (xr := y2) (lr := y3) (rr := y4). assumption. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite y5. trivial. intro y2. rewrite y2 in H6. discriminate H6. (* Goal: forall _ : @eq bool (N.eqb counter a) true, @eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) *) (* Goal: @eq bool (N.eqb counter a) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) (* Goal: or (@eq ad a (@snd BDDsharing_map ad (@snd BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) *) intros H5. simpl in H5. (* Goal: forall _ : forall (n : BDDvar) (node : ad) (_ : BDDbounded y node n), BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) node n, BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S y2) *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (boundedness_preservation y (MapPut _ y y1 (x, (l, r)))). intros H6. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply H6. elim H. intros H7 H8. elim H7. intros H9 H10. elim H10. intros H11 H12. (* Goal: forall _ : BDD_OK y a, BDDbounded y a (ad_S y2) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) a y) true *) (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) lapply (H12 a). intros H13. unfold BDD_OK in H13. unfold BDDordered in H13. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite H5 in H13. assumption. unfold in_dom in |- *. rewrite H5. trivial. (* Goal: forall (a l0 r0 : ad) (x0 : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) y a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))), match MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a with | Some (pair n p0 as p) => BDDbounded (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a (ad_S n) | None => True end *) intros a0 l0 r0 x0 H6. cut (MapGet _ (fst (fst (BDDalloc (y, (y0, y1)) x l r))) a0 = Some (x0, (l0, r0))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. trivial. apply BDDalloc_preserves_nodes. assumption. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. assumption. intros y2. rewrite y2. trivial. Qed. Lemma BDDalloc_adjusts_counter : forall (cfg : BDDconfig) (x : BDDvar) (l r a : ad), BDDconfig_OK cfg -> (forall a : ad, Nleb (snd (snd (fst (BDDalloc cfg x l r)))) a = true -> MapGet _ (fst (fst (BDDalloc cfg x l r))) a = None) /\ Nleb (ad_S (ad_S N0)) (snd (snd (fst (BDDalloc cfg x l r)))) = true. Proof. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intro y. intro y0. elim y0. clear y0. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros y0 y1 x l r a H. split. simpl in |- *. intros a0 H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) y y1 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (Nleb (ad_S (ad_S N0)) (@snd BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) y (@pair BDDsharing_map ad y0 y1)) x l r))))) true *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) y y1 (x, (l, r)) a0). (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb y1 a0 = false). intro H1. rewrite H1. elim H. intros. elim H3. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros. elim H5. intros. apply H6. apply ad_S_le_then_le. assumption. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply ad_S_le_then_neq. assumption. simpl in |- *. elim H. intros. elim H1. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros. elim H3. intros. apply le_then_le_S. assumption. Qed. Lemma BDDalloc_keeps_sharing_OK : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> node_OK (fst cfg) l -> node_OK (fst cfg) r -> (forall (x' : BDDvar) (l' r' a : ad), MapGet _ (fst cfg) a = Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r'))) -> BDDsharing_OK (fst (fst (BDDalloc cfg x l r))) (fst (snd (fst (BDDalloc cfg x l r)))). Proof. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map ad) (l r : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) a b)) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) l) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) r) (_ : forall (x' : BDDvar) (l' r' a0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) a b)) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), BDDsharing_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r))) (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) a b) x l r)))) *) intro cfg. elim cfg. clear cfg. intro bs. intro y. elim y. clear y. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros share counter. split. simpl in |- *. intros H3. cut (BDDshare_lookup share x0 l0 r0 = Some a \/ (x, (l, r)) = (x0, (l0, r0))). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H4. elim H4. clear H4. intros H4. (* Goal: forall _ : @eq bool (N.eqb l r) false, and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (MapGet _ bs a = Some (x0, (l0, r0))). intro H5. change (MapGet (BDDvar * (ad * ad)) (fst (fst (BDDalloc (bs, (share, counter)) x l r))) a = Some (x0, (l0, r0))) in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_preserves_nodes. assumption. exact H5. (* Goal: forall _ : @eq bool (N.eqb l r) false, and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) lapply (BDDsharing_lookup_semantics bs share a l0 r0 x0). intro H5. elim H5. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) clear H5. intros H5 H6. apply H5. assumption. exact (proj1 (proj2 H)). (* Goal: forall _ : @eq bool (N.eqb l r) false, and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H5. clear H4. rewrite <- H5. injection H5. intros H4 H6 H7. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: or (@eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) rewrite <- H4 in H3. rewrite <- H6 in H3. rewrite <- H7 in H3. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: or (@eq (option ad) (BDDshare_lookup share x0 l0 r0) (@Some ad a)) (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) rewrite (BDDshare_put_puts share x l r counter) in H3. injection H3. (* Goal: forall _ : or (@eq ad a (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a) *) (* Goal: or (@eq ad a (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq ad a (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) *) intro H8. rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) a). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb counter a = true). intro H9. rewrite H9. trivial. rewrite H8. (* Goal: @eq bool (N.eqb counter counter) true *) apply Neqb_correct. apply BDDshare_put_no_new_node with (x' := x0) (l' := l0) (r' := r0) (counter := counter). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro H3. cut (a = snd (snd (bs, (share, counter))) \/ MapGet _ (fst (bs, (share, counter))) a = Some (x0, (l0, r0))). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))), @eq bool match MapGet (prod BDDvar (prod ad ad)) bs x0 with | Some a => true | None => false end true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H4. elim H4. clear H4. intro H4. cut ((x0, (l0, r0)) = (x, (l, r))). intro H5. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) injection H5. intros H6 H7 H8. rewrite H6. rewrite H7. rewrite H8. simpl in |- *. (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) bs x0 with | Some a => true | None => false end true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in H4. rewrite H4. apply BDDshare_put_puts. simpl in H3. rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) a) in H3. (* Goal: forall _ : @eq bool (N.eqb counter a) true, @eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) *) (* Goal: @eq bool (N.eqb counter a) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (BDDshare_lookup (@fst BDDsharing_map N (@snd (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) x0 l0 r0) (@Some ad a) *) (* Goal: or (@eq ad a (@snd BDDsharing_map ad (@snd BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))))) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) *) simpl in H4. cut (Neqb counter a = true). intros H5. rewrite H5 in H3. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) inversion H3. trivial. rewrite H4. apply Neqb_correct. intro H5. (* Goal: forall _ : @sig ad (fun y : ad => @eq (option ad) (BDDshare_lookup share x l r) (@Some ad y)), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a0 l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a0)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) clear H4. cut (BDDshare_lookup (fst (snd (bs, (share, counter)))) x0 l0 r0 = Some a). (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H4. simpl in |- *. simpl in H4. apply BDDshare_put_preserves_nodes. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. apply H2 with (a := a). assumption. elim H. intros H4 H6. elim H6. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros. simpl in |- *. simpl in H5. unfold BDDsharing_OK in H7. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold iff in H7. apply (proj2 (H7 x0 l0 r0 a)). assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_no_new_node with (x := x) (l := l) (r := r). assumption. Qed. Lemma BDDalloc_semantics : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> node_OK (fst cfg) l -> node_OK (fst cfg) r -> Neqb l r <> true -> (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt) -> (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt) -> (forall (x' : BDDvar) (l' r' a : ad), MapGet _ (fst cfg) a = Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r'))) -> BDDconfig_OK (fst (BDDalloc cfg x l r)) /\ MapGet _ (fst (fst (BDDalloc cfg x l r))) (snd (BDDalloc cfg x l r)) = Some (x, (l, r)) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDalloc cfg x l r))) a = Some (x', (l', r')) -> MapGet _ (fst cfg) a = Some (x', (l', r')) \/ snd (BDDalloc cfg x l r) = a) /\ (MapGet _ (fst cfg) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDalloc cfg x l r))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDalloc cfg x l r))) (snd (BDDalloc cfg x l r)). Proof. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros share counter l r x. intros. split. unfold BDDconfig_OK in |- *. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in |- *. split. change (BDDstate_OK (fst (fst (BDDalloc (bs, (share, counter)) x l r)))) in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_keeps_state_OK. assumption. assumption. assumption. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. assumption. assumption. split. change (BDDsharing_OK (fst (fst (BDDalloc (bs, (share, counter)) x l r))) (fst (snd (fst (BDDalloc (bs, (share, counter)) x l r))))) in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_keeps_sharing_OK. assumption. assumption. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. change ((forall a : ad, Nleb (snd (snd (fst (BDDalloc (bs, (share, counter)) x l r)))) a = true -> MapGet _ (fst (fst (BDDalloc (bs, (share, counter)) x l r))) a = None) /\ Nleb (ad_S (ad_S N0)) (snd (snd (fst (BDDalloc (bs, (share, counter)) x l r)))) = true) in |- *. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_adjusts_counter. assumption. assumption. split. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) apply BDDalloc_allocates. split. split. cut (MapGet (BDDvar * (ad * ad)) (fst (fst (BDDalloc (bs, (share, counter)) x l r))) a = Some (x', (l', r')) -> a = snd (BDDalloc (bs, (share, counter)) x l r) \/ MapGet (BDDvar * (ad * ad)) (fst (bs, (share, counter))) a = Some (x', (l', r'))). (* Goal: forall (_ : BDDstate_OK bs) (_ : and (BDDsharing_OK bs share) (and (forall (a : ad) (_ : @eq bool (Nleb counter a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs a) (@None (prod BDDvar (prod ad ad)))) (@eq bool (Nleb (ad_S (ad_S N0)) counter) true))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intros H6 H7. cut (a = snd (BDDalloc (bs, (share, counter)) x l r) \/ MapGet (BDDvar * (ad * ad)) (fst (bs, (share, counter))) a = Some (x', (l', r'))). (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H8. elim H8. right. rewrite H9. trivial. auto. apply H6. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. intro H6. cut (a = snd (snd (bs, (share, counter))) \/ MapGet _ (fst (bs, (share, counter))) a = Some (x', (l', r'))). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) tauto. apply BDDalloc_no_new_node with (x := x) (l := l) (r := r). assumption. exact (BDDalloc_preserves_nodes (bs, (share, counter)) l r x H a l' r' x'). (* Goal: or (@eq ad x0 BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) x0 bs) true) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold node_OK in |- *. right. right. unfold in_dom in |- *. simpl in |- *. rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) counter) . (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb counter counter = true). intro H6. rewrite H6. trivial. (* Goal: @eq bool (N.eqb counter counter) true *) apply Neqb_correct. Qed. Definition BDDmake (cfg : BDDconfig) (x : BDDvar) (l r : ad) := if Neqb l r then (cfg, l) else match cfg with | (bs, (share, counter)) => match BDDshare_lookup share x l r with | Some y => (cfg, y) | None => BDDalloc cfg x l r end end. Lemma BDDmake_semantics : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> node_OK (fst cfg) l -> node_OK (fst cfg) r -> (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt) -> (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt) -> BDDconfig_OK (fst (BDDmake cfg x l r)) /\ (Neqb l r = false -> MapGet _ (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r)) = Some (x, (l, r))) /\ (Neqb l r = true -> snd (BDDmake cfg x l r) = l) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')) -> MapGet _ (fst cfg) a = Some (x', (l', r')) \/ snd (BDDmake cfg x l r) = a) /\ (MapGet _ (fst cfg) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r)). Proof. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro cfg. elim cfg. clear cfg. intros bs y. elim y. clear y. (* Goal: forall (a : BDDsharing_map) (b l r : ad) (x : BDDvar) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) l) (_ : node_OK (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) r) (_ : forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt) (_ : forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt), and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r)) l) (and (forall (a0 l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r)) a0)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r))) (@snd BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad a b)) x l r)))))) *) intros share counter l r x. intros H H0 H1 H2 H3. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))), @eq bool match MapGet (prod BDDvar (prod ad ad)) bs x0 with | Some a => true | None => false end true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (Neqb l r = true \/ Neqb l r = false). intro H4. elim H4. clear H4. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H4. unfold BDDmake in |- *. rewrite H4. split. assumption. split. intro H5. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) discriminate H5. split. simpl in |- *. auto. split. simpl in |- *. auto. simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) (@snd BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))) (@snd BDDconfig ad (if N.eqb l r then @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l else match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) exact H0. intro H5. unfold BDDmake in |- *. rewrite H5. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) elim (option_sum _ (BDDshare_lookup share x l r)). clear H4. intro y. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) elim y. clear y. intro x0. intro y. rewrite y. split. simpl in |- *. exact H. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) split. intro H4. elim H. intros H6 H7. elim H7. intros H8 H9. (* Goal: and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) (@snd BDDconfig ad (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) unfold BDDsharing_OK in H8. simpl in |- *. apply (proj1 (H8 x l r x0)). (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. split. intro H4. discriminate H4. simpl in |- *. split. intros a l' r' x'. (* Goal: or (@eq ad x0 BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) x0 bs) true) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) tauto. unfold node_OK in |- *. right. right. unfold in_dom in |- *. (* Goal: @eq bool true true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs x0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (and (forall _ : @eq bool false false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end)) (@snd BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r end))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (MapGet _ bs x0 = Some (x, (l, r))). intro H4. rewrite H4. trivial. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) elim H. intros H4 H6. exact (proj1 (proj1 H6 x l r x0) y). intro y. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a), False *) (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) rewrite y. cut (BDDconfig_OK (fst (BDDalloc (bs, (share, counter)) x l r)) /\ MapGet _ (fst (fst (BDDalloc (bs, (share, counter)) x l r))) (snd (BDDalloc (bs, (share, counter)) x l r)) = Some (x, (l, r)) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDalloc (bs, (share, counter)) x l r))) a = Some (x', (l', r')) -> MapGet _ (fst (bs, (share, counter))) a = Some (x', (l', r')) \/ snd (BDDalloc (bs, (share, counter)) x l r) = a) /\ (MapGet _ (fst (bs, (share, counter))) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDalloc (bs, (share, counter)) x l r))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDalloc (bs, (share, counter)) x l r))) (snd (BDDalloc (bs, (share, counter)) x l r))). (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) intro H6. split. exact (proj1 H6). split. intro H7. (* Goal: and (forall _ : @eq bool false true, @eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd BDDconfig ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)))) *) (* Goal: and (BDDconfig_OK (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (@fst (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) (@snd (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (BDDalloc (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) exact (proj1 (proj2 H6)). split. intro H7. discriminate H7. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) exact (proj2 (proj2 H6)). apply BDDalloc_semantics. assumption. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) assumption. assumption. unfold not in |- *. intro. rewrite H5 in H6. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) discriminate H6. assumption. assumption. intros. unfold not in |- *. intros. (* Goal: False *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) simpl in H6. rewrite <- H7 in H6. (* Goal: forall _ : @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a), False *) (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) cut (BDDshare_lookup share x l r = Some a). rewrite y. discriminate. (* Goal: @eq (option ad) (BDDshare_lookup share x l r) (@Some ad a) *) (* Goal: or (@eq bool (N.eqb l r) true) (@eq bool (N.eqb l r) false) *) elim H. intros H8 H9. elim H9. intros H10 H11. unfold BDDsharing_OK in H10. (* Goal: or (@eq bool false true) (@eq bool false false) *) exact (proj2 (H10 x l r a) H6). elim (Neqb l r). auto. auto. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Require Import BDDdummy_lemma_2. Require Import BDDdummy_lemma_3. Require Import BDDdummy_lemma_4. Require Import bdd8. Require Import bdd9. Require Import bdd10. Definition BDDimpl (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad) := match BDDneg cfg negm node1 with | (cfg', (node1', negm')) => match BDDor cfg' orm node1' node2 with | (cfg'', (node, orm')) => (cfg'', (node, (negm', orm'))) end end. Lemma BDDimpl_keeps_config_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDconfig_OK (fst (BDDimpl cfg negm orm node1 node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). apply BDDor_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDimpl_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> config_node_OK (fst (BDDimpl cfg negm orm node1 node2)) (fst (snd (BDDimpl cfg negm orm node1 node2))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). replace node with (fst (snd (BDDor cfg' orm node1' node2))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDor_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Definition bool_fun_impl (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_binding => implb (bf1 vb) (bf2 vb). Lemma bool_fun_impl_is_neg_or_bf2 : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_or (bool_fun_neg bf1) bf2). Proof. (* Goal: forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_or (bool_fun_neg bf1) bf2) *) unfold bool_fun_eq, bool_fun_impl, bool_fun_or, bool_fun_neg in |- *. unfold bool_fun_eval in |- *. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. elim (bf1 vb). elim (bf2 vb). reflexivity. reflexivity. reflexivity. Qed. Lemma BDDimpl_is_impl : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD (fst (BDDimpl cfg negm orm node1 node2)) (fst (snd (BDDimpl cfg negm orm node1 node2)))) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg' node1') (bool_fun_of_BDD cfg' node2)). (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). replace node with (fst (snd (BDDor cfg' orm node1' node2))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDor_is_or. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. rewrite H5; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_of_BDD cfg node2)). (* Goal: BDDconfig_OK cfg' *) apply bool_fun_or_preserves_eq. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_is_neg. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_preserves_bool_fun. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_symm. apply bool_fun_impl_is_neg_or_bf2. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDimpl_preserves_nodes : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> nodes_preserved cfg (fst (BDDimpl cfg negm orm node1 node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_preserves_nodes. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). apply BDDor_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDimpl_keeps_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDimpl cfg negm orm node1 node2)) node. Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDimpl_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDimpl_preserves_bool_fun : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDimpl cfg negm orm node1 node2)) node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDimpl_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. apply BDDimpl_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDimpl_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDneg_memo_OK_2 (fst (BDDimpl cfg negm orm node1 node2)) (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). apply BDDor_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDimpl_keeps_or_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDor_memo_OK (fst (BDDimpl cfg negm orm node1 node2)) (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. elim (prod_sum _ _ (BDDor cfg' orm node1' node2)). intros cfg'' H5. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H5; clear H5. intro. elim x; clear x. intros node negm'' H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: BDDor_memo_OK cfg'' negm'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDor cfg' orm node1' node2)). replace negm'' with (snd (snd (BDDor cfg' orm node1' node2))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Definition BDDiff (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad) := match BDDimpl cfg negm orm node1 node2 with | (cfg', (node1', (negm', orm'))) => match BDDimpl cfg' negm' orm' node2 node1 with | (cfg'', (node2', (negm'', orm''))) => BDDand cfg'' negm'' orm'' node1' node2' end end. Lemma BDDiff_keeps_config_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDconfig_OK (fst (BDDiff cfg negm orm node1 node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_keeps_config_OK. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Lemma BDDiff_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> config_node_OK (fst (BDDiff cfg negm orm node1 node2)) (fst (snd (BDDiff cfg negm orm node1 node2))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Lemma BDDiff_preserves_nodes : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> nodes_preserved cfg (fst (BDDiff cfg negm orm node1 node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_preserves_nodes. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). apply BDDimpl_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_preserves_nodes. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Lemma BDDiff_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDneg_memo_OK_2 (fst (BDDiff cfg negm orm node1 node2)) (fst (snd (snd (BDDiff cfg negm orm node1 node2)))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Lemma BDDiff_keeps_or_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDor_memo_OK (fst (BDDiff cfg negm orm node1 node2)) (snd (snd (snd (BDDiff cfg negm orm node1 node2)))). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_keeps_or_memo_OK. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Definition bool_fun_iff (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_binding => eqb (bf1 vb) (bf2 vb). Lemma bool_fun_iff_is_and_impl_impl : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_and (bool_fun_impl bf1 bf2) (bool_fun_impl bf2 bf1)). Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => ifb (vb0 x) true false) vb) (bool_fun_eval (fun vb0 : var_binding => vb0 x) vb) *) unfold bool_fun_iff, bool_fun_eq, bool_fun_and, bool_fun_impl in |- *. unfold bool_fun_eval in |- *. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. elim (bf1 vb). elim (bf2 vb). reflexivity. reflexivity. reflexivity. Qed. Lemma bool_fun_and_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_and bf1' bf2'). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold bool_fun_eq in H, H0. unfold bool_fun_eval in H, H0. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) unfold bool_fun_eq, bool_fun_and in |- *. unfold bool_fun_eval in |- *. intro. rewrite (H vb). (* Goal: @eq bool (ifb false true false) false *) rewrite (H0 vb). reflexivity. Qed. Lemma bool_fun_impl_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_impl bf1' bf2'). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold bool_fun_eq in H, H0. unfold bool_fun_eval in H, H0. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) unfold bool_fun_eq, bool_fun_impl in |- *. unfold bool_fun_eval in |- *. intro. rewrite (H vb). (* Goal: @eq bool (ifb false true false) false *) rewrite (H0 vb). reflexivity. Qed. Lemma bool_fun_iff_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_iff bf1' bf2'). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold bool_fun_eq in H, H0. unfold bool_fun_eval in H, H0. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) unfold bool_fun_eq, bool_fun_iff in |- *. unfold bool_fun_eval in |- *. intro. rewrite (H vb). (* Goal: @eq bool (ifb false true false) false *) rewrite (H0 vb). reflexivity. Qed. Lemma BDDiff_is_iff : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2)) (fst (snd (BDDiff cfg negm orm node1 node2)))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDiff in |- *. elim (prod_sum _ _ (BDDimpl cfg negm orm node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. elim H4; clear H4. intro. elim x; clear x. intros node1' y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim y; clear y. intros negm' orm' H4. rewrite H4. elim (prod_sum _ _ (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg'' H5. elim H5; clear H5. intro. elim x; clear x. intros node2' y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y. intros negm'' orm'' H5. rewrite H5. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node1). cut (config_node_OK cfg' node2). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm''). intros. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg'' node1') (bool_fun_of_BDD cfg'' node2')). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDand_is_and. assumption. assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))). (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply bool_fun_and_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1'). (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). apply BDDimpl_preserves_bool_fun. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_is_impl. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfg' node2) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) (bool_fun_of_BDD cfg' node1)). replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_is_impl. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. apply bool_fun_impl_preserves_eq. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_preserves_bool_fun. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_preserves_bool_fun. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_iff_is_and_impl_impl. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). replace orm'' with (snd (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDimpl cfg' negm' orm' node2 node1)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg' negm' orm' node2 node1)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDimpl cfg' negm' orm' node2 node1))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDimpl cfg' negm' orm' node2 node1)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H5; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDimpl cfg negm orm node1 node2)))). apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg negm orm node1 node2)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDimpl cfg negm orm node1 node2)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node1' with (fst (snd (BDDimpl cfg negm orm node1 node2))). apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. replace cfg' with (fst (BDDimpl cfg negm orm node1 node2)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDimpl_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H4; reflexivity. Qed. Lemma BDDiff_keeps_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDiff cfg negm orm node1 node2)) node. Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDiff_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDiff_preserves_bool_fun : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDiff cfg negm orm node1 node2)) node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDiff_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. apply BDDiff_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. assumption. assumption. Qed. Definition BDDvar_make (cfg : BDDconfig) (x : BDDvar) := BDDmake cfg x BDDzero BDDone. Lemma BDDvar_make_keeps_config_OK : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> BDDconfig_OK (fst (BDDvar_make cfg x)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj1 (BDDmake_semantics _ _ _ _ _ _ _ _ _)). assumption. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) left; reflexivity. right; left; reflexivity. intros. rewrite (config_OK_zero cfg H) in H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) discriminate. intros. rewrite (config_OK_one cfg H) in H0. discriminate. Qed. Lemma BDDvar_make_node_OK : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> config_node_OK (fst (BDDvar_make cfg x)) (snd (BDDvar_make cfg x)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj2 (proj2 (proj2 (proj2 (BDDmake_semantics _ _ _ _ _ _ _ _ _))))). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) assumption. left; reflexivity. right; left; reflexivity. intros. rewrite (config_OK_zero cfg H) in H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) discriminate. intros. rewrite (config_OK_one cfg H) in H0. discriminate. Qed. Lemma BDDvar_make_preserves_nodes : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> nodes_preserved cfg (fst (BDDvar_make cfg x)). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDvar_make in |- *. apply BDDmake_preserves_nodes. assumption. Qed. Lemma BDDvar_make_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (x : BDDvar), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDneg_memo_OK_2 (fst (BDDvar_make cfg x)) negm. Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_negm_OK with (cfg := cfg). assumption. apply BDDvar_make_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply BDDvar_make_preserves_nodes. assumption. assumption. Qed. Lemma BDDvar_make_keeps_or_memo_OK : forall (cfg : BDDconfig) (orm : BDDor_memo) (x : BDDvar), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> BDDor_memo_OK (fst (BDDvar_make cfg x)) orm. Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_orm_OK with (cfg := cfg). assumption. apply BDDvar_make_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply BDDvar_make_preserves_nodes. assumption. assumption. Qed. Lemma BDDvar_make_keeps_node_OK : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDvar_make cfg x)) node. Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDvar_make_preserves_nodes. assumption. Qed. Lemma BDDvar_make_preserves_bool_fun : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDvar_make cfg x)) node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDvar_make_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply BDDvar_make_preserves_nodes. assumption. assumption. Qed. Definition bool_fun_var (x : BDDvar) : bool_fun := fun vb : var_binding => vb x. Lemma BDDvar_make_is_var : forall (cfg : BDDconfig) (x : BDDvar), BDDconfig_OK cfg -> bool_fun_eq (bool_fun_of_BDD (fst (BDDvar_make cfg x)) (snd (BDDvar_make cfg x))) (bool_fun_var x). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. apply bool_fun_eq_trans with (bf2 := bool_fun_if x bool_fun_one bool_fun_zero). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make cfg x)) (@snd BDDconfig ad (BDDvar_make cfg x))) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) unfold BDDvar_make in |- *. apply bool_fun_eq_trans with (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDmake_bool_fun. assumption. left; reflexivity. right; left; reflexivity. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. inversion H0. inversion H1. inversion H2. rewrite (config_OK_zero cfg H) in H3; discriminate. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. inversion H0. inversion H1. inversion H2. rewrite (config_OK_one cfg H) in H3; discriminate. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply bool_fun_if_preserves_eq. apply bool_fun_of_BDDone. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply bool_fun_of_BDDzero. assumption. unfold bool_fun_eq, bool_fun_one, bool_fun_zero, bool_fun_var, bool_fun_if in |- *. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) unfold bool_fun_eval in |- *. intro. elim (vb x). reflexivity. reflexivity. Qed. Inductive bool_expr : Set := | Zero : bool_expr | One : bool_expr | Var : BDDvar -> bool_expr | Neg : bool_expr -> bool_expr | Or : bool_expr -> bool_expr -> bool_expr | ANd : bool_expr -> bool_expr -> bool_expr | Impl : bool_expr -> bool_expr -> bool_expr | Iff : bool_expr -> bool_expr -> bool_expr. Fixpoint bool_fun_of_bool_expr (be : bool_expr) : bool_fun := match be with | Zero => bool_fun_zero | One => bool_fun_one | Var x => bool_fun_var x | Neg be' => bool_fun_neg (bool_fun_of_bool_expr be') | Or be1 be2 => bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | ANd be1 be2 => bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | Impl be1 be2 => bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | Iff be1 be2 => bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) end. Fixpoint BDDof_bool_expr (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (be : bool_expr) {struct be} : BDDconfig * (ad * (BDDneg_memo * BDDor_memo)) := match be with | Zero => (cfg, (BDDzero, (negm, orm))) | One => (cfg, (BDDone, (negm, orm))) | Var x => match BDDvar_make cfg x with | (cfg', node) => (cfg', (node, (negm, orm))) end | Neg be' => match BDDof_bool_expr cfg negm orm be' with | (cfg', (node, (negm', orm'))) => match BDDneg cfg' negm' node with | (cfg'', (node', negm'')) => (cfg'', (node', (negm'', orm'))) end end | Or be1 be2 => match BDDof_bool_expr cfg negm orm be1 with | (cfg', (node1, (negm', orm'))) => match BDDof_bool_expr cfg' negm' orm' be2 with | (cfg'', (node2, (negm'', orm''))) => match BDDor cfg'' orm'' node1 node2 with | (cfg''', (node, orm''')) => (cfg''', (node, (negm'', orm'''))) end end end | ANd be1 be2 => match BDDof_bool_expr cfg negm orm be1 with | (cfg', (node1, (negm', orm'))) => match BDDof_bool_expr cfg' negm' orm' be2 with | (cfg'', (node2, (negm'', orm''))) => BDDand cfg'' negm'' orm'' node1 node2 end end | Impl be1 be2 => match BDDof_bool_expr cfg negm orm be1 with | (cfg', (node1, (negm', orm'))) => match BDDof_bool_expr cfg' negm' orm' be2 with | (cfg'', (node2, (negm'', orm''))) => BDDimpl cfg'' negm'' orm'' node1 node2 end end | Iff be1 be2 => match BDDof_bool_expr cfg negm orm be1 with | (cfg', (node1, (negm', orm'))) => match BDDof_bool_expr cfg' negm' orm' be2 with | (cfg'', (node2, (negm'', orm''))) => BDDiff cfg'' negm'' orm'' node1 node2 end end end. Lemma BDDof_bool_expr_correct : forall (be : bool_expr) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> BDDconfig_OK (fst (BDDof_bool_expr cfg negm orm be)) /\ config_node_OK (fst (BDDof_bool_expr cfg negm orm be)) (fst (snd (BDDof_bool_expr cfg negm orm be))) /\ BDDneg_memo_OK_2 (fst (BDDof_bool_expr cfg negm orm be)) (fst (snd (snd (BDDof_bool_expr cfg negm orm be)))) /\ BDDor_memo_OK (fst (BDDof_bool_expr cfg negm orm be)) (snd (snd (snd (BDDof_bool_expr cfg negm orm be)))) /\ nodes_preserved cfg (fst (BDDof_bool_expr cfg negm orm be)) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDof_bool_expr cfg negm orm be)) (fst (snd (BDDof_bool_expr cfg negm orm be)))) (bool_fun_of_bool_expr be). Proof. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) simple induction be. intros. simpl in |- *. split. assumption. split. left; reflexivity. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. assumption. split. assumption. split. unfold nodes_preserved in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) assumption. apply bool_fun_of_BDDzero. assumption. simpl in |- *. split. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) split. right; left; reflexivity. split. assumption. split. assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) split. unfold nodes_preserved in |- *. intros; assumption. apply bool_fun_of_BDDone. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) assumption. simpl in |- *. intros. elim (prod_sum _ _ (BDDvar_make cfg b)). intros cfg' H2. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) elim H2; clear H2. intros node H2. rewrite H2. simpl in |- *. split. replace cfg' with (fst (BDDvar_make cfg b)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDvar_make_keeps_config_OK. assumption. rewrite H2; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. replace cfg' with (fst (BDDvar_make cfg b)). replace node with (snd (BDDvar_make cfg b)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDvar_make_node_OK. assumption. rewrite H2; reflexivity. rewrite H2; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. replace cfg' with (fst (BDDvar_make cfg b)). apply BDDvar_make_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. rewrite H2; reflexivity. split. replace cfg' with (fst (BDDvar_make cfg b)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDvar_make_keeps_or_memo_OK. assumption. assumption. rewrite H2; reflexivity. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDvar_make cfg b)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make cfg b)) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_var b) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Neg b))))) (bool_fun_of_bool_expr (Neg b))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) split. replace cfg' with (fst (BDDvar_make cfg b)). apply BDDvar_make_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. rewrite H2; reflexivity. replace cfg' with (fst (BDDvar_make cfg b)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) replace node with (snd (BDDvar_make cfg b)). apply BDDvar_make_is_var. assumption. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H2; reflexivity. rewrite H2; reflexivity. intros. simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (bool_fun_neg (bool_fun_of_bool_expr b))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm b)). intros cfg' H3. elim H3; clear H3. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. elim x; clear x. intros node y. elim y; clear y. intros negm' orm' H3. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm'))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm b in let (node, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDneg cfg' negm' node in let (node', negm'') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm'' orm')))))) (bool_fun_neg (bool_fun_of_bool_expr b))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) rewrite H3. elim (prod_sum _ _ (BDDneg cfg' negm' node)). intros cfg'' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. intro. elim x; clear x. intros node' negm''. intro H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node). (* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm'). cut (nodes_preserved cfg cfg'). (* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK cfg'') (and (config_node_OK cfg'' node') (and (BDDneg_memo_OK_2 cfg'' negm'') (and (BDDor_memo_OK cfg'' orm') (and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b))))))) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) cut (bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. split. replace cfg'' with (fst (BDDneg cfg' negm' node)). apply BDDneg_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg'' with (fst (BDDneg cfg' negm' node)). replace node' with (fst (snd (BDDneg cfg' negm' node))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_node_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. split. replace cfg'' with (fst (BDDneg cfg' negm' node)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) *) (* Goal: @eq BDDneg_memo (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *) (* Goal: and (BDDor_memo_OK cfg'' orm') (and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b)))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace negm'' with (snd (snd (BDDneg cfg' negm' node))). apply BDDneg_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *) (* Goal: and (nodes_preserved cfg cfg'') (bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_bool_expr b))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) split. replace cfg'' with (fst (BDDneg cfg' negm' node)). apply BDDneg_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) split. apply nodes_preserved_trans with (cfg2 := cfg'). assumption. replace cfg'' with (fst (BDDneg cfg' negm' node)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) apply BDDneg_preserves_nodes. assumption. assumption. assumption. rewrite H4; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg' node)). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg'' with (fst (BDDneg cfg' negm' node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) node') (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node' with (fst (snd (BDDneg cfg' negm' node))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)))) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDneg_is_neg. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node)) (bool_fun_neg (bool_fun_of_bool_expr b)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_bool_expr b) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply bool_fun_eq_neg_1. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node with (fst (snd (BDDof_bool_expr cfg negm orm b))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm b)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *) (* Goal: config_node_OK cfg' node *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm b)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) cfg' *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node with (fst (snd (BDDof_bool_expr cfg negm orm b))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Or b b0))))) (bool_fun_of_bool_expr (Or b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm b)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) refine (proj1 (H _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H3; reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) clear be. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros be1 H. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *) intros be2 H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. (* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim x; clear x. (* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros node1 y. (* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm' orm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)). intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y; (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm'' orm'' H5; rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) elim (prod_sum _ _ (BDDor cfg'' orm'' node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad BDDor_memo) (fun b : prod ad BDDor_memo => @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor cfg'' orm'' node1 node2) (@pair BDDconfig (prod ad BDDor_memo) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros cfg''' H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) elim H6; clear H6. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. (* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim x; clear x. (* Goal: forall (a : ad) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor cfg'' orm'' node1 node2) (@pair BDDconfig (prod ad BDDor_memo) cfg''' (@pair ad BDDor_memo a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros node orm''' H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm'''))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm'' node1 node2 in let (node, orm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg''' (@pair ad (prod BDDneg_memo BDDor_memo) node (@pair BDDneg_memo BDDor_memo negm'' orm''')))))) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) rewrite H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1). (* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg' orm'). (* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg cfg'). (* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). (* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node2). (* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg'' orm''). (* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg' cfg''). (* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node1). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: and (config_node_OK cfg''' node) (and (BDDneg_memo_OK_2 cfg''' negm'') (and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node with (fst (snd (BDDor cfg'' orm'' node1 node2))). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) *) (* Goal: @eq ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: and (BDDneg_memo_OK_2 cfg''' negm'') (and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: and (BDDor_memo_OK cfg''' orm''') (and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) orm''' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace orm''' with (snd (snd (BDDor cfg'' orm'' node1 node2))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) *) (* Goal: @eq BDDor_memo (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) orm''' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: and (nodes_preserved cfg cfg''') (bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg''' node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace cfg''' with (fst (BDDor cfg'' orm'' node1 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) node) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) replace node with (fst (snd (BDDor cfg'' orm'' node1 node2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)))) (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: @eq ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2))) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm'' node1 node2)) cfg''' *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDor_is_or. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: @eq bool (ifb false true false) false *) rewrite H6; reflexivity. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (ANd b b0))))) (bool_fun_of_bool_expr (ANd b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_3. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_2 with (cfg := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H0 _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (H0 _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) refine (proj1 (H _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) clear be. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros be1 H. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *) intros be2 H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. (* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim x; clear x. (* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros node1 y. (* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm' orm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)). intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y; (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm'' orm'' H5; rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1). (* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg' orm'). (* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg cfg'). (* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). (* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node2). (* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg'' orm''). (* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg' cfg''). (* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node1). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) *) (* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg'' negm'' orm'' node1 node2)))) (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDand_is_and. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Impl b b0))))) (bool_fun_of_bool_expr (Impl b b0))))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply bool_fun_and_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_3. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_2 with (cfg := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H0 _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (H0 _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) refine (proj1 (H _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (************ End of script.v ********) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) clear be. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros be1 H. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *) intros be2 H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. (* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim x; clear x. (* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros node1 y. (* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm' orm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)). intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y; (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm'' orm'' H5; rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1). (* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg' orm'). (* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg cfg'). (* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). (* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node2). (* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg'' orm''). (* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg' cfg''). (* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node1). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *) (* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDimpl cfg'' negm'' orm'' node1 node2)))) (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply BDDimpl_is_impl. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) apply bool_fun_impl_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_3. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_2 with (cfg := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H0 _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (H0 _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) refine (proj1 (H _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (*********** End of tempimpl.v ***********************) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) clear be. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b0)))) (bool_fun_of_bool_expr b0))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff b b0))))) (bool_fun_of_bool_expr (Iff b b0))))))) *) intros be1 H. (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm b)))) (bool_fun_of_bool_expr b))))))) (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg negm) (_ : BDDor_memo_OK cfg orm), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 b))))) (bool_fun_of_bool_expr (Iff be1 b))))))) *) intros be2 H0. (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm (Iff be1 be2))))) (bool_fun_of_bool_expr (Iff be1 be2))))))) *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg negm orm be1)). (* Goal: forall (x : BDDconfig) (_ : @ex (prod ad (prod BDDneg_memo BDDor_memo)) (fun b : prod ad (prod BDDneg_memo BDDor_memo) => @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) x b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros cfg' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim H4; clear H4. (* Goal: forall (x : prod ad (prod BDDneg_memo BDDor_memo)) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x)), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intro. (* Goal: forall _ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' x), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim x; clear x. (* Goal: forall (a : ad) (b : prod BDDneg_memo BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDof_bool_expr cfg negm orm be1) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) a b))), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) intros node1 y. (* Goal: forall (a : BDDneg_memo) (b : BDDor_memo) (_ : @eq (prod BDDconfig (prod ad (prod BDDneg_memo BDDor_memo))) (BDDimpl cfg negm orm node1 node2) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg' (@pair ad (prod BDDneg_memo BDDor_memo) node1' (@pair BDDneg_memo BDDor_memo a b)))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDimpl cfg negm orm node1 node2 in let (node1', p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p2) := p1 in let (negm'', orm'') := p2 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm' orm' H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg', p) := BDDof_bool_expr cfg negm orm be1 in let (node1, p0) := p in let (negm', orm') := p0 in let (cfg'', p1) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p2) := p1 in let (negm'', orm'') := p2 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDof_bool_expr cfg' negm' orm' be2 in let (node2, p0) := p in let (negm'', orm'') := p0 in BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg' negm' orm' be2)). intros cfg'' H5; elim H5; clear H5; intro; elim x; clear x; intros node2 y; (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDimpl cfg' negm' orm' node2 node1 in let (node2', p0) := p in let (negm'', orm'') := p0 in BDDand cfg'' negm'' orm'' node1' node2')))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim y; clear y; intros negm'' orm'' H5; rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node1). (* Goal: forall (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg' orm'). (* Goal: forall (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg cfg'). (* Goal: forall (_ : nodes_preserved cfg cfg') (_ : BDDor_memo_OK cfg' orm') (_ : BDDneg_memo_OK_2 cfg' negm') (_ : config_node_OK cfg' node1) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). (* Goal: forall _ : BDDconfig_OK cfg'', and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node2). (* Goal: forall (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). (* Goal: forall (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg'' orm''). (* Goal: forall (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (nodes_preserved cfg' cfg''). (* Goal: forall (_ : nodes_preserved cfg' cfg'') (_ : BDDor_memo_OK cfg'' orm'') (_ : BDDneg_memo_OK_2 cfg'' negm'') (_ : config_node_OK cfg'' node2) (_ : BDDconfig_OK cfg''), and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2)). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg'' node1). (* Goal: forall _ : config_node_OK cfg'' node1, and (BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) intros. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: and (config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_keeps_config_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) *) (* Goal: and (BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_node_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_keeps_neg_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) *) (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_keeps_or_memo_OK. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: and (nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2))) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) split. (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_preserves_nodes. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDiff cfg'' negm'' orm'' node1 node2)))) (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply BDDiff_is_iff. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg'' node2)) (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2)) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_iff_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1) (bool_fun_of_BDD cfg' node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_3. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: config_node_OK cfg'' node1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2) (bool_fun_of_bool_expr be2) *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_2 with (cfg := cfg'). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) (bool_fun_of_bool_expr be2) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: nodes_preserved cfg' cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: nodes_preserved cfg' (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDor_memo_OK cfg'' orm'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm'' with (snd (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) orm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H0 _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (fst (snd (snd (BDDof_bool_expr cfg' negm' orm' be2)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)))) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: config_node_OK cfg'' node2 *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H0 _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace node2 with (fst (snd (BDDof_bool_expr cfg' negm' orm' be2))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2))) node2 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H0 _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDof_bool_expr cfg' negm' orm' be2)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (H0 _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg' negm' orm' be2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node1) (bool_fun_of_bool_expr be1) *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) (bool_fun_of_bool_expr be1) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: nodes_preserved cfg cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj2 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDor_memo_OK cfg' orm' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (proj2 (H _ _ _ _ _ _)))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace orm' with (snd (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDor_memo (@snd BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) orm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (proj2 (H _ _ _ _ _ _))))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) replace negm' with (fst (snd (snd (BDDof_bool_expr cfg negm orm be1)))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) *) (* Goal: @eq BDDneg_memo (@fst BDDneg_memo BDDor_memo (@snd ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: config_node_OK cfg' node1 *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (proj2 (H _ _ _ _ _ _)))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1 with (fst (snd (BDDof_bool_expr cfg negm orm be1))). (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) *) (* Goal: @eq ad (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1))) node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) refine (proj1 (proj2 (H _ _ _ _ _ _))). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDof_bool_expr cfg negm orm be1)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) refine (proj1 (H _ _ _ _ _ _)). (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: BDDor_memo_OK cfg orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) assumption. (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr cfg negm orm be1)) cfg' *) rewrite H4; reflexivity. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Require Import BDDdummy_lemma_2. Require Import BDDdummy_lemma_3. Require Import BDDdummy_lemma_4. Require Import bdd8. Require Import bdd9. Definition BDDneg (cfg : BDDconfig) (memo : BDDneg_memo) (node : ad) := match BDDneg_1_1 cfg memo node (S (nat_of_N (var cfg node))) with | ((cfg', node'), memo') => (cfg', (node', memo')) end. Definition BDDor (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) := BDDor_1_1 cfg memo node1 node2 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). Definition BDDand (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad) := match BDDneg cfg negm node1 with | (cfg', (node1', negm')) => match BDDneg cfg' negm' node2 with | (cfg'', (node2', negm'')) => match BDDor cfg'' orm node1' node2' with | (cfg''', (node, orm')) => match BDDneg cfg''' negm'' node with | (cfg'''', (node', negm''')) => (cfg'''', (node', (negm''', orm'))) end end end end. Lemma nodes_preserved_orm_OK : forall (cfg cfg' : BDDconfig) (orm : BDDor_memo), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> nodes_preserved cfg cfg' -> BDDor_memo_OK cfg orm -> BDDor_memo_OK cfg' orm. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor_memo_OK in |- *. intros. unfold BDDor_memo_OK in H2. cut (config_node_OK cfg node1). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg node2). cut (config_node_OK cfg node). intros. cut (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2)) = true). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. cut (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. split. apply nodes_preserved_2 with (cfg := cfg). assumption. assumption. (* Goal: and (config_node_OK cfg' node) (@eq (prod BDDconfig ad) (BDDneg_2 cfg' node bound) (@pair BDDconfig ad cfg' node')) *) (* Goal: config_node_OK cfg' node' *) (* Goal: config_node_OK cfg' node *) (* Goal: config_node_OK cfg node' *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) (* Goal: config_node_OK cfg node *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) split. apply nodes_preserved_2 with (cfg := cfg). assumption. assumption. split. (* Goal: and (config_node_OK cfg' node) (@eq (prod BDDconfig ad) (BDDneg_2 cfg' node bound) (@pair BDDconfig ad cfg' node')) *) (* Goal: config_node_OK cfg' node' *) (* Goal: config_node_OK cfg' node *) (* Goal: config_node_OK cfg node' *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) (* Goal: config_node_OK cfg node *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) apply nodes_preserved_2 with (cfg := cfg). assumption. assumption. split. (* Goal: lt (N.to_nat (var cfg node)) bound *) cut (var cfg' node = var cfg node). cut (var cfg' node1 = var cfg node1). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (var cfg' node2 = var cfg node2). intros. rewrite H9. rewrite H10. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) rewrite H11. assumption. apply nodes_preserved_var_1. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. apply nodes_preserved_var_1. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. apply nodes_preserved_var_1. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply nodes_preserved_3. assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. apply bool_fun_eq_symm. apply bool_fun_or_preserves_eq. apply nodes_preserved_3. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. apply nodes_preserved_3. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. exact (proj2 (proj2 (proj2 (proj2 (H2 node1 node2 node H3))))). (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: config_node_OK cfg node *) (* Goal: config_node_OK cfg node2 *) (* Goal: config_node_OK cfg node1 *) exact (proj1 (proj2 (proj2 (proj2 (H2 node1 node2 node H3))))). (* Goal: config_node_OK cfg node *) (* Goal: config_node_OK cfg node2 *) (* Goal: config_node_OK cfg node1 *) exact (proj1 (proj2 (proj2 (H2 node1 node2 node H3)))). (* Goal: config_node_OK cfg node2 *) (* Goal: config_node_OK cfg node1 *) exact (proj1 (proj2 (H2 node1 node2 node H3))). (* Goal: config_node_OK cfg node1 *) exact (proj1 (H2 node1 node2 node H3)). Qed. Lemma nodes_preserved_negm_OK : forall (cfg cfg' : BDDconfig) (negm : BDDneg_memo), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> nodes_preserved cfg cfg' -> BDDneg_memo_OK_2 cfg negm -> BDDneg_memo_OK_2 cfg' negm. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg_memo_OK_2 in |- *. unfold BDDneg_memo_OK_2 in H2. intros. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (is_internal_node cfg node -> nat_of_N (var cfg node) < bound). intro. (* Goal: and (config_node_OK cfg' node) (@eq (prod BDDconfig ad) (BDDneg_2 cfg' node bound) (@pair BDDconfig ad cfg' node')) *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) cut (config_node_OK cfg node). cut (BDDneg_2 cfg node bound = (cfg, node')). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. cut (config_node_OK cfg node'). intro. cut (config_node_OK cfg' node). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (config_node_OK cfg' node'). intros. split. assumption. apply BDDneg_memo_OK_1_lemma_1_1_1. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node'). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply nodes_preserved_3. assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg node)). replace (bool_fun_of_BDD cfg node') with (bool_fun_of_BDD (fst (BDDneg_2 cfg node bound)) (snd (BDDneg_2 cfg node bound))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 cfg node bound)) (@snd BDDconfig ad (BDDneg_2 cfg node bound))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 cfg node bound)) (@snd BDDconfig ad (BDDneg_2 cfg node bound))) (bool_fun_of_BDD cfg node') *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg node)) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: config_node_OK cfg' node *) (* Goal: config_node_OK cfg node' *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) (* Goal: config_node_OK cfg node *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) refine (proj2 (proj2 (proj2 (proj2 (BDDneg_2_lemma _ _ _ _ _ _))))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H6. reflexivity. apply bool_fun_eq_symm. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply bool_fun_eq_neg_1. apply nodes_preserved_3. assumption. assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg negm orm node1 node2)) node *) assumption. assumption. apply nodes_preserved_2 with (cfg := cfg). assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDand cfg negm orm node1 node2)) node *) assumption. apply nodes_preserved_2 with (cfg := cfg). assumption. assumption. (* Goal: config_node_OK cfg node' *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) (* Goal: config_node_OK cfg node *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) replace cfg with (fst (BDDneg_2 cfg node bound)). replace node' with (snd (BDDneg_2 cfg node bound)). refine (proj1 (proj2 (proj2 (proj2 (BDDneg_2_lemma _ _ _ _ _ _))))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H6; reflexivity. rewrite H6; reflexivity. (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) (* Goal: config_node_OK cfg node *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound *) exact (proj2 (H2 node node' bound H3 H5)). exact (proj1 (H2 node node' bound H3 H5)). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. cut (var cfg' node = var cfg node). intro. rewrite <- H6. apply H4. (* Goal: is_internal_node cfg' node *) (* Goal: @eq BDDvar (var cfg' node) (var cfg node) *) inversion H5. inversion H7. inversion H8. split with x. split with x0. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) split with x1. apply H1. assumption. apply nodes_preserved_var. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. Qed. Lemma BDDneg_keeps_config_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> BDDconfig_OK (fst (BDDneg cfg negm node)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg in |- *. elim (prod_sum _ _ (BDDneg_1_1 cfg negm node (S (nat_of_N (var cfg node))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros cfg' node'. intro. elim H2; clear H2. (* Goal: forall (x : BDDneg_memo) (_ : @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node)))) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg' node') x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) intros negm' H2. rewrite H2. simpl in |- *. rewrite (BDDneg_1_1_eq_1 (S (nat_of_N (var cfg node))) cfg negm node) in H2. cut (is_internal_node cfg node -> nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. replace cfg' with (fst (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). rewrite (proj1 (BDDneg_1_lemma' (S (nat_of_N (var cfg node))) (cfg, node, negm) H H1 H0 H3)). (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) exact (proj1 (BDDneg_2_lemma _ _ _ H H1 H3)). rewrite H2. reflexivity. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> config_node_OK (fst (BDDneg cfg negm node)) (fst (snd (BDDneg cfg negm node))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg in |- *. elim (prod_sum _ _ (BDDneg_1_1 cfg negm node (S (nat_of_N (var cfg node))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros cfg' node'. intro. elim H2; clear H2. (* Goal: forall (x : BDDneg_memo) (_ : @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node)))) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg' node') x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) intros negm' H2. rewrite H2. simpl in |- *. rewrite (BDDneg_1_1_eq_1 (S (nat_of_N (var cfg node))) cfg negm node) in H2. cut (is_internal_node cfg node -> (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). intro. replace cfg' with (fst (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). replace node' with (snd (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). rewrite (proj1 (BDDneg_1_lemma' (S (nat_of_N (var cfg node))) (cfg, node, negm) H H1 H0 H3)). exact (proj1 (proj2 (proj2 (proj2 (BDDneg_2_lemma (S (nat_of_N (var cfg node))) cfg node H H1 H3))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H2; reflexivity. rewrite H2; reflexivity. intro. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_preserves_nodes : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> nodes_preserved cfg (fst (BDDneg cfg negm node)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg in |- *. elim (prod_sum _ _ (BDDneg_1_1 cfg negm node (S (nat_of_N (var cfg node))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros cfg' node'. intro. elim H2; clear H2. (* Goal: forall (x : BDDneg_memo) (_ : @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node)))) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg' node') x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) intros negm' H2. rewrite H2. simpl in |- *. rewrite (BDDneg_1_1_eq_1 (S (nat_of_N (var cfg node))) cfg negm node) in H2. cut (is_internal_node cfg node -> (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). intro. replace cfg' with (fst (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). (* Goal: nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm) (S (N.to_nat (var cfg node)))))) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm) (S (N.to_nat (var cfg node)))))) cfg' *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) unfold nodes_preserved in |- *. rewrite (proj1 (BDDneg_1_lemma' (S (nat_of_N (var cfg node))) (cfg, node, negm) H H1 H0 H3)). (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) exact (proj1 (proj2 (BDDneg_2_lemma _ _ _ H H1 H3))). rewrite H2; reflexivity. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> BDDneg_memo_OK_2 (fst (BDDneg cfg negm node)) (snd (snd (BDDneg cfg negm node))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg in |- *. elim (prod_sum _ _ (BDDneg_1_1 cfg negm node (S (nat_of_N (var cfg node))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros cfg' node'. intro. elim H2; clear H2. (* Goal: forall (x : BDDneg_memo) (_ : @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node)))) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg' node') x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) intros negm' H2. rewrite H2. simpl in |- *. rewrite (BDDneg_1_1_eq_1 (S (nat_of_N (var cfg node))) cfg negm node) in H2. cut (is_internal_node cfg node -> nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. replace cfg' with (fst (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). replace negm' with (snd (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node))))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) refine (proj2 (BDDneg_1_lemma' _ _ _ _ _ _)). assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. rewrite H2; reflexivity. rewrite H2; reflexivity. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_keeps_or_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> BDDor_memo_OK cfg orm -> BDDor_memo_OK (fst (BDDneg cfg negm node)) orm. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_orm_OK with (cfg := cfg). assumption. apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. apply BDDneg_preserves_nodes. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. Qed. Lemma BDDneg_keeps_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> forall node' : ad, config_node_OK cfg node' -> config_node_OK (fst (BDDneg cfg negm node)) node'. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDneg_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. Qed. Lemma BDDneg_preserves_bool_fun : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> forall node' : ad, config_node_OK cfg node' -> bool_fun_eq (bool_fun_of_BDD (fst (BDDneg cfg negm node)) node') (bool_fun_of_BDD cfg node'). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. apply BDDneg_preserves_nodes. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. Qed. Lemma BDDneg_is_neg : forall (cfg : BDDconfig) (negm : BDDneg_memo) (node : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDneg cfg negm node)) (fst (snd (BDDneg cfg negm node)))) (bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDneg in |- *. elim (prod_sum _ _ (BDDneg_1_1 cfg negm node (S (nat_of_N (var cfg node))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros cfg' node'. intro. elim H2; clear H2. (* Goal: forall (x : BDDneg_memo) (_ : @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node)))) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg' node') x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (let (p, memo') := BDDneg_1_1 cfg negm node (S (N.to_nat (var cfg node))) in let (cfg', node') := p in @pair BDDconfig (prod ad BDDneg_memo) cfg' (@pair ad BDDneg_memo node' memo'))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) intros negm' H2. rewrite H2. simpl in |- *. rewrite (BDDneg_1_1_eq_1 (S (nat_of_N (var cfg node))) cfg negm node) in H2. cut (is_internal_node cfg node -> nat_of_N (var cfg node) < S (nat_of_N (var cfg node))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. replace cfg' with (fst (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). replace node' with (snd (fst (BDDneg_1 (cfg, node, negm) (S (nat_of_N (var cfg node)))))). rewrite (proj1 (BDDneg_1_lemma' (S (nat_of_N (var cfg node))) (cfg, node, negm) H H1 H0 H3)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm))) (S (N.to_nat (var cfg node))))) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm))) (S (N.to_nat (var cfg node)))))) (bool_fun_neg (bool_fun_of_BDD cfg node)) *) (* Goal: @eq ad (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm) (S (N.to_nat (var cfg node)))))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) negm) (S (N.to_nat (var cfg node)))))) cfg' *) (* Goal: forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) (S (N.to_nat (var cfg node))) *) exact (proj2 (proj2 (proj2 (proj2 (BDDneg_2_lemma _ _ _ H H1 H3))))). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H2; reflexivity. rewrite H2; reflexivity. intro. unfold lt in |- *. apply le_n. Qed. Lemma BDDor_keeps_config_OK : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDconfig_OK (fst (BDDor cfg orm node1 node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor in |- *. rewrite (BDDor_1_1_eq_1 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))) cfg orm node1 node2). cut (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj1 (BDDor_1_lemma _ _ _ _ _ _ _ _ _ _)). assumption. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) assumption. assumption. assumption. assumption. intros. unfold lt in |- *. apply le_n. Qed. Lemma BDDor_node_OK : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> config_node_OK (fst (BDDor cfg orm node1 node2)) (fst (snd (BDDor cfg orm node1 node2))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor in |- *. rewrite (BDDor_1_1_eq_1 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))) cfg orm node1 node2). cut (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj1 (proj2 (proj2 (BDDor_1_lemma _ _ _ _ _ _ _ _ _ _)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) assumption. assumption. assumption. assumption. assumption. intros. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) *) unfold lt in |- *. apply le_n. Qed. Lemma BDDor_keeps_or_memo_OK : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDor_memo_OK (fst (BDDor cfg orm node1 node2)) (snd (snd (BDDor cfg orm node1 node2))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor in |- *. rewrite (BDDor_1_1_eq_1 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))) cfg orm node1 node2). cut (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj1 (proj2 (BDDor_1_lemma _ _ _ _ _ _ _ _ _ _))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) assumption. assumption. assumption. assumption. assumption. intros. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) *) unfold lt in |- *. apply le_n. Qed. Lemma BDDor_preserves_nodes : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> nodes_preserved cfg (fst (BDDor cfg orm node1 node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor in |- *. rewrite (BDDor_1_1_eq_1 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))) cfg orm node1 node2). cut (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj1 (proj2 (proj2 (proj2 (BDDor_1_lemma _ _ _ _ _ _ _ _ _ _))))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) assumption. assumption. assumption. assumption. assumption. intros. unfold lt in |- *. (* Goal: le (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) *) apply le_n. Qed. Lemma BDDor_keeps_node_OK : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDor cfg orm node1 node2)) node. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDor_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. Qed. Lemma BDDor_preserves_bool_fun : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDor cfg orm node1 node2)) node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDor_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. apply BDDor_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDor_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDneg_memo_OK_2 cfg negm -> BDDneg_memo_OK_2 (fst (BDDor cfg orm node1 node2)) negm. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_negm_OK with (cfg := cfg). assumption. apply BDDor_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. apply BDDor_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDor_is_or : forall (cfg : BDDconfig) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD (fst (BDDor cfg orm node1 node2)) (fst (snd (BDDor cfg orm node1 node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDor in |- *. rewrite (BDDor_1_1_eq_1 (S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))) cfg orm node1 node2). cut (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < S (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. refine (proj2 (proj2 (proj2 (proj2 (proj2 (BDDor_1_lemma _ _ _ _ _ _ _ _ _ _)))))). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) assumption. assumption. assumption. assumption. assumption. intros. unfold lt in |- *. (* Goal: le (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) (S (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2)))) *) apply le_n. Qed. Lemma BDDand_keeps_config_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDconfig_OK (fst (BDDand cfg negm orm node1 node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDand_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> config_node_OK (fst (BDDand cfg negm orm node1 node2)) (fst (snd (BDDand cfg negm orm node1 node2))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node' with (fst (snd (BDDneg cfg''' negm'' node))). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDand_preserves_nodes : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> nodes_preserved cfg (fst (BDDand cfg negm orm node1 node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. (* Goal: nodes_preserved cfg cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'). (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: nodes_preserved cfg''' (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. (* Goal: nodes_preserved cfg' cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg''). (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: nodes_preserved cfg''' (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. (* Goal: nodes_preserved cfg'' cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply nodes_preserved_trans with (cfg2 := cfg'''). (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: nodes_preserved cfg'' (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: nodes_preserved cfg''' cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDor_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: nodes_preserved cfg''' (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDand_keeps_node_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> config_node_OK (fst (BDDand cfg negm orm node1 node2)) node. Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_2 with (cfg := cfg). assumption. apply BDDand_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDand_preserves_bool_fun : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> forall node : ad, config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD (fst (BDDand cfg negm orm node1 node2)) node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. apply nodes_preserved_3. assumption. apply BDDand_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. assumption. apply BDDand_preserves_nodes. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDand_keeps_neg_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDneg_memo_OK_2 (fst (BDDand cfg negm orm node1 node2)) (fst (snd (snd (BDDand cfg negm orm node1 node2)))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) negm''' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm''' with (snd (snd (BDDneg cfg''' negm'' node))). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq BDDneg_memo (@snd ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) negm' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Lemma BDDand_keeps_or_memo_OK : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDor_memo_OK (fst (BDDand cfg negm orm node1 node2)) (snd (snd (snd (BDDand cfg negm orm node1 node2)))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed. Definition bool_fun_and (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_binding => bf1 vb && bf2 vb. Lemma bool_fun_and_is_neg_or_neg_neg : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_neg (bool_fun_or (bool_fun_neg bf1) (bool_fun_neg bf2))). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold bool_fun_eq, bool_fun_neg, bool_fun_or, bool_fun_and in |- *. unfold bool_fun_eval in |- *. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim (bf1 vb). elim (bf2 vb). reflexivity. reflexivity. reflexivity. Qed. Lemma BDDand_is_and : forall (cfg : BDDconfig) (negm : BDDneg_memo) (orm : BDDor_memo) (node1 node2 : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg negm -> BDDor_memo_OK cfg orm -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD (fst (BDDand cfg negm orm node1 node2)) (fst (snd (BDDand cfg negm orm node1 node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) intros. unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg negm node1)). intros cfg' H4. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H4; clear H4. intro. elim x; clear x. intros node1' negm' H4. rewrite H4. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'', p) := BDDneg cfg' negm' node2 in let (node2', negm'') := p in let (cfg''', p0) := BDDor cfg'' orm node1' node2' in let (node, orm') := p0 in let (cfg'''', p1) := BDDneg cfg''' negm'' node in let (node', negm''') := p1 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDneg cfg' negm' node2)). intros cfg'' H5. elim H5; clear H5. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intro. elim x; clear x. intros node2' negm'' H5. rewrite H5. elim (prod_sum _ _ (BDDor cfg'' orm node1' node2')). (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg''' H6. elim H6; clear H6. intro. elim x; clear x. intros node orm' H6. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg''', p) := BDDor cfg'' orm node1' node2' in let (node, orm') := p in let (cfg'''', p0) := BDDneg cfg''' negm'' node in let (node', negm''') := p0 in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) rewrite H6. elim (prod_sum _ _ (BDDneg cfg''' negm'' node)). intros cfg'''' H7. (* Goal: forall (x : prod ad BDDneg_memo) (_ : @eq (prod BDDconfig (prod ad BDDneg_memo)) (BDDneg cfg''' negm'' node) (@pair BDDconfig (prod ad BDDneg_memo) cfg'''' x)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (let (cfg'''', p) := BDDneg cfg''' negm'' node in let (node', negm''') := p in @pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H7; clear H7. intro. elim x; clear x. intros node' negm''' H7. rewrite H7. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (@pair BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) cfg'''' (@pair ad (prod BDDneg_memo BDDor_memo) node' (@pair BDDneg_memo BDDor_memo negm''' orm')))))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) simpl in |- *. cut (BDDconfig_OK cfg'). cut (config_node_OK cfg' node1'). cut (config_node_OK cfg' node2). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg' negm'). cut (BDDor_memo_OK cfg' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg''). cut (config_node_OK cfg'' node2'). cut (config_node_OK cfg'' node1'). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDneg_memo_OK_2 cfg'' negm''). cut (BDDor_memo_OK cfg'' orm). intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDconfig_OK cfg'''). cut (config_node_OK cfg''' node). cut (BDDneg_memo_OK_2 cfg''' negm''). (* Goal: forall (_ : BDDor_memo_OK cfg''' orm') (_ : BDDneg_memo_OK_2 cfg''' negm'') (_ : config_node_OK cfg''' node) (_ : BDDconfig_OK cfg'''), bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) cut (BDDor_memo_OK cfg''' orm'). intros. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg''' node)). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'''' node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'''' with (fst (BDDneg cfg''' negm'' node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) node') (bool_fun_neg (bool_fun_of_BDD cfg''' node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg''' negm'' node)) cfg'''' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg''' node)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node' with (fst (snd (BDDneg cfg''' negm'' node))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)))) (bool_fun_neg (bool_fun_of_BDD cfg' node2)) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2))) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_is_neg. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H7; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_or (bool_fun_of_BDD cfg'' node1') (bool_fun_of_BDD cfg'' node2'))). (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_neg_1. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')))) (bool_fun_or (bool_fun_of_BDD cfg'' node1') (bool_fun_of_BDD cfg'' node2')) *) (* Goal: @eq ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2'))) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_of_BDD cfg'' node1') (bool_fun_of_BDD cfg'' node2'))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDor_is_or. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))). (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_neg_1. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg'' node1') (bool_fun_of_BDD cfg'' node2')) (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node1') (bool_fun_neg (bool_fun_of_BDD cfg node1)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg'' node2') (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node1'). (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_preserves_bool_fun. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)))) (bool_fun_neg (bool_fun_of_BDD cfg' node2)) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2))) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_is_neg. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg' node2)). (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node2' with (fst (snd (BDDneg cfg' negm' node2))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)))) (bool_fun_neg (bool_fun_of_BDD cfg' node2)) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2))) node2' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg' node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_is_neg. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node2)) (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_neg_1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply BDDneg_preserves_bool_fun. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) *) (* Goal: BDDor_memo_OK cfg''' orm' *) (* Goal: BDDneg_memo_OK_2 cfg''' negm'' *) (* Goal: config_node_OK cfg''' node *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) apply bool_fun_and_is_neg_or_neg_neg. (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). replace orm' with (snd (snd (BDDor cfg'' orm node1' node2'))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_neg_memo_OK. assumption. assumption. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) node *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDor_memo) (BDDor cfg'' orm node1' node2')) cfg''' *) (* Goal: BDDconfig_OK cfg''' *) (* Goal: BDDor_memo_OK cfg'' orm *) (* Goal: BDDneg_memo_OK_2 cfg'' negm'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace node with (fst (snd (BDDor cfg'' orm node1' node2'))). apply BDDor_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H6; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg''' with (fst (BDDor cfg'' orm node1' node2')). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDor_keeps_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H6; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_or_memo_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) negm'' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg' negm' node2)) cfg'' *) (* Goal: config_node_OK cfg'' node1' *) (* Goal: config_node_OK cfg'' node2' *) (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace negm'' with (snd (snd (BDDneg cfg' negm' node2))). apply BDDneg_keeps_neg_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfg'' *) (* Goal: BDDor_memo_OK cfg' orm *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). apply BDDneg_keeps_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg'' with (fst (BDDneg cfg' negm' node2)). replace node2' with (fst (snd (BDDneg cfg' negm' node2))). apply BDDneg_node_OK. assumption. assumption. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. rewrite H5; reflexivity. rewrite H5; reflexivity. replace cfg'' with (fst (BDDneg cfg' negm' node2)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_config_OK. assumption. assumption. assumption. rewrite H5; reflexivity. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) orm *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDneg_memo_OK_2 cfg' negm' *) (* Goal: config_node_OK cfg' node2 *) (* Goal: config_node_OK cfg' node1' *) (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_or_memo_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). replace negm' with (snd (snd (BDDneg cfg negm node1))). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_neg_memo_OK. assumption. assumption. assumption. rewrite H4; reflexivity. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) apply BDDneg_keeps_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (andb false (bf2 vb)) (negb (orb (negb false) (negb (bf2 vb)))) *) rewrite H4; reflexivity. replace cfg' with (fst (BDDneg cfg negm node1)). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) *) (* Goal: @eq ad (@fst ad BDDneg_memo (@snd BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1))) node1' *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) (* Goal: BDDconfig_OK cfg' *) replace node1' with (fst (snd (BDDneg cfg negm node1))). apply BDDneg_node_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) replace cfg' with (fst (BDDneg cfg negm node1)). apply BDDneg_keeps_config_OK. (* Goal: config_node_OK cfg node1 *) (* Goal: @eq BDDconfig (@fst BDDconfig (prod ad BDDneg_memo) (BDDneg cfg negm node1)) cfg' *) assumption. assumption. assumption. rewrite H4; reflexivity. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Fixpoint BDDor_1 (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound : nat) {struct bound} : BDDconfig * (ad * BDDor_memo) := match BDDor_memo_lookup memo node1 node2 with | Some node => (cfg, (node, memo)) | None => if Neqb node1 BDDzero then (cfg, (node2, BDDor_memo_put memo BDDzero node2 node2)) else if Neqb node1 BDDone then (cfg, (BDDone, BDDor_memo_put memo BDDone node2 BDDone)) else if Neqb node2 BDDzero then (cfg, (node1, BDDor_memo_put memo node1 BDDzero node1)) else if Neqb node2 BDDone then (cfg, (BDDone, BDDor_memo_put memo node1 BDDone BDDone)) else match bound with | O => (initBDDconfig, (BDDzero, initBDDor_memo)) | S bound' => match BDDcompare (var cfg node1) (var cfg node2) with | Datatypes.Eq => (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))))) | Datatypes.Lt => (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) | Datatypes.Gt => (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) end end end. Lemma BDDor_1_lemma_1 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 node : ad) (bound : nat), BDDor_memo_lookup memo node1 node2 = Some node -> BDDor_1 cfg memo node1 node2 bound = (cfg, (node, memo)). Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 node : ad) (bound : nat) (_ : @eq (option ad) (BDDor_memo_lookup memo node1 node2) (@Some ad node)), @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 bound) (@pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo)) *) intros cfg memo node1 node2 node bound H. elim bound. simpl in |- *. rewrite H. reflexivity. intros n H0. simpl in |- *; rewrite H; reflexivity. Qed. Lemma BDDor_1_lemma_zero_1 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 : ad) (bound : nat), BDDor_memo_lookup memo node1 BDDzero = None -> BDDor_1 cfg memo node1 BDDzero bound = (cfg, (node1, BDDor_memo_put memo node1 BDDzero node1)). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo BDDone node2 bound) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone))) *) intros cfg memo node1 bound H. elim bound. simpl in |- *. rewrite H. elim (sumbool_of_bool (Neqb node1 BDDzero)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite y. cut (node1 = BDDzero). intro H0. rewrite H0; reflexivity. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete. assumption. intro y. rewrite y. elim (sumbool_of_bool (Neqb node1 BDDone)); intro y0. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite y0. cut (node1 = BDDone). intro H0. rewrite H0; reflexivity. apply Neqb_complete. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 (S bound')) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) assumption. rewrite y0. reflexivity. intros n H0. simpl in |- *. rewrite H. elim (sumbool_of_bool (Neqb node1 BDDzero)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite y. cut (node1 = BDDzero). intro H1. rewrite H1. reflexivity. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete; assumption. intro y. rewrite y. elim (sumbool_of_bool (Neqb node1 BDDone)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y0. rewrite y0. cut (node1 = BDDone). intro H1. rewrite H1. reflexivity. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete. assumption. intro y0. rewrite y0. reflexivity. Qed. Lemma BDDor_1_lemma_one_1 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 : ad) (bound : nat), BDDor_memo_lookup memo node1 BDDone = None -> BDDor_1 cfg memo node1 BDDone bound = (cfg, (BDDone, BDDor_memo_put memo node1 BDDone BDDone)). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo BDDone node2 bound) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone))) *) intros cfg memo node1 bound H. elim bound. simpl in |- *. rewrite H. elim (sumbool_of_bool (Neqb node1 BDDzero)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite y. cut (node1 = BDDzero). intro H0. rewrite H0; reflexivity. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete. assumption. intro y. rewrite y. elim (sumbool_of_bool (Neqb node1 BDDone)); intro y0. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite y0. cut (node1 = BDDone). intro H0. rewrite H0; reflexivity. apply Neqb_complete. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 (S bound')) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) assumption. rewrite y0. reflexivity. intros n H0. simpl in |- *. rewrite H. elim (sumbool_of_bool (Neqb node1 BDDzero)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite y. cut (node1 = BDDzero). intro H1. rewrite H1. reflexivity. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete; assumption. intro y. rewrite y. elim (sumbool_of_bool (Neqb node1 BDDone)). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y0. rewrite y0. cut (node1 = BDDone). intro H1. rewrite H1. reflexivity. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply Neqb_complete. assumption. intro y0. rewrite y0. reflexivity. Qed. Lemma BDDor_1_lemma_zero_2 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node2 : ad) (bound : nat), BDDor_memo_lookup memo BDDzero node2 = None -> BDDor_1 cfg memo BDDzero node2 bound = (cfg, (node2, BDDor_memo_put memo BDDzero node2 node2)). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo BDDone node2 bound) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone))) *) intros cfg memo node2 bound H. elim bound. simpl in |- *. rewrite H. reflexivity. intros n H0. simpl in |- *. rewrite H. reflexivity. Qed. Lemma BDDor_1_lemma_one_2 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node2 : ad) (bound : nat), BDDor_memo_lookup memo BDDone node2 = None -> BDDor_1 cfg memo BDDone node2 bound = (cfg, (BDDone, BDDor_memo_put memo BDDone node2 BDDone)). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo BDDone node2 bound) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone))) *) intros cfg memo node2 bound H. elim bound. simpl in |- *. rewrite H. reflexivity. intros n H0. simpl in |- *. rewrite H. reflexivity. Qed. Lemma BDDor_1_lemma_internal_1 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound bound' : nat), BDDor_memo_lookup memo node1 node2 = None -> BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound -> bound = S bound' -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Eq -> BDDor_1 cfg memo node1 node2 bound = (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))))). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 (S bound')) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) intros cfg memo node1 node2 bound bound' H H0 H1 H2 H3 H4 H5. rewrite H4. simpl in |- *. rewrite H. cut (Neqb node1 BDDzero = false). cut (Neqb node1 BDDone = false). (* Goal: forall (_ : @eq bool (N.eqb node1 BDDone) false) (_ : @eq bool (N.eqb node1 BDDzero) false), @eq (prod BDDconfig (prod ad BDDor_memo)) (if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else match BDDcompare (var cfg node1) (var cfg node2) with | Eq => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))))) | Lt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) | Gt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) end) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) cut (Neqb node2 BDDzero = false). cut (Neqb node2 BDDone = false). intros H6 H7 H8 H9. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite H6; rewrite H7; rewrite H8; rewrite H9; rewrite H5; reflexivity. (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *. intro H6. cut (node2 = BDDone). intro H7. (* Goal: False *) (* Goal: @eq ad node2 BDDzero *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) inversion H2. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_one cfg H0) in H10; discriminate. (* Goal: @eq ad node2 BDDone *) (* Goal: @eq bool (N.eqb node2 BDDzero) false *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply Neqb_complete. assumption. apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) cut (node2 = BDDzero). intro H7. inversion H2. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_zero cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDone). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_one cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDzero). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_zero cfg H0) in H10; discriminate. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) apply Neqb_complete; assumption. Qed. Lemma BDDor_1_lemma_internal_2 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound bound' : nat), BDDor_memo_lookup memo node1 node2 = None -> BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound -> bound = S bound' -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Lt -> BDDor_1 cfg memo node1 node2 bound = (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 (S bound')) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) intros cfg memo node1 node2 bound bound' H H0 H1 H2 H3 H4 H5. rewrite H4. simpl in |- *. rewrite H. cut (Neqb node1 BDDzero = false). cut (Neqb node1 BDDone = false). (* Goal: forall (_ : @eq bool (N.eqb node1 BDDone) false) (_ : @eq bool (N.eqb node1 BDDzero) false), @eq (prod BDDconfig (prod ad BDDor_memo)) (if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else match BDDcompare (var cfg node1) (var cfg node2) with | Eq => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))))) | Lt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) | Gt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) end) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) cut (Neqb node2 BDDzero = false). cut (Neqb node2 BDDone = false). intros H6 H7 H8 H9. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite H6; rewrite H7; rewrite H8; rewrite H9; rewrite H5; reflexivity. (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *. intro H6. cut (node2 = BDDone). intro H7. (* Goal: False *) (* Goal: @eq ad node2 BDDzero *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) inversion H2. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_one cfg H0) in H10; discriminate. (* Goal: @eq ad node2 BDDone *) (* Goal: @eq bool (N.eqb node2 BDDzero) false *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply Neqb_complete. assumption. apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) cut (node2 = BDDzero). intro H7. inversion H2. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_zero cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDone). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_one cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDzero). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_zero cfg H0) in H10; discriminate. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) apply Neqb_complete; assumption. Qed. Lemma BDDor_1_lemma_internal_3 : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound bound' : nat), BDDor_memo_lookup memo node1 node2 = None -> BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound -> bound = S bound' -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Gt -> BDDor_1 cfg memo node1 node2 bound = (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))), (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))), BDDor_memo_put (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))). Proof. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1 cfg memo node1 node2 (S bound')) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) intros cfg memo node1 node2 bound bound' H H0 H1 H2 H3 H4 H5. rewrite H4. simpl in |- *. rewrite H. cut (Neqb node1 BDDzero = false). cut (Neqb node1 BDDone = false). (* Goal: forall (_ : @eq bool (N.eqb node1 BDDone) false) (_ : @eq bool (N.eqb node1 BDDzero) false), @eq (prod BDDconfig (prod ad BDDor_memo)) (if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else match BDDcompare (var cfg node1) (var cfg node2) with | Eq => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) (low cfg node2) bound'))) (high cfg node1) (high cfg node2) bound'))))))) | Lt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) | Gt => @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) end) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))))) *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) cut (Neqb node2 BDDzero = false). cut (Neqb node2 BDDone = false). intros H6 H7 H8 H9. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite H6; rewrite H7; rewrite H8; rewrite H9; rewrite H5; reflexivity. (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *. intro H6. cut (node2 = BDDone). intro H7. (* Goal: False *) (* Goal: @eq ad node2 BDDzero *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) inversion H2. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_one cfg H0) in H10; discriminate. (* Goal: @eq ad node2 BDDone *) (* Goal: @eq bool (N.eqb node2 BDDzero) false *) (* Goal: @eq bool (N.eqb node1 BDDone) false *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply Neqb_complete. assumption. apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) cut (node2 = BDDzero). intro H7. inversion H2. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_zero cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) (* Goal: @eq bool (N.eqb node1 BDDzero) false *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDone). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite (config_OK_one cfg H0) in H10; discriminate. apply Neqb_complete; assumption. (* Goal: False *) apply not_true_is_false. unfold not in |- *; intro. cut (node1 = BDDzero). intro H7. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H1. inversion H8. inversion H9. rewrite H7 in H10. rewrite (config_OK_zero cfg H0) in H10; discriminate. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) apply Neqb_complete; assumption. Qed. Lemma BDDvar_le_max_2 : forall x y : BDDvar, BDDvar_le x (BDDvar_max y x) = true. Proof. (* Goal: forall x y : BDDvar, @eq bool (BDDvar_le x (BDDvar_max y x)) true *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. intros x y. elim (sumbool_of_bool (Nleb y x)). (* Goal: @eq bool (Nleb x (if Nleb x y then y else x)) true *) intro y0. rewrite y0. apply Nleb_refl. intro y0. rewrite y0. apply Nltb_leb_weak. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. Qed. Lemma BDDvar_le_max_1 : forall x y : BDDvar, BDDvar_le x (BDDvar_max x y) = true. Proof. (* Goal: forall x y : BDDvar, @eq bool (BDDvar_le x (BDDvar_max x y)) true *) intros x y. elim (sumbool_of_bool (Nleb x y)); unfold BDDvar_max in |- *; (* Goal: forall x y : BDDvar, @eq bool (BDDvar_le x (if BDDvar_le y x then x else y)) true *) unfold BDDvar_le in |- *. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) intro y0. rewrite y0. assumption. intro y0. rewrite y0. apply Nleb_refl. Qed. Lemma BDDor_1_internal : forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound : nat), BDDconfig_OK cfg -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> BDDor_memo_OK cfg memo -> is_internal_node (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound))) -> is_internal_node cfg node1 \/ is_internal_node cfg node2. Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound : nat) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : BDDor_memo_OK cfg memo) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intros cfg memo node1 node2 bound H H0 H1 H2 H3. elim H0; intro. elim H1; intro. rewrite H4 in H3. rewrite H5 in H3. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) elim (option_sum _ (BDDor_memo_lookup memo BDDzero BDDzero)). intro y. inversion y. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDzero) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite (BDDor_1_lemma_1 cfg memo BDDzero BDDzero x bound H6) in H3. simpl in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) unfold BDDor_memo_OK in H2. cut (bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDzero))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro H7. rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)) in H7. cut (x = BDDzero). (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) x with | Some a => true | None => false end true *) (* Goal: config_node_OK cfg BDDone *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_of_BDD cfg BDDone) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro H8. inversion H3. inversion H9. inversion H10. rewrite H8 in H11. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDzero *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDzero) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite (config_OK_zero cfg H) in H11. discriminate. apply BDDunique with (cfg := cfg). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. right. right. unfold in_dom in |- *. inversion H3. inversion H8. inversion H9. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite H10. reflexivity. left; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_or bool_fun_zero bool_fun_zero). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)). unfold bool_fun_eq in |- *. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) reflexivity. exact (proj2 (proj2 (proj2 (proj2 (H2 BDDzero BDDzero x H6))))). (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite (BDDor_1_lemma_zero_1 cfg memo BDDzero bound y) in H3. simpl in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H3. inversion H6. inversion H7. rewrite (config_OK_zero cfg H) in H8. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) discriminate. elim H5; clear H5; intro. rewrite H4 in H3. rewrite H5 in H3. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) elim (option_sum _ (BDDor_memo_lookup memo BDDzero BDDone)). intro y. inversion y. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite (BDDor_1_lemma_1 cfg memo BDDzero BDDone x bound H6) in H3. simpl in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) unfold BDDor_memo_OK in H2. cut (bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro H7. rewrite (proj1 (bool_fun_of_BDD_semantics cfg H)) in H7. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))) in H7. (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) x with | Some a => true | None => false end true *) (* Goal: config_node_OK cfg BDDone *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_of_BDD cfg BDDone) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) cut (x = BDDone). intro H8. inversion H3. inversion H9. inversion H10. rewrite H8 in H11. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite (config_OK_one cfg H) in H11. discriminate. apply BDDunique with (cfg := cfg). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. right. right. unfold in_dom in |- *. inversion H3. inversion H8. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H9. rewrite H10. reflexivity. right; left; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_or bool_fun_zero bool_fun_one). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) unfold bool_fun_eq in |- *. reflexivity. exact (proj2 (proj2 (proj2 (proj2 (H2 BDDzero BDDone x H6))))). (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. rewrite (BDDor_1_lemma_one_1 cfg memo BDDzero bound y) in H3. simpl in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H3. inversion H6. inversion H7. rewrite (config_OK_one cfg H) in H8. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) discriminate. right. apply in_dom_is_internal. assumption. elim H4; clear H4; intro. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite H4 in H3. elim (option_sum _ (BDDor_memo_lookup memo BDDone node2)). (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) intro y. inversion y. rewrite (BDDor_1_lemma_1 cfg memo BDDone node2 x bound H5) in H3. (* Goal: forall _ : @eq ad x BDDone, or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) simpl in H3. unfold BDDor_memo_OK in H2. cut (x = BDDone). intro H6. rewrite H6 in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: @eq ad x BDDone *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) inversion H3. inversion H7. inversion H8. rewrite (config_OK_one cfg H) in H9. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) discriminate. apply BDDunique with (cfg := cfg). assumption. exact (proj1 (proj2 (proj2 (H2 BDDone node2 x H5)))). (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (bool_fun_or bool_fun_zero bool_fun_one) vb) (bool_fun_eval bool_fun_one vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDzero BDDone) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) right; left; reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg x) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) exact (proj2 (proj2 (proj2 (proj2 (H2 BDDone node2 x H5))))). (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H))). apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node2) bool_fun_one). (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad), or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) apply bool_fun_or_commute. apply bool_fun_or_one. intro y. rewrite (BDDor_1_lemma_one_2 cfg memo node2 bound y) in H3. (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) (* Goal: or (is_internal_node cfg node1) (is_internal_node cfg node2) *) simpl in H3. inversion H3. inversion H5. inversion H6. rewrite (config_OK_one cfg H) in H7. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) discriminate. left. apply in_dom_is_internal. assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (******** Copied variables upto bdd5_2.v *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Definition BDDzero := N0. Definition BDDone := Npos 1. Definition BDDvar := ad. Definition BDDcompare (x y : BDDvar) := match x, y with | N0, N0 => Datatypes.Eq | N0, Npos _ => Datatypes.Lt | Npos _, N0 => Datatypes.Gt | Npos p1, Npos p2 => Pcompare p1 p2 Datatypes.Eq end. Definition BDDvar_eq := Neqb. Definition ad_S (a : ad) := match a with | N0 => Npos 1 | Npos p => Npos (Psucc p) end. Lemma ad_S_is_S : forall a : ad, nat_of_N (ad_S a) = S (nat_of_N a). Proof. (* Goal: forall a : BDDvar, @eq comparison (BDDcompare a (ad_S a)) Lt *) simple induction a. reflexivity. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simpl in |- *. unfold nat_of_P in |- *. intro p. exact (Pmult_nat_succ_morphism p 1). Qed. Lemma lt_pred : forall x y : nat, x < y -> x <> 0 -> pred x < pred y. Proof. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simple induction x. intros y H H0. absurd (0 = 0). assumption. reflexivity. intros n H y H0 H1. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply lt_pred. assumption. Qed. Lemma O_N0 : forall x : ad, nat_of_N x = 0 -> x = N0. Proof. (* Goal: forall (x : ad) (_ : @eq nat (N.to_nat x) O), @eq ad x N0 *) cut (0 = nat_of_N N0). intro H. rewrite H. intros x H0. replace x with (N_of_nat (nat_of_N x)). (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) replace N0 with (N_of_nat (nat_of_N N0)). rewrite H0. reflexivity. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) rewrite (N_of_nat_of_N N0). reflexivity. rewrite (N_of_nat_of_N x). (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) reflexivity. reflexivity. Qed. Lemma INFERIEUR_neq_O : forall x y : ad, BDDcompare x y = Datatypes.Lt -> y <> N0. Proof. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. simpl in |- *. intro; discriminate. unfold not in |- *; intros. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) discriminate. simpl in |- *. intros; discriminate. unfold not in |- *; intros. discriminate. Qed. Lemma BDDcompare_trans : forall x y z : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare y z = Datatypes.Lt -> BDDcompare x z = Datatypes.Lt. Proof. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. simpl in |- *. intros z H H0. discriminate H. simpl in |- *. intro p. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simple induction z. intros H H0. discriminate H0. trivial. simpl in |- *. intros p z H H0. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) discriminate H. intro p. intro p0. simple induction z. simpl in |- *. trivial. intro p1. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simpl in |- *. intros H H0. cut (nat_of_P p0 < nat_of_P p). (* Goal: forall _ : lt (Pos.to_nat p0) (Pos.to_nat p), @eq comparison (Pos.compare_cont Eq p0 p1) Lt *) (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) cut (nat_of_P p < nat_of_P p1). intros H1 H2. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Lt *) apply nat_of_P_lt_Lt_compare_complement_morphism. apply lt_trans with (m := nat_of_P p). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. assumption. apply nat_of_P_lt_Lt_compare_morphism. assumption. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply nat_of_P_lt_Lt_compare_morphism. assumption. Qed. Lemma ad_S_le_then_le : forall x y : ad, Nleb (ad_S x) y = true -> Nleb x y = true. Proof. (* Goal: forall (x y : BDDvar) (_ : @eq comparison (BDDcompare x y) Lt), or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) intros x y H. cut (Nleb x (ad_S x) = true). intro H0. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply Nleb_trans with (b := ad_S x). assumption. assumption. unfold Nleb in |- *. (* Goal: @eq bool (Nat.leb (N.to_nat y) (N.to_nat (ad_S y))) true *) apply leb_correct. rewrite (ad_S_is_S x). apply le_S. apply le_n. Qed. Lemma le_then_le_S : forall x y : ad, Nleb x y = true -> Nleb x (ad_S y) = true. Proof. (* Goal: forall (x y : BDDvar) (_ : @eq comparison (BDDcompare x y) Lt), or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) intros x y H. cut (Nleb y (ad_S y) = true). intro H0. apply Nleb_trans with (b := y). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. assumption. unfold Nleb in |- *. apply leb_correct. rewrite (ad_S_is_S y). (* Goal: le (N.to_nat y) (S (N.to_nat y)) *) apply le_S. apply le_n. Qed. Lemma ad_S_le_then_neq : forall x y : ad, Nleb (ad_S x) y = true -> Neqb x y = false. Proof. (* Goal: forall (x y : BDDvar) (_ : @eq comparison (BDDcompare x y) Lt), or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) intros x y H. cut (Neqb x y = true \/ Neqb x y = false). intro H0. elim H0. (* Goal: forall _ : @eq positive p0 p, @eq BDDvar (Npos p0) (Npos p) *) (* Goal: @eq positive p0 p *) clear H0. intro H0. cut (x = y). intro H1. rewrite H1 in H. unfold Nleb in H. (* Goal: @eq bool (N.eqb x y) false *) (* Goal: @eq ad x y *) (* Goal: forall _ : @eq bool (N.eqb x y) false, @eq bool (N.eqb x y) false *) (* Goal: or (@eq bool (N.eqb x y) true) (@eq bool (N.eqb x y) false) *) rewrite (ad_S_is_S y) in H. (* Goal: lt (Pos.to_nat p) (Pos.to_nat (Pos.succ p)) *) (* Goal: @eq nat (Pos.to_nat (Pos.succ p)) (Init.Nat.add (S O) (Pos.to_nat p)) *) cut (leb (S (nat_of_N y)) (nat_of_N y) = false). rewrite H. intro H2. (* Goal: forall _ : lt (N.to_nat y) (S (N.to_nat y)), @eq bool (Nat.leb (S (N.to_nat y)) (N.to_nat y)) false *) (* Goal: lt (N.to_nat y) (S (N.to_nat y)) *) (* Goal: @eq ad x y *) (* Goal: forall _ : @eq bool (N.eqb x y) false, @eq bool (N.eqb x y) false *) (* Goal: or (@eq bool (N.eqb x y) true) (@eq bool (N.eqb x y) false) *) discriminate H2. cut (nat_of_N y < S (nat_of_N y)). intro H2. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply leb_correct_conv. assumption. unfold lt in |- *. trivial. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply Neqb_complete. assumption. trivial. elim (Neqb x y). auto. auto. Qed. Lemma BDDcompare_succ : forall a : BDDvar, BDDcompare a (ad_S a) = Datatypes.Lt. Proof. (* Goal: forall a : BDDvar, @eq comparison (BDDcompare a (ad_S a)) Lt *) simple induction a. simpl in |- *. trivial. simpl in |- *. intro p. (* Goal: forall (_ : @ex nat (fun h : nat => @eq nat (Pos.to_nat p) (S h))) (_ : lt (Pos.to_nat p) O), @eq comparison Gt Lt *) (* Goal: @ex nat (fun h : nat => @eq nat (Pos.to_nat p) (S h)) *) (* Goal: forall (p p0 : positive) (_ : lt (N.to_nat (Npos p0)) (N.to_nat (Npos p))), @eq comparison (BDDcompare (Npos p0) (Npos p)) Lt *) cut (nat_of_P p < nat_of_P (Psucc p)). intro H. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply nat_of_P_lt_Lt_compare_complement_morphism. assumption. (* Goal: forall (_ : @ex nat (fun h : nat => @eq nat (Pos.to_nat p) (S h))) (_ : lt (Pos.to_nat p) O), @eq comparison Gt Lt *) (* Goal: @ex nat (fun h : nat => @eq nat (Pos.to_nat p) (S h)) *) (* Goal: forall (p p0 : positive) (_ : lt (N.to_nat (Npos p0)) (N.to_nat (Npos p))), @eq comparison (BDDcompare (Npos p0) (Npos p)) Lt *) cut (nat_of_P (Psucc p) = 1 + nat_of_P p). intro H. rewrite H. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simpl in |- *. unfold lt in |- *. trivial. unfold nat_of_P in |- *. apply Pmult_nat_succ_morphism. Qed. Lemma BDDcompare_lt : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> nat_of_N x < nat_of_N y. Proof. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. simpl in |- *. intro H. discriminate. simpl in |- *. intros p H. (* Goal: forall _ : @eq positive p0 p, @eq BDDvar (Npos p0) (Npos p) *) (* Goal: @eq positive p0 p *) cut (exists h : nat, nat_of_P p = S h). intro H0. inversion H0. rewrite H1. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) apply lt_O_Sn. apply ZL4. simpl in |- *. intros p H. discriminate. simpl in |- *. intros p p0 H. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply nat_of_P_lt_Lt_compare_morphism. assumption. Qed. Lemma BDDlt_compare : forall x y : BDDvar, nat_of_N x < nat_of_N y -> BDDcompare x y = Datatypes.Lt. Proof. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. simpl in |- *. intro H. absurd (0 < 0). apply lt_n_O. assumption. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simpl in |- *. reflexivity. simpl in |- *. intro p. cut (exists h : nat, nat_of_P p = S h). intro H. (* Goal: forall _ : lt (Pos.to_nat p) O, @eq comparison Gt Lt *) (* Goal: @ex nat (fun h : nat => @eq nat (Pos.to_nat p) (S h)) *) (* Goal: forall (p p0 : positive) (_ : lt (N.to_nat (Npos p0)) (N.to_nat (Npos p))), @eq comparison (BDDcompare (Npos p0) (Npos p)) Lt *) inversion H. rewrite H0. intro H1. absurd (S x0 < 0). apply lt_n_O. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) assumption. apply ZL4. simpl in |- *. intro p. intros p0 H. apply nat_of_P_lt_Lt_compare_complement_morphism. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. Qed. Lemma relation_sum : forall r : Datatypes.comparison, {r = Datatypes.Eq} + {r = Datatypes.Lt} + {r = Datatypes.Gt}. Proof. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) intro r. elim r. left; left; reflexivity. left; right; reflexivity. right; reflexivity. Qed. Lemma BDD_EGAL_complete : forall x y : BDDvar, BDDcompare x y = Datatypes.Eq -> x = y. Proof. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. reflexivity. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) intros; discriminate. simpl in |- *. intros p p0 H. cut (p0 = p). intro H0. rewrite H0; reflexivity. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply Pcompare_Eq_eq. assumption. Qed. Lemma lt_trans_1 : forall x y z : nat, x < y -> y < S z -> x < z. Proof. (* Goal: lt x z *) intros x y z H H0. unfold lt in H0. unfold lt in H. unfold lt in |- *. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply le_trans with (m := y). assumption. apply le_S_n. assumption. Qed. Lemma BDDcompare_sup_inf : forall x y : BDDvar, BDDcompare x y = Datatypes.Gt -> BDDcompare y x = Datatypes.Lt. Proof. (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. simpl in |- *. intro; discriminate. simpl in |- *. intro p. intro; discriminate. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) simpl in |- *. reflexivity. unfold BDDcompare in |- *. intros p p0 H. apply ZC1. assumption. Qed. Lemma BDDcompare_1 : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare (ad_S x) y = Datatypes.Lt \/ ad_S x = y. Proof. (* Goal: forall (x y : BDDvar) (_ : @eq comparison (BDDcompare x y) Lt), or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) intros x y H. elim (relation_sum (BDDcompare (ad_S x) y)). intro y0. elim y0; intro. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) right. apply BDD_EGAL_complete. assumption. left; assumption. intro y0. (* Goal: or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) absurd (nat_of_N x < nat_of_N x). apply lt_irrefl. apply lt_trans_1 with (y := nat_of_N y). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply BDDcompare_lt. assumption. rewrite <- (ad_S_is_S x). apply BDDcompare_lt. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply BDDcompare_sup_inf. assumption. Qed. Definition max (m n : nat) := if leb m n then n else m. Lemma lt_max_1_2 : forall x1 y1 x2 y2 : nat, x1 < x2 -> y1 < y2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 x2) (_ : lt y1 x2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (sumbool_of_bool (leb x2 y2)). intro y. rewrite y. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) elim (leb x1 y1). assumption. apply lt_le_trans with (m := x2). assumption. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply leb_complete. assumption. intro y. rewrite y. elim (leb x1 y1). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply lt_trans with (m := y2). assumption. apply leb_complete_conv. assumption. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. Qed. Lemma lt_max_2 : forall x1 y1 x2 y2 : nat, x1 < y2 -> y1 < y2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 x2) (_ : lt y1 x2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (leb x1 y1). elim (sumbool_of_bool (leb x2 y2)). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) intro y. rewrite y. assumption. intro y. rewrite y. apply lt_trans with (m := y2). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. apply leb_complete_conv. assumption. elim (sumbool_of_bool (leb x2 y2)). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) intro y. rewrite y. assumption. intro y. rewrite y. apply lt_trans with (m := y2). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. apply leb_complete_conv. assumption. Qed. Lemma lt_max_12 : forall x1 y1 x2 y2 : nat, x1 < x2 -> y1 < x2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 x2) (_ : lt y1 x2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (leb x1 y1). elim (sumbool_of_bool (leb x2 y2)); intro y; rewrite y. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply lt_le_trans with (m := x2). assumption. apply leb_complete; assumption. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. elim (sumbool_of_bool (leb x2 y2)). intro y. rewrite y. apply lt_le_trans with (m := x2). (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) assumption. apply leb_complete; assumption. intro y; rewrite y. assumption. Qed. Lemma BDDcompare_eq : forall x y : BDDvar, BDDcompare x y = Datatypes.Eq -> x = y. Proof. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) double induction x y. reflexivity. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: forall _ : @eq comparison (BDDcompare N0 N0) Eq, @eq BDDvar N0 N0 *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare N0 (Npos p)) Eq), @eq BDDvar N0 (Npos p) *) (* Goal: forall (p : positive) (_ : @eq comparison (BDDcompare (Npos p) N0) Eq), @eq BDDvar (Npos p) N0 *) (* Goal: forall (p p0 : positive) (_ : @eq comparison (BDDcompare (Npos p0) (Npos p)) Eq), @eq BDDvar (Npos p0) (Npos p) *) intros; discriminate. simpl in |- *. intros p p0 H. cut (p0 = p). intro H0. rewrite H0; reflexivity. (* Goal: @eq comparison (Pos.compare_cont Eq p0 p) Eq *) apply Pcompare_Eq_eq. assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Lemma nodes_preserved_trans : forall cfg1 cfg2 cfg3 : BDDconfig, nodes_preserved cfg1 cfg2 -> nodes_preserved cfg2 cfg3 -> nodes_preserved cfg1 cfg3. Proof. unfold nodes_preserved in |- *; intros. apply H0. apply H. assumption. Qed. Lemma nodes_preserved_var : forall (cfg cfg' : BDDconfig) (node : ad), nodes_preserved cfg cfg' -> is_internal_node cfg node -> var cfg' node = var cfg node. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (node : ad) (_ : nodes_preserved cfg cfg') (_ : is_internal_node cfg node), @eq BDDvar (var cfg' node) (var cfg node) *) unfold nodes_preserved, is_internal_node in |- *. intros. inversion H0. inversion H1. (* Goal: is_internal_node cfg node *) inversion H2. unfold var in |- *. rewrite H3. rewrite (H x x0 x1 node H3). reflexivity. Qed. Lemma nodes_preserved_var_1 : forall (cfg cfg' : BDDconfig) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> nodes_preserved cfg cfg' -> config_node_OK cfg node -> var cfg' node = var cfg node. Proof. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros. unfold var in |- *. elim H2; intro. rewrite H3. rewrite (config_OK_zero cfg H). (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) rewrite (config_OK_zero cfg' H0). reflexivity. elim H3; intro. rewrite H4. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) rewrite (config_OK_one cfg H). rewrite (config_OK_one cfg' H0). reflexivity. (* Goal: @eq BDDvar match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) cut (is_internal_node cfg node). intro. inversion H5. inversion H6. inversion H7. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node1)) (var cfg node1)) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H8. unfold nodes_preserved in H1. rewrite (H1 x x0 x1 node H8). (* Goal: @eq comparison (BDDcompare y z) Lt *) reflexivity. apply in_dom_is_internal. assumption. Qed. Lemma nodes_preserved_3 : forall (cfg cfg' : BDDconfig) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> nodes_preserved cfg cfg' -> config_node_OK cfg node -> bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node). Proof. (* Goal: @eq comparison (BDDcompare y z) Lt *) intros cfg cfg' node H H0 H1 H2. apply bool_fun_preservation. assumption. assumption. unfold nodes_preserved in H1. (* Goal: @eq comparison (BDDcompare y z) Lt *) intros x l r a H3. apply H1. assumption. assumption. Qed. Lemma bool_fun_or_preserves_eq : forall bf1 bf2 bf1' bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_or bf1 bf2) (bool_fun_or bf1' bf2'). Proof. (* Goal: bool_fun_eq (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb else bool_fun_of_BDD cfg (low cfg node) vb) (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) *) unfold bool_fun_eq in |- *. intros bf1 bf2 bf1' bf2' H H0 vb. unfold bool_fun_or in |- *. unfold bool_fun_eval in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) unfold bool_fun_eval in H, H0. rewrite (H vb). rewrite (H0 vb). reflexivity. Qed. Definition BDDvar_le := Nleb. Definition BDDvar_max (x y : BDDvar) := if BDDvar_le x y then y else x. Lemma BDDvar_max_comm : forall x y : BDDvar, BDDvar_max x y = BDDvar_max y x. Proof. (* Goal: forall (x y z : BDDvar) (_ : @eq bool (BDDvar_le x (BDDvar_max y z)) true), le (N.to_nat x) (max (N.to_nat y) (N.to_nat z)) *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. intros x y. elim (sumbool_of_bool (Nleb x y)). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. elim (sumbool_of_bool (Nleb y x)). intro y1. rewrite y1. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply Nleb_antisym. assumption. assumption. intro y1. rewrite y1. reflexivity. (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. elim (sumbool_of_bool (Nleb y x)). intro y1. rewrite y1. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. intro y1. rewrite y1. apply Nleb_antisym. apply Nltb_leb_weak. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply Nltb_leb_weak. assumption. Qed. Lemma BDDvar_max_lemma_1 : forall x y z : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare (BDDvar_max x N0) (BDDvar_max y z) = Datatypes.Lt. Proof. (* Goal: forall (x y z : BDDvar) (_ : @eq bool (BDDvar_le x (BDDvar_max y z)) true), le (N.to_nat x) (max (N.to_nat y) (N.to_nat z)) *) intros x y z. rewrite (BDDvar_max_comm x N0). unfold BDDvar_max in |- *. simpl in |- *. (* Goal: @eq bool (BDDvar_le x x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intro H. unfold BDDvar_le in |- *. unfold Nleb in |- *. elim (sumbool_of_bool (leb (nat_of_N y) (nat_of_N z))). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. apply BDDlt_compare. apply lt_le_trans with (m := nat_of_N y). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDcompare_lt. assumption. apply leb_complete. assumption. intro y0. (* Goal: @eq comparison (BDDcompare y z) Lt *) rewrite y0. assumption. Qed. Lemma BDDvar_le_z : forall x : BDDvar, BDDvar_le N0 x = true. Proof. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) intro x. unfold BDDvar_le in |- *. unfold Nleb in |- *. simpl in |- *. reflexivity. Qed. Lemma BDDvar_le_compare : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDvar_le x y = true. Proof. (* Goal: @eq bool (BDDvar_le x x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros x y H. unfold BDDvar_le in |- *. unfold Nleb in |- *. apply leb_correct. apply lt_le_weak. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDcompare_lt. assumption. Qed. Lemma BDDcompare_max_1_2 : forall x1 x2 y1 y2 : BDDvar, BDDcompare x1 x2 = Datatypes.Lt -> BDDcompare y1 y2 = Datatypes.Lt -> BDDcompare (BDDvar_max x1 y1) (BDDvar_max x2 y2) = Datatypes.Lt. Proof. (* Goal: forall (x y z : BDDvar) (_ : @eq bool (BDDvar_le x (BDDvar_max y z)) true), le (N.to_nat x) (max (N.to_nat y) (N.to_nat z)) *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. unfold Nleb in |- *. intros x1 x2 y1 y2 H H0. elim (sumbool_of_bool (leb (nat_of_N x1) (nat_of_N y1))). (* Goal: forall _ : @eq bool (N.eqb l r) false, bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intro y. rewrite y. elim (sumbool_of_bool (leb (nat_of_N x2) (nat_of_N y2))). (* Goal: @eq comparison (BDDcompare y z) Lt *) intro y0. rewrite y0. assumption. intro y0. rewrite y0. apply BDDlt_compare. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply lt_trans with (m := nat_of_N y2). apply BDDcompare_lt. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply leb_complete_conv. assumption. intro y. rewrite y. elim (sumbool_of_bool (leb (nat_of_N x2) (nat_of_N y2))). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. apply BDDlt_compare. apply lt_le_trans with (m := nat_of_N x2). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDcompare_lt. assumption. apply leb_complete. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) intro y0. rewrite y0. assumption. Qed. Lemma BDDcompare_z_nz : forall x : BDDvar, x <> N0 -> BDDcompare N0 x = Datatypes.Lt. Proof. (* Goal: @eq comparison (BDDcompare y z) Lt *) simple induction x. intros H. absurd (N0 = N0). assumption. reflexivity. simpl in |- *. reflexivity. Qed. Lemma BDDvar_max_x_x : forall x : BDDvar, BDDvar_max x x = x. Proof. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. intro x. rewrite (Nleb_refl x). reflexivity. Qed. Lemma BDDvar_ordered_high_1 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> is_internal_node cfg (high cfg node1) \/ is_internal_node cfg (high cfg node2) -> BDDcompare (BDDvar_max (var cfg (high cfg node1)) (var cfg (high cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2)) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. cut (config_node_OK cfg (high cfg node1)). cut (config_node_OK cfg (high cfg node2)). (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H3 H4. elim H2; intro. cut (BDDcompare (var cfg (high cfg node1)) (var cfg node1) = Datatypes.Lt). (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) intro H6. elim H3; intro. rewrite H7. unfold var at 2 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq comparison (BDDcompare y z) Lt *) unfold BDDzero in |- *. apply BDDvar_max_lemma_1. assumption. elim H7; intro. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDone with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) rewrite H8. unfold var at 2 in |- *. rewrite (config_OK_one cfg H). unfold BDDzero in |- *. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_max_lemma_1. assumption. apply BDDcompare_max_1_2. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_high. assumption. assumption. apply in_dom_is_internal. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDvar_ordered_high. assumption. assumption. assumption. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) elim H4; intro. rewrite H6. unfold var at 1 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. rewrite (BDDvar_max_comm N0 (var cfg (high cfg node2))). (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node2)) N0) (BDDvar_max (var cfg node2) (var cfg node1))) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite (BDDvar_max_comm (var cfg node1) (var cfg node2)). apply BDDvar_max_lemma_1. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_high. assumption. assumption. assumption. elim H6; intro. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDone with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) rewrite H7. unfold var at 1 in |- *. rewrite (config_OK_one cfg H). unfold BDDzero in |- *. (* Goal: @eq comparison (BDDcompare (BDDvar_max N0 (var cfg (high cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (high cfg node1)) (var cfg (high cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) rewrite (BDDvar_max_comm N0 (var cfg (high cfg node2))). rewrite (BDDvar_max_comm (var cfg node1) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_max_lemma_1. apply BDDvar_ordered_high. assumption. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDcompare_max_1_2. apply BDDvar_ordered_high. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply in_dom_is_internal; assumption. apply BDDvar_ordered_high. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. assumption. assumption. apply high_OK. assumption. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply high_OK. assumption. assumption. Qed. Lemma BDDvar_ordered_low_1 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> is_internal_node cfg (low cfg node1) \/ is_internal_node cfg (low cfg node2) -> BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2)) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. cut (config_node_OK cfg (low cfg node1)). cut (config_node_OK cfg (low cfg node2)). (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H3 H4. elim H2; intro. cut (BDDcompare (var cfg (low cfg node1)) (var cfg node1) = Datatypes.Lt). (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) intro H6. elim H3; intro. rewrite H7. unfold var at 2 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq comparison (BDDcompare y z) Lt *) unfold BDDzero in |- *. apply BDDvar_max_lemma_1. assumption. elim H7; intro. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDone with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) rewrite H8. unfold var at 2 in |- *. rewrite (config_OK_one cfg H). unfold BDDzero in |- *. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_max_lemma_1. assumption. apply BDDcompare_max_1_2. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_low. assumption. assumption. apply in_dom_is_internal. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDvar_ordered_low. assumption. assumption. assumption. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) elim H4; intro. rewrite H6. unfold var at 1 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. rewrite (BDDvar_max_comm N0 (var cfg (low cfg node2))). (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node2)) N0) (BDDvar_max (var cfg node2) (var cfg node1))) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite (BDDvar_max_comm (var cfg node1) (var cfg node2)). apply BDDvar_max_lemma_1. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_low. assumption. assumption. assumption. elim H6; intro. (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDone with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) rewrite H7. unfold var at 1 in |- *. rewrite (config_OK_one cfg H). unfold BDDzero in |- *. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node2)) N0) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg (low cfg node2))) (BDDvar_max (var cfg node1) (var cfg node2))) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite (BDDvar_max_comm N0 (var cfg (low cfg node2))). rewrite (BDDvar_max_comm (var cfg node1) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_max_lemma_1. apply BDDvar_ordered_low. assumption. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDcompare_max_1_2. apply BDDvar_ordered_low. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply in_dom_is_internal; assumption. apply BDDvar_ordered_low. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. assumption. assumption. apply low_OK. assumption. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply low_OK. assumption. assumption. Qed. Lemma BDDvar_ordered_high_2 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Lt -> BDDcompare (BDDvar_max (var cfg node1) (var cfg (high cfg node2))) (var cfg node2) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. cut (var cfg node2 = BDDvar_max (var cfg node2) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) intro H3. rewrite H3. apply BDDcompare_max_1_2. assumption. cut (config_node_OK cfg (high cfg node2)). (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) intro H4. elim H4; intro. rewrite H5. unfold var at 1 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. apply BDDcompare_z_nz. apply INFERIEUR_neq_O with (x := var cfg node1). (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. elim H5; intro. rewrite H6. unfold var at 1 in |- *. rewrite (config_OK_one cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. apply BDDcompare_z_nz. apply INFERIEUR_neq_O with (x := var cfg node1). (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDvar_ordered_high. assumption. assumption. apply in_dom_is_internal. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply high_OK. assumption. assumption. rewrite (BDDvar_max_x_x (var cfg node2)). (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. Qed. Lemma BDDvar_ordered_low_2 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Lt -> BDDcompare (BDDvar_max (var cfg node1) (var cfg (low cfg node2))) (var cfg node2) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. cut (var cfg node2 = BDDvar_max (var cfg node2) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) intro H3. rewrite H3. apply BDDcompare_max_1_2. assumption. cut (config_node_OK cfg (low cfg node2)). (* Goal: @eq comparison (BDDcompare match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDzero with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (var cfg node2)) Lt *) (* Goal: @eq comparison (BDDcompare (var cfg (low cfg node2)) (var cfg node2)) Lt *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: @eq BDDvar (var cfg node2) (BDDvar_max (var cfg node2) (var cfg node2)) *) intro H4. elim H4; intro. rewrite H5. unfold var at 1 in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. apply BDDcompare_z_nz. apply INFERIEUR_neq_O with (x := var cfg node1). (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. elim H5; intro. rewrite H6. unfold var at 1 in |- *. rewrite (config_OK_one cfg H). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. apply BDDcompare_z_nz. apply INFERIEUR_neq_O with (x := var cfg node1). (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply BDDvar_ordered_low. assumption. assumption. apply in_dom_is_internal. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply low_OK. assumption. assumption. rewrite (BDDvar_max_x_x (var cfg node2)). (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. Qed. Lemma BDDvar_ordered_high_3 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> BDDcompare (var cfg node2) (var cfg node1) = Datatypes.Lt -> BDDcompare (BDDvar_max (var cfg (high cfg node1)) (var cfg node2)) (var cfg node1) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. rewrite (BDDvar_max_comm (var cfg (high cfg node1)) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_high_2. assumption. assumption. assumption. assumption. Qed. Lemma BDDvar_ordered_low_3 : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> is_internal_node cfg node1 -> is_internal_node cfg node2 -> BDDcompare (var cfg node2) (var cfg node1) = Datatypes.Lt -> BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2) (_ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt), @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) intros cfg node1 node2 H H0 H1 H2. rewrite (BDDvar_max_comm (var cfg (low cfg node1)) (var cfg node2)). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDvar_ordered_low_2. assumption. assumption. assumption. assumption. Qed. Lemma lt_max_nat_of_N : forall x y z : BDDvar, BDDcompare (BDDvar_max x y) z = Datatypes.Lt -> max (nat_of_N x) (nat_of_N y) < nat_of_N z. Proof. (* Goal: forall (x y z : BDDvar) (_ : @eq bool (BDDvar_le x (BDDvar_max y z)) true), le (N.to_nat x) (max (N.to_nat y) (N.to_nat z)) *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. intros x y z. elim (sumbool_of_bool (Nleb x y)). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. intro H. unfold max in |- *. elim (sumbool_of_bool (leb (nat_of_N x) (nat_of_N y))). (* Goal: @eq comparison (BDDcompare y z) Lt *) intro y1. rewrite y1. apply BDDcompare_lt. assumption. intro y1. rewrite y1. (* Goal: le (N.to_nat x) (N.to_nat y) *) apply le_lt_trans with (m := nat_of_N y). apply leb_complete. exact y0. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDcompare_lt. assumption. intro y0. rewrite y0. intro H. unfold max in |- *. (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) memo node1) (@None (Map ad)), @eq (option ad) match MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2' with | Some node => @Some ad node | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) elim (sumbool_of_bool (leb (nat_of_N x) (nat_of_N y))). intro y1. cut (Nleb x y = true). (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) memo node1) (@None (Map ad)), @eq (option ad) match MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2' with | Some node => @Some ad node | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro H0. rewrite H0 in y0. discriminate. exact y1. intro y1. rewrite y1. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDDcompare_lt. assumption. Qed. Lemma le_nat_of_N_max : forall x y z : BDDvar, BDDvar_le x (BDDvar_max y z) = true -> nat_of_N x <= max (nat_of_N y) (nat_of_N z). Proof. (* Goal: forall (x y z : BDDvar) (_ : @eq bool (BDDvar_le x (BDDvar_max y z)) true), le (N.to_nat x) (max (N.to_nat y) (N.to_nat z)) *) unfold BDDvar_max in |- *. unfold BDDvar_le in |- *. intros x y z. elim (sumbool_of_bool (Nleb y z)). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y0. rewrite y0. intro H. unfold max in |- *. elim (sumbool_of_bool (leb (nat_of_N y) (nat_of_N z))). (* Goal: @eq comparison (BDDcompare y z) Lt *) intro y1. rewrite y1. apply leb_complete. assumption. unfold Nleb in y0. (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) rewrite y0. intro y1. discriminate. intro y0. rewrite y0. intro H. unfold max in |- *. (* Goal: @eq comparison (BDDcompare y z) Lt *) unfold Nleb in y0, H. rewrite y0. apply leb_complete. assumption. Qed. Definition bool_fun_if (x : BDDvar) (bf bf' : bool_fun) : bool_fun := fun vb : var_binding => ifb (vb x) (bf vb) (bf' vb). Lemma nodes_preserved_internal : forall (cfg cfg' : BDDconfig) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> config_node_OK cfg node -> is_internal_node cfg' node -> is_internal_node cfg node. Proof. (* Goal: is_internal_node cfg node *) intros cfg cfg' node H H0 H1 H2. inversion H2. inversion H3. inversion H4. elim H1. intro H6. rewrite H6 in H5. (* Goal: forall _ : is_internal_node cfg node, @eq BDDvar match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg') node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: is_internal_node cfg node *) rewrite (config_OK_zero cfg' H0) in H5. discriminate. intro H6. elim H6; intro. (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite H7 in H5. rewrite (config_OK_one cfg' H0) in H5. discriminate. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply in_dom_is_internal. assumption. Qed. Lemma bool_fun_if_preserves_eq : forall (x : BDDvar) (bf1 bf2 bf1' bf2' : bool_fun), bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_if x bf1 bf2) (bool_fun_if x bf1' bf2'). Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => if vb0 (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb0 else bool_fun_of_BDD cfg (low cfg node) vb0) vb) (bool_fun_eval (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) vb) *) unfold bool_fun_eq, bool_fun_if in |- *. unfold bool_fun_eval in |- *. intros x bf1 bf2 bf1' bf2' H H0 vb. rewrite (H vb). (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) rewrite (H0 vb). reflexivity. Qed. Lemma BDDmake_var_order : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> config_node_OK cfg l -> config_node_OK cfg r -> (is_internal_node cfg l -> BDDcompare (var cfg l) x = Datatypes.Lt) -> (is_internal_node cfg r -> BDDcompare (var cfg r) x = Datatypes.Lt) -> BDDvar_le (var (fst (BDDmake cfg x l r)) (snd (BDDmake cfg x l r))) x = true. Proof. (* Goal: forall (cfg : BDDconfig) (l r : ad) (x : BDDvar) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg l) (_ : config_node_OK cfg r) (_ : forall _ : is_internal_node cfg l, @eq comparison (BDDcompare (var cfg l) x) Lt) (_ : forall _ : is_internal_node cfg r, @eq comparison (BDDcompare (var cfg r) x) Lt), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) intros cfg l r x H H0 H1 H2 H3. cut (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt). cut (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt). (* Goal: forall (_ : forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt) (_ : forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros H4 H5. cut (node_OK (fst cfg) l). cut (node_OK (fst cfg) r). intros H6 H7. cut (BDDconfig_OK (fst (BDDmake cfg x l r)) /\ (Neqb l r = false -> MapGet _ (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r)) = Some (x, (l, r))) /\ (Neqb l r = true -> snd (BDDmake cfg x l r) = l) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')) -> MapGet _ (fst cfg) a = Some (x', (l', r')) \/ snd (BDDmake cfg x l r) = a) /\ (MapGet _ (fst cfg) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r))). (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros H8. elim H8; clear H8; intros. elim H9; clear H9; intros. elim H10; clear H10; intros. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) elim H11; clear H11; intros. elim (sumbool_of_bool (Neqb l r)). intro y. (* Goal: @eq bool (if vb (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) then bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (high (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb else bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (low (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l) vb) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite (H10 y). unfold var in |- *. elim (option_sum _ (MapGet _ (fst cfg) l)); intro y0. (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) elim y0. intro x0. elim x0. intro y1; intro y2. elim y2. intros y3 y4 y5. rewrite (proj2 (H11 l y3 y4 y1) y5). (* Goal: @eq bool (BDDvar_le y1 x) true *) (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite y5 in H5. cut (BDDcompare y1 x = Datatypes.Lt). intro H13. apply BDDvar_le_compare. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. apply H5 with (ll := y3) (rl := y4). reflexivity. elim H7; intro. (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite H13. rewrite H13 in H8. rewrite (config_OK_zero (fst (BDDmake cfg x BDDzero r)) H8). (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold BDDzero in |- *. apply BDDvar_le_z. elim H13. intro H14. rewrite H14. rewrite H14 in H8. (* Goal: @eq bool (BDDvar_le BDDzero x) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) l (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite (config_OK_one (fst (BDDmake cfg x BDDone r)) H8). unfold BDDzero in |- *. (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) l with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end x) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) x) true *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) apply BDDvar_le_z. intro H14. unfold in_dom in H14. rewrite y0 in H14. discriminate. (* Goal: @eq bool (if vb (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) then bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (high (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb else bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (low (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l) vb) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intro y. unfold var in |- *. rewrite (H9 y). unfold BDDvar_le in |- *. unfold Nleb in |- *. apply leb_correct. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply le_n. apply BDDmake_semantics. assumption. assumption. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. assumption. assumption. assumption. intros xr lr rr H4. unfold is_internal_node in H3. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold var in H3. rewrite H4 in H3. apply H3. split with xr. split with lr. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) split with rr. reflexivity. intros xl ll rl H4. unfold is_internal_node in H2. unfold var in H2. (* Goal: @eq comparison (BDDcompare xl x) Lt *) rewrite H4 in H2. apply H2. split with xl. split with ll. split with rl. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. Qed. Lemma BDDmake_bool_fun : forall (cfg : BDDconfig) (l r : ad) (x : BDDvar), BDDconfig_OK cfg -> config_node_OK cfg l -> config_node_OK cfg r -> (is_internal_node cfg l -> BDDcompare (var cfg l) x = Datatypes.Lt) -> (is_internal_node cfg r -> BDDcompare (var cfg r) x = Datatypes.Lt) -> bool_fun_eq (bool_fun_of_BDD (fst (BDDmake cfg x l r)) (snd (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)). Proof. (* Goal: forall (cfg : BDDconfig) (l r : ad) (x : BDDvar) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg l) (_ : config_node_OK cfg r) (_ : forall _ : is_internal_node cfg l, @eq comparison (BDDcompare (var cfg l) x) Lt) (_ : forall _ : is_internal_node cfg r, @eq comparison (BDDcompare (var cfg r) x) Lt), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) intros cfg l r x H H0 H1 H2 H3. cut (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt). cut (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt). (* Goal: forall (_ : forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt) (_ : forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros H4 H5. cut (node_OK (fst cfg) l). cut (node_OK (fst cfg) r). intros H6 H7. cut (BDDconfig_OK (fst (BDDmake cfg x l r)) /\ (Neqb l r = false -> MapGet _ (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r)) = Some (x, (l, r))) /\ (Neqb l r = true -> snd (BDDmake cfg x l r) = l) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')) -> MapGet _ (fst cfg) a = Some (x', (l', r')) \/ snd (BDDmake cfg x l r) = a) /\ (MapGet _ (fst cfg) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDmake cfg x l r))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDmake cfg x l r))) (snd (BDDmake cfg x l r))). (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros H8. elim H8; clear H8; intros. elim H9; clear H9; intros. elim H10; clear H10; intros. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) elim H11; clear H11; intros. elim (sumbool_of_bool (Neqb l r)). intro y. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: forall _ : @eq bool (N.eqb l r) false, bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) rewrite (H10 y). apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg l). (* Goal: @eq comparison (BDDcompare y z) Lt *) apply bool_fun_preservation. assumption. assumption. intros x0 l0 r0 a H13. exact (proj2 (H11 a l0 r0 x0) H13). (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. cut (l = r). intro H13. rewrite <- H13. unfold bool_fun_if in |- *. unfold bool_fun_eq in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) unfold bool_fun_eval in |- *. intro vb. elim (vb x). simpl in |- *. reflexivity. simpl in |- *. reflexivity. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply Neqb_complete. assumption. intro y. cut (is_internal_node (fst (BDDmake cfg x l r)) (snd (BDDmake cfg x l r))). (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intro H13. rewrite (proj2 (proj2 (bool_fun_of_BDD_semantics (fst (BDDmake cfg x l r)) H8)) (snd (BDDmake cfg x l r)) H13). (* Goal: @eq bool (if vb (var (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) then bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (high (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb else bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (low (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) vb) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l) vb) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold bool_fun_eq in |- *. intro vb. unfold bool_fun_eval in |- *. unfold var in |- *. rewrite (H9 y). (* Goal: @eq bool (if vb x then bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)) with | Some (pair x (pair l r as p0) as p) => r | None => N0 end vb else bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)) with | Some (pair x (pair l r as p0) as p) => l | None => N0 end vb) (if vb x then bool_fun_of_BDD cfg r vb else bool_fun_of_BDD cfg l vb) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) unfold bool_fun_if in |- *. unfold ifb in |- *. unfold high, low in |- *. rewrite (H9 y). cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDmake cfg x l r)) r) (bool_fun_of_BDD cfg r)). cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDmake cfg x l r)) l) (bool_fun_of_BDD cfg l)). (* Goal: forall (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) l) (bool_fun_of_BDD cfg l)) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) r) (bool_fun_of_BDD cfg r)), @eq bool (if vb x then bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) r vb else bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) l vb) (if vb x then bool_fun_of_BDD cfg r vb else bool_fun_of_BDD cfg l vb) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) l) (bool_fun_of_BDD cfg l) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) r) (bool_fun_of_BDD cfg r) *) (* Goal: is_internal_node (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros H14 H15. unfold bool_fun_eq in H14, H15. unfold bool_fun_eval in H14, H15. rewrite (H14 vb). (* Goal: @eq comparison (BDDcompare y z) Lt *) rewrite (H15 vb). reflexivity. apply bool_fun_preservation. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. intros x0 l0 r0 a H14. exact (proj2 (H11 a l0 r0 x0) H14). assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply bool_fun_preservation. assumption. intros. assumption. intros x0 l0 r0 a H14. (* Goal: @eq comparison (BDDcompare y z) Lt *) exact (proj2 (H11 a l0 r0 x0) H14). assumption. split with x. split with l. (* Goal: @eq comparison (BDDcompare y z) Lt *) split with r. apply H9. assumption. apply BDDmake_semantics. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) intros xr lr rr H4. intros. unfold is_internal_node in H3. unfold var in H3. rewrite H4 in H3. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) apply H3. split with xr. split with lr. split with rr. reflexivity. intros xl ll rl H4. (* Goal: @eq comparison (BDDcompare xl x) Lt *) unfold is_internal_node in H2. unfold var in H2. rewrite H4 in H2. apply H2. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) split with xl. split with ll. split with rl. reflexivity. Qed. Lemma bool_fun_or_commute : forall bf bf' : bool_fun, bool_fun_eq (bool_fun_or bf bf') (bool_fun_or bf' bf). Proof. (* Goal: forall bf bf' : bool_fun, bool_fun_eq (bool_fun_or bf bf') (bool_fun_or bf' bf) *) unfold bool_fun_eq, bool_fun_or in |- *. unfold bool_fun_eval, bool_fun_or in |- *. intros bf bf' vb. (* Goal: @eq bool (orb (bf vb) (bf' vb)) (orb (bf' vb) (bf vb)) *) apply orb_comm. Qed. Lemma bool_fun_or_zero : forall bf : bool_fun, bool_fun_eq (bool_fun_or bf bool_fun_zero) bf. Proof. (* Goal: forall (bf : bool_fun) (vb : var_binding), @eq bool (bool_fun_eval (bool_fun_or bf (fun _ : var_binding => false)) vb) (bool_fun_eval bf vb) *) unfold bool_fun_eq, bool_fun_zero in |- *. unfold bool_fun_or in |- *. unfold bool_fun_eval in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) intros bf vb. elim (bf vb). simpl in |- *. reflexivity. simpl in |- *. reflexivity. Qed. Lemma bool_fun_or_one : forall bf : bool_fun, bool_fun_eq (bool_fun_or bf bool_fun_one) bool_fun_one. Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => if vb0 (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb0 else bool_fun_of_BDD cfg (low cfg node) vb0) vb) (bool_fun_eval (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) vb) *) unfold bool_fun_eq, bool_fun_or, bool_fun_one in |- *. unfold bool_fun_eval in |- *. intros bf vb. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) elim (bf vb). simpl in |- *. reflexivity. simpl in |- *. reflexivity. Qed. Lemma bool_fun_if_lemma_1 : forall (x : BDDvar) (bfl1 bfl2 bfr1 bfr2 : bool_fun), bool_fun_eq (bool_fun_if x (bool_fun_or bfr1 bfr2) (bool_fun_or bfl1 bfl2)) (bool_fun_or (bool_fun_if x bfr1 bfl1) (bool_fun_if x bfr2 bfl2)). Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => if vb0 (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb0 else bool_fun_of_BDD cfg (low cfg node) vb0) vb) (bool_fun_eval (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) vb) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. unfold bool_fun_eval in |- *. intros x bfl1 bfl2 bfr1 bfr2 vb. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) elim (vb x); simpl in |- *. reflexivity. reflexivity. Qed. Lemma bool_fun_if_lemma_3 : forall (x : BDDvar) (bf1 bfl2 bfr2 : bool_fun), bool_fun_eq (bool_fun_if x (bool_fun_or bf1 bfr2) (bool_fun_or bf1 bfl2)) (bool_fun_or bf1 (bool_fun_if x bfr2 bfl2)). Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => if vb0 (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb0 else bool_fun_of_BDD cfg (low cfg node) vb0) vb) (bool_fun_eval (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) vb) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. unfold bool_fun_eval in |- *. intros x bf1 bfl2 bfr2 vb. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) elim (vb x); simpl in |- *. reflexivity. reflexivity. Qed. Lemma bool_fun_if_lemma_4 : forall (x : BDDvar) (bfl1 bfr1 bf2 : bool_fun), bool_fun_eq (bool_fun_if x (bool_fun_or bfr1 bf2) (bool_fun_or bfl1 bf2)) (bool_fun_or (bool_fun_if x bfr1 bfl1) bf2). Proof. (* Goal: forall vb : var_binding, @eq bool (bool_fun_eval (fun vb0 : var_binding => if vb0 (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb0 else bool_fun_of_BDD cfg (low cfg node) vb0) vb) (bool_fun_eval (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) vb) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. unfold bool_fun_eval in |- *. intros x bfl1 bfr1 bf2 vb. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) elim (vb x); simpl in |- *. reflexivity. reflexivity. Qed. Lemma bool_fun_if_lemma_2 : forall (cfg : BDDconfig) (node : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))). Proof. (* Goal: forall (cfg : BDDconfig) (node : ad) (_ : BDDconfig_OK cfg) (_ : is_internal_node cfg node), bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) *) intros cfg node H H0. rewrite (proj2 (proj2 (bool_fun_of_BDD_semantics cfg H)) node H0). (* Goal: bool_fun_eq (fun vb : var_binding => if vb (var cfg node) then bool_fun_of_BDD cfg (high cfg node) vb else bool_fun_of_BDD cfg (low cfg node) vb) (bool_fun_if (var cfg node) (bool_fun_of_BDD cfg (high cfg node)) (bool_fun_of_BDD cfg (low cfg node))) *) unfold bool_fun_eq in |- *. unfold bool_fun_eval in |- *. unfold bool_fun_if in |- *. unfold ifb in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. Qed. (* Lemma BDD_EGAL_complete : (x,y:BDDvar) (BDDcompare x y)=EGAL -> x=y. Proof. Double Induction 1 2. Reflexivity. Simpl. (Intros; Discriminate). Simpl. (Intros; Discriminate). Simpl. Intros. Cut p0=p. Intro. (Rewrite H0; Reflexivity). Apply compare_convert_EGAL. Assumption. Qed. *) Lemma BDD_EGAL_correct : forall x y : BDDvar, BDDcompare x x = Datatypes.Eq. Proof. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) simple induction x. reflexivity. simpl in |- *. intros x0 y. apply Pcompare_refl. Qed. Lemma BDD_EGALsymm : forall x y : BDDvar, BDDcompare x y = Datatypes.Eq -> BDDcompare y x = Datatypes.Eq. Proof. (* Goal: @eq comparison (BDDcompare y z) Lt *) intros x y H. cut (x = y). intros H0. rewrite H0. apply BDD_EGAL_correct. assumption. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply BDD_EGAL_complete. assumption. Qed. Lemma BDDcompare_le_INFERIEUR_1 : forall x y z : BDDvar, BDDvar_le x y = true -> BDDcompare y z = Datatypes.Lt -> BDDcompare x z = Datatypes.Lt. Proof. (* Goal: @eq comparison (BDDcompare x z) Lt *) intros x y z H H0. apply BDDlt_compare. apply le_lt_trans with (m := nat_of_N y). unfold BDDvar_le in H. (* Goal: @eq comparison (BDDcompare y z) Lt *) unfold Nleb in H. apply leb_complete; assumption. apply BDDcompare_lt. (* Goal: @eq comparison (BDDcompare y z) Lt *) assumption. Qed. Definition BDDor_memo := Map (Map ad). Definition initBDDor_memo := newMap (Map ad). Definition BDDor_memo_put (memo : BDDor_memo) (node1 node2 node : ad) := let m1 := match MapGet _ memo node1 with | Some y => y | None => newMap ad end in let m1' := MapPut _ m1 node2 node in MapPut _ memo node1 m1'. Definition BDDor_memo_lookup (memo : BDDor_memo) (node1 node2 : ad) := match MapGet _ memo node1 with | None => None | Some m1 => match MapGet _ m1 node2 with | None => None | Some node => Some node end end. Definition BDDor_memo_OK (cfg : BDDconfig) (memo : BDDor_memo) := forall node1 node2 node : ad, BDDor_memo_lookup memo node1 node2 = Some node -> config_node_OK cfg node1 /\ config_node_OK cfg node2 /\ config_node_OK cfg node /\ BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Lemma BDDor_memo_lookup_semantics : forall (memo : BDDor_memo) (node1 node2 node node1' node2' : ad), BDDor_memo_lookup (BDDor_memo_put memo node1 node2 node) node1' node2' = (if Neqb node1 node1' && Neqb node2 node2' then Some node else BDDor_memo_lookup memo node1' node2'). Proof. (* Goal: forall (memo : BDDor_memo) (node1 node2 node node1' node2' : ad), @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 node2 node) node1' node2') (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else BDDor_memo_lookup memo node1' node2') *) intros memo node1 node2 node node1' node2'. unfold BDDor_memo_lookup, BDDor_memo_put in |- *. rewrite (MapPut_semantics (Map ad) memo node1 (MapPut ad match MapGet (Map ad) memo node1 with | None => newMap ad | Some y => y end node2 node) node1'). (* Goal: forall _ : @eq bool (N.eqb l r) false, bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake cfg x l r)) (@snd BDDconfig ad (BDDmake cfg x l r))) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake cfg x l r))) (and (forall _ : @eq bool (N.eqb l r) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : @eq bool (N.eqb l r) true, @eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) l) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake cfg x l r)) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake cfg x l r))) (@snd BDDconfig ad (BDDmake cfg x l r)))))) *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) r *) (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map ad) cfg) l *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) l) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) elim (sumbool_of_bool (Neqb node1 node1')); intro y. rewrite y. rewrite (MapPut_semantics ad match MapGet (Map ad) memo node1 with | None => newMap ad | Some y => y end node2 node node2'). (* Goal: forall _ : @eq bool (N.eqb node2 node2') false, @eq (option ad) match (if N.eqb node2 node2' then @Some ad node else MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2') with | Some node => @Some ad node | None => @None ad end (if andb true (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) elim (sumbool_of_bool (Neqb node2 node2')). intro y0. rewrite y0. simpl in |- *. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) reflexivity. intro y0. rewrite y0. simpl in |- *. elim (option_sum _ (MapGet (Map ad) memo node1)). (* Goal: forall _ : @eq (option (Map ad)) (MapGet (Map ad) memo node1) (@None (Map ad)), @eq (option ad) match MapGet ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2' with | Some node => @Some ad node | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) (* Goal: @eq (option ad) match (if N.eqb node1 node1' then @Some (Map ad) (MapPut ad match MapGet (Map ad) memo node1 with | Some y => y | None => newMap ad end node2 node) else MapGet (Map ad) memo node1') with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad node else match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end) *) intro y1. inversion y1. rewrite H. cut (node1 = node1'). intro H0. rewrite <- H0. (* Goal: @eq comparison (BDDcompare y z) Lt *) rewrite H. reflexivity. apply Neqb_complete; assumption. intro y1. rewrite y1. (* Goal: @eq (option ad) match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end match MapGet (Map ad) memo node1' with | Some m1 => match MapGet ad m1 node2' with | Some node => @Some ad node | None => @None ad end | None => @None ad end *) cut (node1 = node1'). intro H. rewrite <- H. rewrite y1. simpl in |- *. reflexivity. (* Goal: @eq comparison (BDDcompare y z) Lt *) apply Neqb_complete; assumption. rewrite y. simpl in |- *. reflexivity. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Require Import BDDdummy_lemma_2. Require Import BDDdummy_lemma_3. Require Import BDDdummy_lemma_4. Lemma BDDor_1_lemma : forall (bound : nat) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound) -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) m), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)))))))) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) n), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro bound. apply lt_wf_ind with (P := fun bound : nat => forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound) -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))). (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) m), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)))))))) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) n), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) clear bound. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : lt m n) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) m), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)))))))) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) n), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 n)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro bound. (* Goal: forall (_ : forall (m : nat) (_ : lt m bound) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) m), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)))))))) (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro H. (* Goal: forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo) (_ : BDDconfig_OK cfg) (_ : BDDor_memo_OK cfg memo) (_ : config_node_OK cfg node1) (_ : config_node_OK cfg node2) (_ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros cfg node1 node2 memo H0 H1 H2 H3 H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim (option_sum _ (BDDor_memo_lookup memo node1 node2)); intro y. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim y; clear y. (* Goal: forall (x : ad) (_ : @eq (option ad) (BDDor_memo_lookup memo node1 node2) (@Some ad x)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros node H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (BDDor_1_lemma_1 cfg memo node1 node2 node bound H5). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) simpl in |- *. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in H1. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node *) (* Goal: and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (H1 node1 node2 node H5)))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: nodes_preserved cfg cfg *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold nodes_preserved in |- *. (* Goal: forall (x : BDDvar) (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros x l r node0 H6. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (proj2 (H1 node1 node2 node H5))))). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (proj2 (proj2 (proj2 (H1 node1 node2 node H5))))). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim H2; intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)))) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDzero node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (BDDor_1_lemma_zero_2 cfg memo node2 bound). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) simpl in |- *. cut (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)), and (BDDconfig_OK cfg) (and (BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone)) (and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro H6. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node2 node3 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node2 node3) (@Some ad node)), and (config_node_OK cfg node2) (and (config_node_OK cfg node3) (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node2) (var cfg node3))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node3)))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros node1' node2' node. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node1' node2') (@Some ad node), and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros H7. rewrite (BDDor_memo_lookup_semantics memo BDDzero node2 node2 node1' node2') in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim (sumbool_of_bool (Neqb BDDzero node1' && Neqb node2 node2')); intro y0. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (BDDzero = node1'). (* Goal: forall _ : @eq N BDDone node1', and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (node2 = node2'). (* Goal: forall (_ : is_internal_node cfg node1) (_ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node1 *) intros H8 H9. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H8; assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7. (* Goal: forall _ : lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_2. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7; injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node2 node2') true *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (andb_prop (Neqb BDDzero node1') (Neqb node2 node2') y0)). (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb BDDzero node1') true *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (andb_prop (Neqb BDDzero node1') (Neqb node2 node2') y0)). (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in H1. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node1' *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (H1 node1' node2' node H7)). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node2' *) (* Goal: and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (H1 node1' node2' node H7))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (H1 node1' node2' node H7)))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: nodes_preserved cfg cfg *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold nodes_preserved in |- *; intro. (* Goal: forall (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros l r node H7. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_2. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (proj1 (bool_fun_of_BDD_semantics cfg H0)). (* Goal: bool_fun_eq bool_fun_one (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_eq_symm. apply bool_fun_eq_trans with (bool_fun_or (bool_fun_of_BDD cfg node2) bool_fun_zero). (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node2) bool_fun_one) (bool_fun_or bool_fun_one (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_commute. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_zero) (bool_fun_of_BDD cfg node1) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_zero. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H5; assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim H5; clear H5; intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)))) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo BDDone node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (BDDor_1_lemma_one_2 cfg memo node2 bound). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) simpl in |- *. cut (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)), and (BDDconfig_OK cfg) (and (BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone)) (and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro H6. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node2 node3 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node2 node3) (@Some ad node)), and (config_node_OK cfg node2) (and (config_node_OK cfg node3) (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node2) (var cfg node3))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node3)))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros node1' node2' node. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node1' node2') (@Some ad node), and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros H7. rewrite (BDDor_memo_lookup_semantics memo BDDone node2 BDDone node1' node2') in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim (sumbool_of_bool (Neqb BDDone node1' && Neqb node2 node2')); intro y0. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (BDDone = node1'). (* Goal: forall _ : @eq N BDDone node1', and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (node2 = node2'). (* Goal: forall (_ : is_internal_node cfg node1) (_ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node1 *) intros H8 H9. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H8; assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7. (* Goal: forall _ : lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1') (var cfg node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold var at 1 in |- *. (* Goal: @eq bool (BDDvar_le match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) BDDone with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end (BDDvar_max (var cfg node1') (var cfg node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (config_OK_one cfg H0). (* Goal: @eq bool (BDDvar_le BDDzero (BDDvar_max (var cfg node1') (var cfg node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDzero in |- *. (* Goal: @eq bool (BDDvar_le N0 (BDDvar_max (var cfg node1') (var cfg node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_z. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7; injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node2 node2') true *) (* Goal: @eq N BDDone node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (andb_prop (Neqb BDDone node1') (Neqb node2 node2') y0)). (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb BDDone node1') true *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg BDDone) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (andb_prop (Neqb BDDone node1') (Neqb node2 node2') y0)). (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in H1. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node1' *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (H1 node1' node2' node H7)). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node2' *) (* Goal: and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (H1 node1' node2' node H7))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (H1 node1' node2' node H7)))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: nodes_preserved cfg cfg *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold nodes_preserved in |- *; intro. (* Goal: forall (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros l r node H7. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_1. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H0))). apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node2) bool_fun_one). (* Goal: bool_fun_eq bool_fun_one (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) bool_fun_one *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_one. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node2) bool_fun_one) (bool_fun_or bool_fun_one (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDone node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_commute. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H5; assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim H3; intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)))) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDzero bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (BDDor_1_lemma_zero_1 cfg memo node1 bound). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) simpl in |- *. cut (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))). (* Goal: forall _ : is_internal_node cfg node2, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H7. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node2 node3 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node2 node3) (@Some ad node)), and (config_node_OK cfg node2) (and (config_node_OK cfg node3) (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node2) (var cfg node3))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node3)))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros node1' node2' node. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDzero node1) node1' node2') (@Some ad node), and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros H8. rewrite (BDDor_memo_lookup_semantics memo node1 BDDzero node1 node1' node2') in H8. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim (sumbool_of_bool (Neqb node1 node1' && Neqb BDDzero node2')); intro y0. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (node1 = node1'). (* Goal: forall _ : @eq ad node1 node1', and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (BDDzero = node2'). (* Goal: forall (_ : @eq N BDDzero node2') (_ : @eq ad node1 node1'), and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros H9 H10. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H10; assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H8. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H8; intro. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H11; assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H8. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H8; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H11. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_1. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H8; injection H8; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq N BDDzero node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H11. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb BDDzero node2') true *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (andb_prop (Neqb node1 node1') (Neqb BDDzero node2') y0)). (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node1 node1') true *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (andb_prop (Neqb node1 node1') (Neqb BDDzero node2') y0)). (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H8. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in H1. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node1' *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (H1 node1' node2' node H8)). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node2' *) (* Goal: and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (H1 node1' node2' node H8))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (H1 node1' node2' node H8)))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (proj2 (H1 node1' node2' node H8))))). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg node1) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (proj2 (proj2 (proj2 (H1 node1' node2' node H8))))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: nodes_preserved cfg cfg *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold nodes_preserved in |- *; intro. (* Goal: forall (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (@eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true) (bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros l r node H8. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg BDDzero))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_1. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (proj1 (bool_fun_of_BDD_semantics cfg H0)). (* Goal: bool_fun_eq bool_fun_one (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_zero) (bool_fun_of_BDD cfg node1) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDzero) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_zero. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H6; assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim H6. (* Goal: forall _ : @eq ad node2 BDDone, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) clear H5 H6. (* Goal: forall _ : @eq ad node2 BDDone, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 BDDone bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (BDDor_1_lemma_one_1 cfg memo node1 bound). (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone))))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) simpl in |- *. cut (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)), and (BDDconfig_OK cfg) (and (BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone)) (and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intro H6. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: BDDor_memo_OK cfg (BDDor_memo_put memo node1 BDDone BDDone) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node2 node3 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node2 node3) (@Some ad node)), and (config_node_OK cfg node2) (and (config_node_OK cfg node3) (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node2) (var cfg node3))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node3)))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros node1' node2' node. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup (BDDor_memo_put memo node1 BDDone BDDone) node1' node2') (@Some ad node), and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros H7. rewrite (BDDor_memo_lookup_semantics memo node1 BDDone BDDone node1' node2') in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) elim (sumbool_of_bool (Neqb node1 node1' && Neqb BDDone node2')); intro y0. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (node1 = node1'). (* Goal: forall _ : @eq ad node1 node1', and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (BDDone = node2'). (* Goal: forall (_ : is_internal_node cfg node1) (_ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node1 *) intros H8 H9. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H9; assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8; right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7. (* Goal: forall _ : lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_2. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7; injection H7; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H10. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H9. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2')) *) (* Goal: @eq N BDDone node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite <- H8. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb BDDone node2') true *) (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (andb_prop (Neqb node1 node1') (Neqb BDDone node2') y0)). (* Goal: @eq ad node1 node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node1 node1') true *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (andb_prop (Neqb node1 node1') (Neqb BDDone node2') y0)). (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite y0 in H7. (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold BDDor_memo_OK in H1. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node1' *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (H1 node1' node2' node H7)). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node2' *) (* Goal: and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (H1 node1' node2' node H7))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg node *) (* Goal: and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (H1 node1' node2' node H7)))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj1 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')) *) (* Goal: and (config_node_OK cfg BDDone) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) exact (proj2 (proj2 (proj2 (proj2 (H1 node1' node2' node H7))))). (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: config_node_OK cfg BDDzero *) (* Goal: and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq N BDDzero node1' *) (* Goal: and (config_node_OK cfg node1') (and (config_node_OK cfg node2') (and (config_node_OK cfg node) (and (@eq bool (BDDvar_le (var cfg node) (BDDvar_max (var cfg node1') (var cfg node2'))) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_or (bool_fun_of_BDD cfg node1') (bool_fun_of_BDD cfg node2')))))) *) (* Goal: and (config_node_OK cfg node2) (and (nodes_preserved cfg cfg) (and (@eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg BDDzero) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_or (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo BDDzero node2) (@None ad) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) right; left; reflexivity. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: nodes_preserved cfg cfg *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) unfold nodes_preserved in |- *; intro. (* Goal: forall (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) intros l r node H7. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (@eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true) (bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) split. (* Goal: @eq bool (BDDvar_le (var cfg BDDone) (BDDvar_max (var cfg node1) (var cfg BDDone))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply BDDvar_le_max_2. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg BDDone)) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics cfg H0))). (* Goal: bool_fun_eq bool_fun_one (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) bool_fun_one) bool_fun_one *) (* Goal: @eq (option ad) (BDDor_memo_lookup memo node1 BDDone) (@None ad) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) apply bool_fun_or_one. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) rewrite <- H5; assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (is_internal_node cfg node1). (* Goal: forall (_ : is_internal_node cfg node1) (_ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node2 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node1 *) intros H8 H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node1 *) cut (is_internal_node cfg node2). (* Goal: forall _ : is_internal_node cfg node2, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H7. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) elim (nat_sum bound). (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) elim y0; clear y0. (* Goal: forall (x : nat) (_ : @eq nat bound (S x)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro bound'. (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) cut (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound). (* Goal: forall _ : lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro H10. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) elim (relation_sum (BDDcompare (var cfg node1) (var cfg node2))); intro y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) elim y1; clear y1; intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply BDDdummy_lemma_2 with (bound' := bound'). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply BDDdummy_lemma_3 with (bound' := bound'). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) cut (BDDcompare (var cfg node2) (var cfg node1) = Datatypes.Lt). (* Goal: forall _ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro y11. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply BDDdummy_lemma_4 with (bound' := bound'). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply BDDcompare_sup_inf. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) O *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply H4. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: forall _ : @eq nat bound O, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) rewrite y0 in H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) absurd (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < 0). (* Goal: not (lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) O) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) O *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply lt_n_O. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) O *) (* Goal: is_internal_node cfg node2 *) (* Goal: is_internal_node cfg node1 *) apply H4. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: is_internal_node cfg node1 *) apply in_dom_is_internal. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. (* Goal: is_internal_node cfg node1 *) apply in_dom_is_internal. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node1 (@fst BDDstate (prod BDDsharing_map ad) cfg)) true *) assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Require Import BDDdummy_lemma_2. Require Import BDDdummy_lemma_3. Require Import BDDdummy_lemma_4. Require Import bdd8. Inductive BDDdummy_type1 : Set := BDDdummy1 : BDDconfig * ad * BDDneg_memo -> BDDdummy_type1. Inductive BDDdummy_type2 : Set := BDDdummy2 : BDDconfig * ad -> BDDdummy_type2. Inductive BDDdummy_type3 : Set := BDDdummy3 : BDDconfig * (ad * BDDor_memo) -> BDDdummy_type3. Definition initBDDneg_memo : BDDneg_memo := newMap ad. Fixpoint BDDneg_1_1 (cfg : BDDconfig) (memo : BDDneg_memo) (node : ad) (bound : nat) {struct bound} : BDDconfig * ad * BDDneg_memo := match BDDneg_memo_lookup memo node with | Some node' => (cfg, node', memo) | None => match MapGet _ (fst cfg) node with | None => if Neqb node BDDzero then (cfg, BDDone, BDDneg_memo_put memo BDDzero BDDone) else (cfg, BDDzero, BDDneg_memo_put memo BDDone BDDzero) | Some (x, (l, r)) => match bound with | O => (initBDDconfig, BDDzero, initBDDneg_memo) | S bound' => match BDDdummy1 (BDDneg_1_1 cfg memo l bound') with | BDDdummy1 ((cfgl, nodel), memol) => match BDDdummy1 (BDDneg_1_1 cfgl memol r bound') with | BDDdummy1 ((cfgr, noder), memor) => match BDDdummy2 (BDDmake cfgr x nodel noder) with | BDDdummy2 (cfg', node') => (cfg', node', BDDneg_memo_put memor node node') end end end end end end. Lemma BDDneg_1_1_eq_1 : forall (bound : nat) (cfg : BDDconfig) (memo : BDDneg_memo) (node : ad), BDDneg_1_1 cfg memo node bound = BDDneg_1 (cfg, node, memo) bound. Proof. (* Goal: forall (bound : nat) (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo node1 node2 bound) (BDDor_1 cfg memo node1 node2 bound) *) simple induction bound. intros cfg memo node. simpl in |- *. reflexivity. simpl in |- *. intros n H cfg memo node. elim (MapGet (BDDvar * (ad * ad)) (fst cfg) node). Focus 2. (* Goal: @eq (prod A B) (@pair A B y y0) (@pair A B y y0) *) reflexivity. intro a. elim a. intros y y0. elim y0. intros y1 y2. cut (BDDneg_1_1 cfg memo y1 n = BDDneg_1 (cfg, y1, memo) n). (* Goal: forall _ : @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else let (cfgl, p) := BDDor_1_1 cfg memo (low cfg node1) node2 n in let (nodel, memol) := p in let (cfgr, p0) := BDDor_1_1 cfgl memol (high cfg node1) node2 n in let (noder, memor) := p0 in let (cfg', node') := BDDmake cfgr (var cfg node1) nodel noder in @pair BDDconfig (prod ad (Map (Map ad))) cfg' (@pair ad (Map (Map ad)) node' (BDDor_memo_put memor node1 node2 node')) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intro H0. rewrite H0. elim (BDDneg_1 (cfg, y1, memo) n). intros y3 y4. elim y3. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intros y5 y6. simpl in |- *. cut (BDDneg_1_1 y5 y4 y2 n = BDDneg_1 (y5, y2, y4) n). intro H1. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) rewrite H1. elim (BDDneg_1 (y5, y2, y4) n). intros y7 y8. simpl in |- *. elim y7. intros y9 y10. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) simpl in |- *. elim (BDDmake y9 y y6 y10). intros y11 y12. simpl in |- *. reflexivity. apply H. (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) apply H. Qed. Fixpoint BDDor_1_1 (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad) (bound : nat) {struct bound} : BDDconfig * (ad * BDDor_memo) := match BDDor_memo_lookup memo node1 node2 with | Some node => (cfg, (node, memo)) | None => if Neqb node1 BDDzero then (cfg, (node2, BDDor_memo_put memo BDDzero node2 node2)) else if Neqb node1 BDDone then (cfg, (BDDone, BDDor_memo_put memo BDDone node2 BDDone)) else if Neqb node2 BDDzero then (cfg, (node1, BDDor_memo_put memo node1 BDDzero node1)) else if Neqb node2 BDDone then (cfg, (BDDone, BDDor_memo_put memo node1 BDDone BDDone)) else match bound with | O => (initBDDconfig, (BDDzero, initBDDor_memo)) | S bound' => match BDDcompare (var cfg node1) (var cfg node2) with | Datatypes.Eq => match BDDdummy3 (BDDor_1_1 cfg memo (low cfg node1) (low cfg node2) bound') with | BDDdummy3 (cfgl, (nodel, memol)) => match BDDdummy3 (BDDor_1_1 cfgl memol (high cfg node1) (high cfg node2) bound') with | BDDdummy3 (cfgr, (noder, memor)) => match BDDdummy2 (BDDmake cfgr (var cfg node1) nodel noder) with | BDDdummy2 (cfg', node') => (cfg', (node', BDDor_memo_put memor node1 node2 node')) end end end | Datatypes.Lt => match BDDdummy3 (BDDor_1_1 cfg memo node1 (low cfg node2) bound') with | BDDdummy3 (cfgl, (nodel, memol)) => match BDDdummy3 (BDDor_1_1 cfgl memol node1 (high cfg node2) bound') with | BDDdummy3 (cfgr, (noder, memor)) => match BDDdummy2 (BDDmake cfgr (var cfg node2) nodel noder) with | BDDdummy2 (cfg', node') => (cfg', (node', BDDor_memo_put memor node1 node2 node')) end end end | Datatypes.Gt => match BDDdummy3 (BDDor_1_1 cfg memo (low cfg node1) node2 bound') with | BDDdummy3 (cfgl, (nodel, memol)) => match BDDdummy3 (BDDor_1_1 cfgl memol (high cfg node1) node2 bound') with | BDDdummy3 (cfgr, (noder, memor)) => match BDDdummy2 (BDDmake cfgr (var cfg node1) nodel noder) with | BDDdummy2 (cfg', node') => (cfg', (node', BDDor_memo_put memor node1 node2 node')) end end end end end end. Lemma BDDor_1_1_eq_1 : forall (bound : nat) (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad), BDDor_1_1 cfg memo node1 node2 bound = BDDor_1 cfg memo node1 node2 bound. Proof. (* Goal: forall (bound : nat) (cfg : BDDconfig) (memo : BDDor_memo) (node1 node2 : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo node1 node2 bound) (BDDor_1 cfg memo node1 node2 bound) *) simple induction bound. simpl in |- *. reflexivity. intros n H cfg memo node1 node2. simpl in |- *. elim (BDDcompare (var cfg node1) (var cfg node2)). cut (BDDor_1_1 cfg memo (low cfg node1) (low cfg node2) n = BDDor_1 cfg memo (low cfg node1) (low cfg node2) n). (* Goal: forall _ : @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else let (cfgl, p) := BDDor_1_1 cfg memo (low cfg node1) node2 n in let (nodel, memol) := p in let (cfgr, p0) := BDDor_1_1 cfgl memol (high cfg node1) node2 n in let (noder, memor) := p0 in let (cfg', node') := BDDmake cfgr (var cfg node1) nodel noder in @pair BDDconfig (prod ad (Map (Map ad))) cfg' (@pair ad (Map (Map ad)) node' (BDDor_memo_put memor node1 node2 node')) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n)) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 n))) (high cfg node1) node2 n))))))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intro H0. rewrite H0. elim (BDDor_1 cfg memo (low cfg node1) (low cfg node2) n). (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intros y y0. elim y0; intros y1 y2. simpl in |- *. cut (BDDor_1_1 y y2 (high cfg node1) (high cfg node2) n = BDDor_1 y y2 (high cfg node1) (high cfg node2) n). (* Goal: forall _ : @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else let (cfgr, p) := BDDor_1_1 y y2 (high cfg node1) node2 n in let (noder, memor) := p in let (cfg', node') := BDDmake cfgr (var cfg node1) y1 noder in @pair BDDconfig (prod ad (Map (Map ad))) cfg' (@pair ad (Map (Map ad)) node' (BDDor_memo_put memor node1 node2 node')) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 y y2 (high cfg node1) node2 n))))))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intro H1. rewrite H1. elim (BDDor_1 y y2 (high cfg node1) (high cfg node2) n). (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intros y3 y4. elim y4; intros y5 y6. simpl in |- *. elim (BDDmake y3 (var cfg node1) y1 y5). (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) simpl in |- *. reflexivity. apply H. apply H. cut (BDDor_1_1 cfg memo node1 (low cfg node2) n = BDDor_1 cfg memo node1 (low cfg node2) n). (* Goal: forall (a : A) (b : B), @ex A (fun a0 : A => @ex B (fun b0 : B => @eq (prod A B) (@pair A B a b) (@pair A B a0 b0))) *) intro H0. rewrite H0. elim (BDDor_1 cfg memo node1 (low cfg node2) n). intros y y0. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) elim y0; intros y1 y2. simpl in |- *. cut (BDDor_1_1 y y2 node1 (high cfg node2) n = BDDor_1 y y2 node1 (high cfg node2) n). (* Goal: forall (a : BDDconfig) (b : prod ad BDDor_memo), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else let (noder, memor) := b in let (cfg', node') := BDDmake a (var cfg node1) y1 noder in @pair BDDconfig (prod ad (Map (Map ad))) cfg' (@pair ad (Map (Map ad)) node' (BDDor_memo_put memor node1 node2 node')) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intro H1. rewrite H1. elim (BDDor_1 y y2 node1 (high cfg node2) n). intros y3 y4. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) elim y4; intros y5 y6. simpl in |- *. elim (BDDmake y3 (var cfg node2) y1 y5). simpl in |- *. (* Goal: @eq (prod A B) (@pair A B y y0) (@pair A B y y0) *) reflexivity. apply H. apply H. cut (BDDor_1_1 cfg memo (low cfg node1) node2 n = BDDor_1 cfg memo (low cfg node1) node2 n). (* Goal: forall (a : A) (b : B), @ex A (fun a0 : A => @ex B (fun b0 : B => @eq (prod A B) (@pair A B a b) (@pair A B a0 b0))) *) intro H0. rewrite H0. elim (BDDor_1 cfg memo (low cfg node1) node2 n). intros y y0. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) elim y0; intros y1 y2. simpl in |- *. cut (BDDor_1_1 y y2 (high cfg node1) node2 n = BDDor_1 y y2 (high cfg node1) node2 n). (* Goal: forall (a : BDDconfig) (b : prod ad BDDor_memo), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else let (noder, memor) := b in let (cfg', node') := BDDmake a (var cfg node1) y1 noder in @pair BDDconfig (prod ad (Map (Map ad))) cfg' (@pair ad (Map (Map ad)) node' (BDDor_memo_put memor node1 node2 node')) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b)) (var cfg node1) y1 (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad BDDor_memo) a b))))))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) intro H1. rewrite H1. elim (BDDor_1 y y2 (high cfg node1) node2 n). intros y3 y4. (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) elim y4; intros y5 y6. simpl in |- *. simpl in |- *. elim (BDDmake y3 (var cfg node1) y1 y5). (* Goal: forall (a : BDDconfig) (b : ad), @eq (prod BDDconfig (prod ad BDDor_memo)) match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) a (@pair ad (Map (Map ad)) b (BDDor_memo_put y6 node1 node2 b)) end match BDDor_memo_lookup memo node1 node2 with | Some node => @pair BDDconfig (prod ad BDDor_memo) cfg (@pair ad BDDor_memo node memo) | None => if N.eqb node1 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node2 (BDDor_memo_put memo BDDzero node2 node2)) else if N.eqb node1 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo BDDone node2 BDDone)) else if N.eqb node2 BDDzero then @pair BDDconfig (prod ad (Map (Map ad))) cfg (@pair ad (Map (Map ad)) node1 (BDDor_memo_put memo node1 BDDzero node1)) else if N.eqb node2 BDDone then @pair BDDconfig (prod N (Map (Map ad))) cfg (@pair N (Map (Map ad)) BDDone (BDDor_memo_put memo node1 BDDone BDDone)) else @pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (@pair BDDconfig ad a b)) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (@pair BDDconfig ad a b)) (BDDor_memo_put y6 node1 node2 (@snd BDDconfig ad (@pair BDDconfig ad a b)))) end *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 y y2 (high cfg node1) node2 n) (BDDor_1 y y2 (high cfg node1) node2 n) *) (* Goal: @eq (prod BDDconfig (prod ad BDDor_memo)) (BDDor_1_1 cfg memo (low cfg node1) node2 n) (BDDor_1 cfg memo (low cfg node1) node2 n) *) simpl in |- *. reflexivity. apply H. apply H. Qed. Lemma prod_sum : forall (A B : Set) (p : A * B), exists a : A, (exists b : B, p = (a, b)). Proof. (* Goal: @eq (prod A B) (@pair A B y y0) (@pair A B y y0) *) intros A B p. elim p. intros y y0. split with y. split with y0. reflexivity. Qed. (* Fixpoint BDDor_1_1 [cfg:BDDconfig; memo:BDDor_memo; node1,node2:ad; bound:nat] : BDDconfig*ad*BDDor_memo := Cases (BDDor_memo_lookup memo node1 node2) of (Some node) => (cfg,(node,memo)) | (None) => Cases (MapGet ? (Fst cfg) node1) of (None) => if (Neqb node1 BDDzero) then (cfg,(node2,(BDDor_memo_put memo BDDzero node2 node2))) else (cfg,(BDDone,(BDDor_memo_put memo BDDone node2 BDDone))) | (Some (x1,(l1,r1))) => Cases (MapGet ? (Fst cfg) node2) of (None) => if (Neqb node2 BDDzero) then (cfg,(node1,(BDDor_memo_put memo node1 BDDzero node1))) else (cfg,(BDDone,(BDDor_memo_put memo node1 BDDone BDDone))) | (Some (x2,(l2,r2))) => Cases bound of O => (initBDDconfig,(BDDzero,initBDDor_memo)) | (S bound') => Cases (BDDcompare x1 x2) of EGAL => Cases (BDDor_1_1 cfg memo l1 l2 bound') of (cfgl,(nodel,memol)) => Cases (BDDor_1_1 cfgl memol r1 r2 bound') of (cfgr,(noder,memor)) => Cases (BDDmake cfgr x1 nodel noder) of (cfg',node') => (cfg',(node',(BDDor_memo_put memor node1 node2 node'))) end end end | INFERIEUR => Cases (BDDor_1_1 cfg memo node1 l2 bound') of (cfgl,(nodel,memol)) => Cases (BDDor_1_1 cfgl memol node1 r2 bound') of (cfgr,(noder,memor)) => Cases (BDDmake cfgr x2 nodel noder) of (cfg',node') => (cfg',(node',(BDDor_memo_put memor node1 node2 node'))) end end end | SUPERIEUR => Cases (BDDor_1_1 cfg memo l1 node2 bound') of (cfgl,(nodel,memol)) => Cases (BDDor_1_1 cfgl memol r1 node2 bound') of (cfgr,(noder,memor)) => Cases (BDDmake cfgr x2 nodel noder) of (cfg',node') => (cfg',(node',(BDDor_memo_put memor node1 node2 node'))) end end end end end end end end. Lemma BDDor_1_1_eq_1 : (bound:nat; cfg:BDDconfig; memo:BDDor_memo; node1,node2:ad) (BDDconfig_OK cfg) -> (BDDor_memo_OK cfg memo) -> (config_node_OK cfg node1) -> (config_node_OK cfg node2) -> ((is_internal_node cfg node1) -> (is_internal_node cfg node2) -> (lt (max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))) bound)) -> (BDDor_1_1 cfg memo node1 node2 bound)=(BDDor_1 cfg memo node1 node2 bound). Proof. Qed. *)
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Require Import BDDdummy_lemma_2. Require Import BDDdummy_lemma_3. Require Import BDDdummy_lemma_4. Require Import bdd8. Require Import bdd9. Require Import bdd10. Require Import bdd11. Definition is_tauto (be : bool_expr) := Neqb BDDone (fst (snd (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))). Definition is_valid (be : bool_expr) := forall vb : var_binding, bool_fun_of_bool_expr be vb = true. Lemma initBDDor_memo_OK : BDDor_memo_OK initBDDconfig initBDDor_memo. Proof. (* Goal: BDDor_memo_OK initBDDconfig initBDDor_memo *) unfold BDDor_memo_OK in |- *. intros. discriminate H. Qed. Lemma initBDDneg_memo_OK : BDDneg_memo_OK initBDDconfig initBDDneg_memo. Proof. (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) unfold BDDneg_memo_OK in |- *. intros. discriminate H. Qed. Lemma initBDDneg_memo_OK_2 : BDDneg_memo_OK_2 initBDDconfig initBDDneg_memo. Proof. (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) unfold BDDneg_memo_OK_2 in |- *. intros. discriminate H. Qed. Lemma is_tauto_is_correct : forall be : bool_expr, is_tauto be = true -> is_valid be. Proof. (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) unfold is_tauto, is_valid in |- *. intros. elim (BDDof_bool_expr_correct be initBDDconfig initBDDneg_memo initBDDor_memo initBDDconfig_OK initBDDneg_memo_OK_2 initBDDor_memo_OK). (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) intros. elim H1. intros. elim H3. intros. elim H5. intros. elim H7. intros. (* Goal: @eq bool (bool_fun_of_bool_expr be vb) true *) rewrite <- (Neqb_complete _ _ H) in H9. exact (bool_fun_eq_trans _ _ _ (bool_fun_eq_symm _ _ H9) (bool_fun_of_BDDone _ H0) vb). Qed. Lemma is_tauto_is_complete : forall be : bool_expr, is_valid be -> is_tauto be = true. Proof. (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) unfold is_tauto, is_valid in |- *. intros. elim (BDDof_bool_expr_correct be initBDDconfig initBDDneg_memo initBDDor_memo initBDDconfig_OK initBDDneg_memo_OK_2 initBDDor_memo_OK). (* Goal: forall (_ : nodes_preserved initBDDconfig (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) (_ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_bool_expr be)), @eq bool (N.eqb BDDone (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) true *) intros. elim H1. intros. elim H3. intros. elim H5. intros. elim H7. intros. rewrite <- (BDDunique (fst (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) H0 BDDone (fst (snd (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) . (* Goal: @eq ad BDDone BDDone *) (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) *) reflexivity. (* Goal: @eq ad BDDone BDDone *) (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) *) unfold config_node_OK in |- *. unfold node_OK in |- *. right. left. reflexivity. (* Goal: config_node_OK (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) *) exact H2. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) (@fst ad (prod BDDneg_memo BDDor_memo) (@snd BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)))) (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_bool_expr be). exact H9. (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) *) apply bool_fun_eq_trans with (bf2 := bool_fun_one). exact H. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD (@fst BDDconfig (prod ad (prod BDDneg_memo BDDor_memo)) (BDDof_bool_expr initBDDconfig initBDDneg_memo initBDDor_memo be)) BDDone) *) apply bool_fun_eq_symm. exact (bool_fun_of_BDDone _ H0). Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Lemma BDDdummy_lemma_4 : forall bound : nat, (forall m : nat, m < bound -> forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < m) -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 m)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 m)) (snd (snd (BDDor_1 cfg memo node1 node2 m))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 m)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) -> forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound) -> BDDor_memo_lookup memo node1 node2 = None -> in_dom (BDDvar * (ad * ad)) node1 (fst cfg) = true -> node2 = BDDone \/ in_dom (BDDvar * (ad * ad)) node2 (fst cfg) = true -> is_internal_node cfg node1 -> in_dom (BDDvar * (ad * ad)) node2 (fst cfg) = true -> is_internal_node cfg node2 -> forall bound' : nat, bound = S bound' -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Gt -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. intros bound H cfg node1 node2 memo H0 H1 H2 H3 H4 y H5 H6 H8 H9 H7 bound' y0 H10 y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (BDDcompare (var cfg node2) (var cfg node1) = Datatypes.Lt). (* Goal: forall _ : @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro y11. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (config_node_OK cfg (low cfg node1)). (* Goal: forall _ : config_node_OK cfg (low cfg node1), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (config_node_OK cfg (low cfg node2)). (* Goal: forall (_ : config_node_OK cfg (low cfg node2)) (_ : config_node_OK cfg (low cfg node1)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (config_node_OK cfg (high cfg node1)). (* Goal: forall (_ : config_node_OK cfg (high cfg node1)) (_ : config_node_OK cfg (low cfg node2)) (_ : config_node_OK cfg (low cfg node1)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (config_node_OK cfg (high cfg node2)). (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. cut (is_internal_node cfg (low cfg node1) -> is_internal_node cfg node2 -> max (nat_of_N (var cfg (low cfg node1))) (nat_of_N (var cfg node2)) < bound'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (BDDconfig_OK (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) /\ config_node_OK (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) /\ BDDvar_le (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H16; clear H16; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H17; clear H17; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H18; clear H18; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H19; clear H19; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H20; clear H20; intros. cut (config_node_OK (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (config_node_OK (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (is_internal_node (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) -> is_internal_node (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 -> max (nat_of_N (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (nat_of_N (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)) < bound'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (BDDconfig_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) /\ BDDor_memo_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) /\ config_node_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) /\ nodes_preserved (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) /\ BDDvar_le (var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H25; clear H25; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H26; clear H26; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H27; clear H27; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H28; clear H28; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H29; clear H29; intros. cut (config_node_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (is_internal_node (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) -> BDDcompare (var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1) = Datatypes.Lt). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (is_internal_node (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) -> BDDcompare (var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1) = Datatypes.Lt). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (BDDconfig_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) /\ (Neqb (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) = false -> MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) = Some (var cfg node1, (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')), fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) /\ (Neqb (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) = true -> snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) = fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a = Some (x', (l', r')) \/ snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) = a) /\ (MapGet _ (fst (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H34; clear H34; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H35; clear H35; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H36; clear H36; intros. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim H37; clear H37; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound)))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node3 node4 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) node3 node4) (@Some ad node)), and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4)))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros node1' node2' node. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. rewrite (BDDor_memo_lookup_semantics (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' node2') . (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) elim (sumbool_of_bool (Neqb node1 node1' && Neqb node2 node2')); intro y2. (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite y2. (* Goal: forall _ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (node1 = node1'). (* Goal: forall (_ : @eq ad node1 node1') (_ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some ad node)), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) cut (node2 = node2'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) injection H46. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) clear H46; intros. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H44; rewrite <- H45. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1 = var cfg node1). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H50. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2 = var cfg node2). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var cfg node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H51. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H46. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H42. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in H42. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H42. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H41. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in H41; exact H41. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H45; rewrite <- H46. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H44. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H43. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1) (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2)) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in H43; exact H43. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H41. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H41. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H46. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H38. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H44. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). apply nodes_preserved_2 with (cfg := fst (BDDor_1 cfg memo (low cfg node1) node2 bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- H45. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H41. (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node2 node2') true *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj2 (andb_prop (Neqb node1 node1') (Neqb node2 node2') y2)). (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node1 node1') true *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (andb_prop (Neqb node1 node1') (Neqb node2 node2') y2)). (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite y2. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (H26 node1' node2' node H44)). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (H26 node1' node2' node H44))). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node = var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H45. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1' = var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H46. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2' = var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H47. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (proj2 (proj2 (H26 node1' node2' node H44))))). (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (H26 node1' node2' node H44))). (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) apply BDDmake_preserves_nodes; assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (H26 node1' node2' node H44)). apply nodes_preserved_var_1 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2')). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2')) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2')) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj2 (proj2 (proj2 (proj2 (H26 node1' node2' node H44))))). (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (H26 node1' node2' node H44)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact (proj1 (proj2 (H26 node1' node2' node H44))). apply bool_fun_eq_trans with (bf2 := bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))). rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_if (var cfg node1) (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (bool_fun_if (var cfg node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))))) (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_bool_fun. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))))) (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)). (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_or (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))) (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_if_lemma_4. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) (bool_fun_of_BDD cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node1) (bool_fun_of_BDD cfg (high cfg node1)) (bool_fun_of_BDD cfg (low cfg node1))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply bool_fun_if_lemma_2. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold bool_fun_eq in |- *. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) reflexivity. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold BDDvar_le in |- *. (* Goal: @eq bool (Nleb (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply Nleb_trans with (b := var cfg node1). (* Goal: @eq bool (Nleb (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) fold BDDvar_le in |- *. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (var cfg node1)) true *) (* Goal: @eq bool (Nleb (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_var_order. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq bool (Nleb (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) fold BDDvar_le in |- *. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_le_max_1. apply nodes_preserved_trans with (cfg2 := fst (BDDor_1 cfg memo (low cfg node1) node2 bound')). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. apply nodes_preserved_trans with (cfg2 := fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_preserves_nodes. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H38. rewrite (BDDor_1_lemma_internal_3 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) simpl in |- *. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) exact H34. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node1) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (var cfg node1) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDmake_semantics. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. cut (xl = var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H35. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply H32. (* Goal: is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with xl. (* Goal: @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad l r))))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with ll. (* Goal: @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll r)))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with rl. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold var in |- *. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H34. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) reflexivity. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. cut (xr = var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H35. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply H33. (* Goal: is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with xr. (* Goal: @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad l r))))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with lr. (* Goal: @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr r)))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) split with rr. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) unfold var in |- *; rewrite H34; reflexivity. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. apply BDDcompare_le_INFERIEUR_1 with (y := BDDvar_max (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. cut (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) = var cfg (high cfg node1)). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2)) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H34. cut (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 = var cfg node2). (* Goal: @eq comparison (BDDcompare xr (var cfg node1)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro; rewrite H35. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (high cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_ordered_high_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. cut (var (fst (BDDor_1 (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (snd (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound'))) = var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (fst (snd (BDDor_1 cfg memo (low cfg node1) node2 bound')))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var cfg node1)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (high cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite H33. apply BDDcompare_le_INFERIEUR_1 with (y := BDDvar_max (var cfg (low cfg node1)) (var cfg node2)). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_ordered_low_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. apply nodes_preserved_2 with (cfg := fst (BDDor_1 cfg memo (low cfg node1) node2 bound')). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply H. (* Goal: lt bound' bound *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDor_memo_OK cfg memo *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: config_node_OK cfg node2 *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite y0; unfold lt in |- *; apply le_n. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. cut (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) = var cfg (high cfg node1)). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro; rewrite H26. cut (var (fst (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 = var cfg node2). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2) (var cfg node2), lt (max (N.to_nat (var cfg (high cfg node1))) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2))) bound' *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intro; rewrite H27. (* Goal: lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply lt_trans_1 with (y := nat_of_N (var cfg node1)). (* Goal: lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) (N.to_nat (var cfg node1)) *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply lt_max_nat_of_N. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (high cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_ordered_high_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- y0. apply le_lt_trans with (m := max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))). (* Goal: le (N.to_nat (var cfg node1)) (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply le_nat_of_N_max. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_le_max_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1)) (var cfg (high cfg node1)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) node2 *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_var_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (high cfg node1) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (BDDvar_max (var cfg (low cfg node1)) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo (low cfg node1) node2 bound')))) (bool_fun_or (bool_fun_of_BDD cfg (low cfg node1)) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply H. (* Goal: lt bound' bound *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDor_memo_OK cfg memo *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: config_node_OK cfg node2 *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite y0; unfold lt in |- *; apply le_n. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: forall (_ : is_internal_node cfg (low cfg node1)) (_ : is_internal_node cfg node2), lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) intros. (* Goal: lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply lt_trans_1 with (y := nat_of_N (var cfg node1)). (* Goal: lt (max (N.to_nat (var cfg (low cfg node1))) (N.to_nat (var cfg node2))) (N.to_nat (var cfg node1)) *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply lt_max_nat_of_N. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg (low cfg node1)) (var cfg node2)) (var cfg node1)) Lt *) (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_ordered_low_3. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: lt (N.to_nat (var cfg node1)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) rewrite <- y0. apply le_lt_trans with (m := max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))). (* Goal: le (N.to_nat (var cfg node1)) (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply le_nat_of_N_max. (* Goal: @eq bool (BDDvar_le (var cfg node1) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDvar_le_max_1. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply high_OK. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply high_OK. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply low_OK. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: config_node_OK cfg (low cfg node1) *) (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply low_OK. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. (* Goal: @eq comparison (BDDcompare (var cfg node2) (var cfg node1)) Lt *) apply BDDcompare_sup_inf. (* Goal: @eq comparison (BDDcompare (var cfg node1) (var cfg node2)) Gt *) assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Lemma BDDneg_memo_OK_1_lemma_2_1' : forall (cfg : BDDconfig) (memo : BDDneg_memo), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg memo -> BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDzero BDDone). Proof. (* Goal: forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad) (n m : nat) (memo : BDDneg_memo) (_ : BDDconfig_OK cfg) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : lt (N.to_nat (var cfg node)) n) (_ : @eq nat n (S m)) (_ : BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) memo), BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 cfg node n)) (BDDneg_memo_put memo node (@snd BDDconfig ad (BDDneg_2 cfg node n))) *) intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: forall (memo : BDDneg_memo) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) memo), BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (BDDneg_memo_put memo BDDone BDDzero) *) intros memo H H0. unfold BDDneg_memo_OK_2 in |- *. intros node node' bound H1 H2. unfold BDDneg_memo_put, BDDneg_memo_lookup in H1. (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) rewrite (MapPut_semantics ad memo BDDzero BDDone node) in H1. elim (sumbool_of_bool (Neqb BDDzero node)). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro y. cut (BDDzero = node). intro H3. rewrite y in H1. injection H1. intros H4. (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) (* Goal: @eq N BDDone node *) (* Goal: forall _ : @eq bool (N.eqb BDDone node) false, and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) rewrite <- H3. rewrite <- H4. split. left; reflexivity. elim bound. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. elim H. intros H5 H6. elim H5; intros. rewrite H7. reflexivity. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) intros n H5. simpl in |- *. elim H. intros H6 H7. elim H6; intros. simpl in H9. rewrite H8. (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) reflexivity. apply Neqb_complete. assumption. intro y. rewrite y in H1. (* Goal: BDDneg_memo_OK_2 cfg memo *) unfold BDDneg_memo_OK_2 in H0. apply H0. assumption. assumption. Qed. Lemma BDDneg_memo_OK_1_lemma_3_1' : forall (cfg : BDDconfig) (memo : BDDneg_memo), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg memo -> BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero). Proof. (* Goal: forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad) (n m : nat) (memo : BDDneg_memo) (_ : BDDconfig_OK cfg) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : lt (N.to_nat (var cfg node)) n) (_ : @eq nat n (S m)) (_ : BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) memo), BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 cfg node n)) (BDDneg_memo_put memo node (@snd BDDconfig ad (BDDneg_2 cfg node n))) *) intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: forall (memo : BDDneg_memo) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) memo), BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (BDDneg_memo_put memo BDDone BDDzero) *) intros memo H H0. unfold BDDneg_memo_OK_2 in |- *. intros node node' bound H1 H2. unfold BDDneg_memo_put, BDDneg_memo_lookup in H1. (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) rewrite (MapPut_semantics ad memo BDDone BDDzero node) in H1. elim (sumbool_of_bool (Neqb BDDone node)). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro y. cut (BDDone = node). intro H3. rewrite y in H1. injection H1. intros H4. (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) (* Goal: @eq N BDDone node *) (* Goal: forall _ : @eq bool (N.eqb BDDone node) false, and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node bound) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) rewrite <- H3. rewrite <- H4. split. right; left; reflexivity. elim bound. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. elim H. intros H5 H6. elim H5; intros. rewrite (proj1 H8). reflexivity. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) intros n H5. simpl in |- *. elim H. intros H6 H7. elim H6; intros. rewrite (proj1 H9). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) reflexivity. apply Neqb_complete. assumption. intro y. rewrite y in H1. unfold BDDneg_memo_OK_2 in H0. (* Goal: BDDneg_memo_OK_2 cfg memo *) apply H0. assumption. assumption. Qed. Lemma BDDneg_memo_OK_1_lemma_1_2' : forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad) (n m : nat) (memo : BDDneg_memo), BDDconfig_OK cfg -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> nat_of_N (var cfg node) < n -> n = S m -> BDDneg_memo_OK_2 (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)) memo -> BDDneg_memo_OK_2 (fst (BDDneg_2 cfg node n)) (BDDneg_memo_put memo node (snd (BDDneg_2 cfg node n))). Proof. (* Goal: forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad) (n m : nat) (memo : BDDneg_memo) (_ : BDDconfig_OK cfg) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : lt (N.to_nat (var cfg node)) n) (_ : @eq nat n (S m)) (_ : BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) memo), BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 cfg node n)) (BDDneg_memo_put memo node (@snd BDDconfig ad (BDDneg_2 cfg node n))) *) intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: BDDneg_memo_OK_2 initBDDconfig (newMap ad) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros x l r node n m memo H H0 H1. intro H3. intros H2. unfold BDDneg_memo_OK_2 in |- *. (* Goal: forall (node0 node' : ad) (bound : nat) (_ : @eq (option ad) (BDDneg_memo_lookup (BDDneg_memo_put memo node (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) node0) (@Some ad node')) (_ : forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0)) bound), and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) intros node0 node' bound H4 H5. unfold BDDneg_memo_put, BDDneg_memo_lookup in H4. rewrite (MapPut_semantics ad memo node (snd (BDDneg_2 (bs, (share, counter)) node n)) node0) in H4. (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim (sumbool_of_bool (Neqb node node0)). intro y. rewrite y in H4. injection H4; intros. (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) cut (node = node0). intro H7. rewrite <- H7. rewrite <- H7 in H5. split. (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node' *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) apply nodes_preserved_2 with (cfg := (bs, (share, counter))). right; right. unfold in_dom in |- *. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) rewrite H0. reflexivity. unfold nodes_preserved in |- *. cut (config_node_OK (bs, (share, counter)) node). cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall (_ : forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (x : BDDvar) (l r node0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) node0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node' *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) intros H8 H9. exact (proj1 (proj2 (BDDneg_2_lemma n (bs, (share, counter)) node H H9 H8))). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro; assumption. right; right. unfold in_dom in |- *. rewrite H0; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) *) (* Goal: forall (x : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0))) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0 *) apply BDDneg_memo_OK_1_lemma_1_1_1. cut (config_node_OK (bs, (share, counter)) node). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H8. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n, config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) intros H9. exact (proj1 (BDDneg_2_lemma n (bs, (share, counter)) node H H8 H9)). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro H9. assumption. right. right. unfold in_dom in |- *. rewrite H0. reflexivity. (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node' *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) apply nodes_preserved_2 with (cfg := (bs, (share, counter))). right; right. unfold in_dom in |- *. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) rewrite H0. reflexivity. unfold nodes_preserved in |- *. cut (config_node_OK (bs, (share, counter)) node). cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall (_ : forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (x : BDDvar) (l r node0 : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) node0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node' *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) intros H8 H9. exact (proj1 (proj2 (BDDneg_2_lemma n (bs, (share, counter)) node H H9 H8))). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro; assumption. right; right. unfold in_dom in |- *. rewrite H0; reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) *) (* Goal: forall (x : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0))) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0 *) rewrite <- H6. cut (config_node_OK (bs, (share, counter)) node). intro H8. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n, config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) bound *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node') (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node)) *) (* Goal: @eq ad node node0 *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (@eq (prod BDDconfig ad) (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0 bound) (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node')) *) intros H9. exact (proj1 (proj2 (proj2 (proj2 (BDDneg_2_lemma n (bs, (share, counter)) node H H8 H9))))). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro; assumption. right; right. unfold in_dom in |- *. rewrite H0; reflexivity. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. rewrite <- H6. cut (config_node_OK (bs, (share, counter)) node). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H8. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : @eq ad r (high cfg node), @eq comparison (BDDcompare (var cfg r) (var cfg node)) Lt *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H9. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) node)). exact (proj2 (proj2 (proj2 (proj2 (BDDneg_2_lemma n (bs, (share, counter)) node H H8 H9))))). (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0)) (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0)) *) apply bool_fun_eq_neg_1. apply bool_fun_eq_symm. apply bool_fun_preservation. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. exact (proj1 (BDDneg_2_lemma n (bs, (share, counter)) node H H8 H9)). exact (proj1 (proj2 (BDDneg_2_lemma n (bs, (share, counter)) node H H8 H9))). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. intro; assumption. right; right. unfold in_dom in |- *. rewrite H0. (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) reflexivity. apply Neqb_complete. assumption. intro y. rewrite y in H4. (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) unfold BDDneg_memo_OK_2 in H2. split. apply nodes_preserved_2 with (cfg := fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)). cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. unfold lt in |- *. apply le_n. apply nodes_preserved_1 with (n := n) (x := x). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. apply BDDneg_memo_OK_1_lemma_1_1_1. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) *) (* Goal: forall (x : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r0))) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0 *) cut (config_node_OK (bs, (share, counter)) node). intro H6. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : @eq ad l (low cfg node), @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H7. exact (proj1 (BDDneg_2_lemma n (bs, (share, counter)) node H H6 H7)). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro H7. assumption. right. right. unfold in_dom in |- *. rewrite H0. reflexivity. apply nodes_preserved_2 with (cfg := fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)). cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H6. unfold lt in |- *. apply le_n. apply nodes_preserved_1 with (n := n) (x := x). assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. cut (config_node_OK (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node'). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. cut (nodes_preserved (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) (fst (BDDneg_2 (bs, (share, counter)) node n))). (* Goal: forall _ : @eq ad l (low cfg node), @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H7. apply nodes_preserved_2 with (cfg := fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. apply nodes_preserved_1 with (x := x). assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. apply BDDneg_memo_OK_lemma_1_4' with (memo := memo) (node := node0). (* Goal: BDDneg_memo_OK_2 cfg memo *) apply BDDneg_2_config_OK_lemma_2 with (n := n) (x := x) (node := node). assumption. assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H6. unfold lt in |- *. apply le_n. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node'). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0) *) apply bool_fun_preservation. apply BDDneg_2_config_OK_lemma_2 with (node := node) (x := x) (n := n). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. cut (config_node_OK (bs, (share, counter)) node). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : @eq ad l (low cfg node), @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H7. exact (proj1 (BDDneg_2_lemma n (bs, (share, counter)) node H H6 H7)). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro; assumption. right; right. unfold in_dom in |- *. rewrite H0. reflexivity. cut (nodes_preserved (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) (fst (BDDneg_2 (bs, (share, counter)) node n))). (* Goal: BDDneg_memo_OK_2 cfg memo *) unfold nodes_preserved in |- *. intro H6. assumption. apply nodes_preserved_1 with (x := x). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. apply BDDneg_memo_OK_lemma_1_4' with (memo := memo) (node := node0). (* Goal: BDDneg_memo_OK_2 cfg memo *) apply BDDneg_2_config_OK_lemma_2 with (node := node) (x := x) (n := n). assumption. assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H6. unfold lt in |- *. apply le_n. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0)). (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) memo *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0 *) (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node0) (@Some ad node') *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0)) (bool_fun_neg (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0)) *) apply BDDneg_memo_OK_bool_fun_1' with (memo := memo). apply BDDneg_2_config_OK_lemma_2 with (node := node) (x := x) (n := n). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. assumption. cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H6. unfold lt in |- *. apply le_n. assumption. apply bool_fun_eq_neg_1. apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n)) node0) (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) node0) *) apply bool_fun_preservation. apply BDDneg_2_config_OK_lemma_2 with (n := n) (x := x) (node := node). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. cut (config_node_OK (bs, (share, counter)) node). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : @eq ad l (low cfg node), @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H7. exact (proj1 (BDDneg_2_lemma n (bs, (share, counter)) node H H6 H7)). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro; assumption. right; right. unfold in_dom in |- *. rewrite H0. reflexivity. cut (nodes_preserved (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) (fst (BDDneg_2 (bs, (share, counter)) node n))). (* Goal: BDDneg_memo_OK_2 cfg memo *) unfold nodes_preserved in |- *. intro H6. assumption. apply nodes_preserved_1 with (x := x). (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. assumption. assumption. cut (is_internal_node (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0 -> nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0) < S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. exact (proj1 (H2 node0 node' (S (nat_of_N (var (fst (BDDneg_2 (fst (BDDneg_2 (bs, (share, counter)) l m)) r m)) node0))) H4 H6)). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_1_lemma' : forall (bound : nat) (arg : BDDconfig * ad * BDDneg_memo), BDDconfig_OK (fst (fst arg)) -> config_node_OK (fst (fst arg)) (snd (fst arg)) -> BDDneg_memo_OK_2 (fst (fst arg)) (snd arg) -> (is_internal_node (fst (fst arg)) (snd (fst arg)) -> nat_of_N (var (fst (fst arg)) (snd (fst arg))) < bound) -> fst (BDDneg_1 arg bound) = BDDneg_2 (fst (fst arg)) (snd (fst arg)) bound /\ BDDneg_memo_OK_2 (fst (fst (BDDneg_1 arg bound))) (snd (BDDneg_1 arg bound)). Proof. (* Goal: forall (bound : nat) (arg : prod (prod BDDconfig ad) BDDneg_memo) (_ : BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (_ : config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (_ : BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd (prod BDDconfig ad) BDDneg_memo arg)) (_ : forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)))) bound), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 arg bound)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) bound)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 arg bound))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 arg bound))) *) intro bound. apply lt_wf_ind with (P := fun bound : nat => forall arg : BDDconfig * ad * BDDneg_memo, BDDconfig_OK (fst (fst arg)) -> config_node_OK (fst (fst arg)) (snd (fst arg)) -> BDDneg_memo_OK_2 (fst (fst arg)) (snd arg) -> (is_internal_node (fst (fst arg)) (snd (fst arg)) -> nat_of_N (var (fst (fst arg)) (snd (fst arg))) < bound) -> fst (BDDneg_1 arg bound) = BDDneg_2 (fst (fst arg)) (snd (fst arg)) bound /\ BDDneg_memo_OK_2 (fst (fst (BDDneg_1 arg bound))) (snd (BDDneg_1 arg bound))). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros n H arg. elim arg; clear arg; intro y. elim y; clear y. intros cfg node memo. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (_ : config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (_ : BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (_ : forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))))) n), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros H0 H1 H2 H3. elim (option_sum _ (BDDneg_memo_lookup (snd (cfg, node, memo)) (snd (fst (cfg, node, memo))))). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro y. elim y; clear y; intros node' H4. rewrite (BDDneg_1_lemma_1 (cfg, node, memo) node' n H4). (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) simpl in |- *. split. simpl in H2. unfold BDDneg_memo_OK_2 in H2. rewrite (proj2 (H2 node node' n H4 H3)). (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None ad), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) reflexivity. assumption. intro y. elim (option_sum _ (MapGet _ (fst (fst (fst (cfg, node, memo)))) (snd (fst (cfg, node, memo))))). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 cfg node n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro y0. elim y0; clear y0. intro x. elim x; clear x. intros x y0. elim y0; clear y0; intros l r H4. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim (nat_sum n). intros y0. elim y0; clear y0. intros m H5. rewrite (BDDneg_1_lemma_4 (cfg, node, memo) x l r n m H5 y H4). (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. cut (fst (BDDneg_1 (cfg, l, memo) m) = BDDneg_2 (fst (fst (cfg, l, memo))) (snd (fst (cfg, l, memo))) m /\ BDDneg_memo_OK_2 (fst (fst (BDDneg_1 (cfg, l, memo) m))) (snd (BDDneg_1 (cfg, l, memo) m))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H6. cut (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)), r, snd (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)) m) = BDDneg_2 (fst (fst (fst (fst (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)), r, snd (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)))) (snd (fst (fst (fst (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)), r, snd (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)))) m /\ BDDneg_memo_OK_2 (fst (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)), r, snd (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)) m))) (snd (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)), r, snd (BDDneg_1 (fst (fst (cfg, node, memo)), l, snd (cfg, node, memo)) m)) (* Goal: forall _ : @eq ad l (low cfg node), @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) m))). intro H7. simpl in H6, H7. (* Goal: and (@eq (prod BDDconfig ad) (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m)))) (BDDneg_2 cfg node n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m))))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m)) node (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m))))))) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m))) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite (proj1 H7). rewrite (proj1 H6). cut (BDDmake (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)) x (snd (BDDneg_2 cfg l m)) (snd (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)) = BDDneg_2 cfg node n). (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) intro H8. split. assumption. rewrite (proj1 H6) in H7. (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (BDDmake (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) x (@snd BDDconfig ad (BDDneg_2 cfg l m)) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) m)) node (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) x (@snd BDDconfig ad (BDDneg_2 cfg l m)) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m))))) *) (* Goal: @eq (prod BDDconfig ad) (BDDmake (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m)) x (@snd BDDconfig ad (BDDneg_2 cfg l m)) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 cfg l m)) r m))) (BDDneg_2 cfg node n) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) m))) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim H7; intros. rewrite H9 in H7. clear H9 H10. (* instead of Rewrite (proj1 ? ? H7) in H7. which does not work in 6.3. *) (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H8. apply BDDneg_memo_OK_1_lemma_1_2' with (x := x) (l := l) (r := r) (m := m). assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. apply H3. split with x; split with l; split with r; assumption. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) assumption. exact (proj2 H7). rewrite H5. simpl in |- *. simpl in H4. rewrite H4. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) reflexivity. apply H. rewrite H5. unfold lt in |- *. apply le_n. simpl in |- *. rewrite (proj1 H6). (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. cut (config_node_OK cfg l). intro. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros H8. exact (proj1 (BDDneg_2_lemma m cfg l H0 H7 H8)). intro H8. apply lt_trans_1 with (y := nat_of_N (var cfg node)). (* Goal: forall _ : @eq ad r (high cfg node), @eq comparison (BDDcompare (var cfg r) (var cfg node)) Lt *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) cut (l = low cfg node). intro H9. rewrite H9. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. split with x; split with l; split with r. assumption. rewrite <- H9; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *. simpl in H4. rewrite H4. reflexivity. rewrite <- H5. apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. cut (l = low cfg node); intros. (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H7. apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. simpl in |- *. rewrite (proj1 H6). (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. cut (config_node_OK cfg l). intro H7. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H8. cut (config_node_OK cfg r). intro H9. elim H9; intro. rewrite H10. (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) BDDzero *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) r *) (* Goal: config_node_OK cfg r *) (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: config_node_OK cfg l *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m)))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))))) m *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) left; reflexivity. elim H10; intro. rewrite H11; right; left; reflexivity. (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) r *) (* Goal: config_node_OK cfg r *) (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: config_node_OK cfg l *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m)))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))))) m *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) right; right. unfold in_dom in |- *. cut (is_internal_node cfg r). intro H12. inversion H12. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) inversion H13. inversion H14. simpl in H0. simpl in |- *. cut (MapGet (BDDvar * (ad * ad)) (fst (fst (BDDneg_2 cfg l m))) r = Some (x0, (x1, x2))). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro H16. rewrite H16. reflexivity. exact (proj1 (proj2 (BDDneg_2_lemma m cfg l H0 H7 H8)) x0 x1 x2 r H15). (* Goal: BDDneg_memo_OK_2 cfg memo *) apply in_dom_is_internal. assumption. cut (r = high cfg node). intro H9. rewrite H9. (* Goal: BDDneg_memo_OK_2 cfg memo *) apply high_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold high in |- *. simpl in H4; rewrite H4; reflexivity. intro H8. apply lt_trans_1 with (y := nat_of_N (var cfg node)). (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) apply BDDcompare_lt. cut (l = low cfg node). intro; rewrite H9. apply BDDvar_ordered_low. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. split with x; split with l; split with r; assumption. rewrite <- H9; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. rewrite <- H5; apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. cut (l = low cfg node). (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H7. rewrite H7. apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. simpl in |- *. exact (proj2 H6). (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. rewrite (proj1 H6). simpl in |- *. intro H7. cut (var (fst (BDDneg_2 cfg l m)) r = var cfg r). (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H8. rewrite H8. apply lt_trans_1 with (y := nat_of_N (var cfg node)). apply BDDcompare_lt. (* Goal: BDDneg_memo_OK_2 cfg memo *) cut (r = high cfg node). intro H9. rewrite H9. apply BDDvar_ordered_high. assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) split with x; split with l; split with r; assumption. cut (config_node_OK cfg (high cfg node)). (* Goal: forall _ : config_node_OK cfg l, BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg l *) (* Goal: config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m)))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))))) m *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H10. elim H10; intro. inversion H7. inversion H12. inversion H13. (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: config_node_OK cfg (high cfg node) *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H9 in H14; rewrite H11 in H14. cut (BDDconfig_OK (fst (BDDneg_2 cfg l m))). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H15. rewrite (config_OK_zero (fst (BDDneg_2 cfg l m)) H15) in H14. discriminate H14. (* Goal: @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) cut (config_node_OK cfg l). intro H15. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H16. exact (proj1 (BDDneg_2_lemma m cfg l H0 H15 H16)). intro H16. apply lt_trans_1 with (y := nat_of_N (var cfg node)). (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) cut (l = low cfg node). intro H17. rewrite H17. apply BDDcompare_lt. apply BDDvar_ordered_low. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. split with x; split with l; split with r; assumption. rewrite <- H17; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *; simpl in H4; rewrite H4. reflexivity. rewrite <- H5; apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. cut (l = low cfg node). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H15. rewrite H15. apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. elim H11; intro. rewrite H9 in H7. (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: config_node_OK cfg (high cfg node) *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H12 in H7. inversion H7. inversion H13. inversion H14. cut (BDDconfig_OK (fst (BDDneg_2 cfg l m))). (* Goal: forall _ : config_node_OK cfg l, BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg l *) (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: config_node_OK cfg (high cfg node) *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H16. rewrite (config_OK_one (fst (BDDneg_2 cfg l m)) H16) in H15. discriminate H15. (* Goal: @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) cut (config_node_OK cfg l). intro H16. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: config_node_OK cfg l *) (* Goal: is_internal_node cfg (high cfg node) *) (* Goal: config_node_OK cfg (high cfg node) *) (* Goal: @eq ad r (high cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 cfg l m)) r) (var cfg r) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros H17. exact (proj1 (BDDneg_2_lemma m cfg l H0 H16 H17)). intro H17. (* Goal: lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) apply lt_trans_1 with (y := nat_of_N (var cfg node)). cut (l = low cfg node). (* Goal: BDDneg_memo_OK_2 cfg memo *) intro H18. rewrite H18. apply BDDcompare_lt. apply BDDvar_ordered_low. assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) split with x; split with l; split with r. assumption. rewrite <- H18; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *. simpl in H4. rewrite H4. reflexivity. rewrite <- H5. apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. cut (l = low cfg node); intros. (* Goal: BDDneg_memo_OK_2 cfg memo *) rewrite H16. apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. apply in_dom_is_internal. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. apply high_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold high in |- *. simpl in H4; rewrite H4; reflexivity. rewrite <- H5; apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. inversion H7. (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) inversion H8. inversion H9. unfold var in |- *. rewrite H10. cut (l = low cfg node). (* Goal: @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) cut (r = high cfg node). intros H11 H12. cut (config_node_OK cfg l). cut (config_node_OK cfg r). (* Goal: forall _ : config_node_OK cfg l, BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg l *) (* Goal: config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m)))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))))) m *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intros H13 H14. cut (BDDconfig_OK (fst (BDDneg_2 cfg l m))). intro H15. elim H13; intro. (* Goal: @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H16 in H10. rewrite (config_OK_zero (fst (BDDneg_2 cfg l m)) H15) in H10; discriminate. (* Goal: forall _ : config_node_OK cfg l, BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg l *) (* Goal: config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) *) (* Goal: BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m)))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))), lt (N.to_nat (var (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) l) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) m))))))) m *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim H16; intro. rewrite H17 in H10. rewrite (config_OK_one (fst (BDDneg_2 cfg l m)) H15) in H10; discriminate. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 cfg node n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (fst cfg) r)). intro y0. elim y0; intro x3. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) elim x3; intro y1; intro y2. elim y2; intros y3 y4 y5. rewrite y5. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@None (prod BDDvar (prod ad ad))), @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H18. cut (MapGet (BDDvar * (ad * ad)) (fst (fst (BDDneg_2 cfg l m))) r = Some (y1, (y3, y4))). (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) intro H19. rewrite H19 in H10. injection H10. intros H20 H21 H22. rewrite H22; reflexivity. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 cfg l m))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y1 (@pair ad ad y3 y4))) *) (* Goal: forall _ : is_internal_node cfg l, lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r) (@None (prod BDDvar (prod ad ad))), @eq BDDvar x0 match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) r with | Some (pair x (pair l r as p0) as p) => x | None => BDDzero end *) (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 cfg l m)) *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: @eq ad r (high cfg node) *) (* Goal: @eq ad l (low cfg node) *) (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo))) m)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg l) memo) m))) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) exact (proj1 (proj2 (BDDneg_2_lemma m cfg l H0 H14 H18)) y1 y3 y4 r y5). (* Goal: lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H18. apply lt_trans_1 with (y := nat_of_N (var cfg node)). apply BDDcompare_lt. (* Goal: BDDneg_memo_OK_2 cfg memo *) rewrite H12. apply BDDvar_ordered_low. assumption. split with x; split with l; split with r; assumption. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) rewrite <- H12. assumption. rewrite <- H5. apply H3. simpl in |- *. split with x; split with l; split with r; assumption. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) cfg) node) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 cfg node n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro y0. unfold in_dom in H17. rewrite y0 in H17. discriminate. cut (is_internal_node cfg l -> nat_of_N (var cfg l) < m). (* Goal: lt (N.to_nat (var cfg l)) m *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) intro H15. exact (proj1 (BDDneg_2_lemma m cfg l H0 H14 H15)). intro H15. apply lt_trans_1 with (y := nat_of_N (var cfg node)). (* Goal: BDDneg_memo_OK_2 cfg memo *) apply BDDcompare_lt. rewrite H12. apply BDDvar_ordered_low. assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) split with x; split with l; split with r; assumption. rewrite <- H12; assumption. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) rewrite <- H5; apply H3. simpl in |- *. split with x; split with l; split with r; assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) rewrite H11. apply high_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: BDDneg_memo_OK_2 cfg memo *) rewrite H12. apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold high in |- *; simpl in H4; rewrite H4; reflexivity. unfold low in |- *; simpl in H4; rewrite H4; reflexivity. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) apply H. rewrite H5. unfold lt in |- *. apply le_n. simpl in |- *. assumption. simpl in |- *. (* Goal: BDDneg_memo_OK_2 cfg memo *) cut (l = low cfg node). intro; rewrite H6. apply low_OK. assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) split with x; split with l; split with r; assumption. unfold low in |- *; simpl in H4; rewrite H4; reflexivity. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. assumption. simpl in |- *. intro H6. apply lt_trans_1 with (y := nat_of_N (var cfg node)). (* Goal: @eq comparison (BDDcompare (var cfg l) (var cfg node)) Lt *) (* Goal: @eq ad l (low cfg node) *) (* Goal: lt (N.to_nat (var cfg node)) (S m) *) (* Goal: forall _ : @eq nat n O, and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) apply BDDcompare_lt. cut (l = low cfg node). intro H7. rewrite H7. apply BDDvar_ordered_low. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. split with x; split with l; split with r; assumption. rewrite <- H7; assumption. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) unfold low in |- *; simpl in H4; rewrite H4; reflexivity. rewrite <- H5; apply H3. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. split with x; split with l; split with r; assumption. intro y0. rewrite y0. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) rewrite (BDDneg_1_lemma_3 (cfg, node, memo) x l r y H4). simpl in |- *. simpl in H4. (* Goal: BDDneg_memo_OK_2 initBDDconfig (newMap ad) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@None (prod BDDvar (prod ad ad))), and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n)) (BDDneg_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) n)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) n))) *) rewrite H4. split. reflexivity. unfold BDDneg_memo_OK_2 in |- *. intros node0 node' bound0 H5 H6. unfold BDDneg_memo_lookup in H5. (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) rewrite (newMap_semantics ad node0) in H5. discriminate. simpl in |- *. intro y0. rewrite (BDDneg_1_lemma_2 (cfg, node, memo) n y y0). (* Goal: and (@eq (prod BDDconfig ad) (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero))) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N cfg BDDzero) (BDDneg_memo_put memo BDDone BDDzero)))) *) simpl in |- *. unfold BDDneg_2 in |- *. elim n; rewrite y0. elim (Neqb node BDDzero). (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) simpl in |- *. split. reflexivity. apply BDDneg_memo_OK_1_lemma_2_1'. assumption. (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) assumption. simpl in |- *. split. reflexivity. apply BDDneg_memo_OK_1_lemma_3_1'. (* Goal: BDDneg_memo_OK_2 cfg memo *) assumption. assumption. (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) fold BDDneg_2 in |- *. intro n0. intro H4. elim (Neqb node BDDzero). simpl in |- *. split. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) reflexivity. apply BDDneg_memo_OK_1_lemma_2_1'. assumption. assumption. (* Goal: and (@eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero)) (BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero)) *) simpl in |- *. split. (* Goal: @eq (prod BDDconfig ad) (@pair BDDconfig N cfg BDDzero) (@pair BDDconfig N cfg BDDzero) *) (* Goal: BDDneg_memo_OK_2 cfg (BDDneg_memo_put memo BDDone BDDzero) *) reflexivity. apply BDDneg_memo_OK_1_lemma_3_1'. assumption. assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Definition BDDneg_memo_OK_1 (cfg : BDDconfig) (memo : BDDneg_memo) := forall (node node' : ad) (bound : nat), config_node_OK cfg node -> BDDneg_memo_lookup memo node = Some node' -> (is_internal_node cfg node -> nat_of_N (var cfg node) < bound) -> BDDneg_2 cfg node bound = (cfg, node'). Definition BDDneg_memo_OK_2 (cfg : BDDconfig) (memo : BDDneg_memo) := forall (node node' : ad) (bound : nat), BDDneg_memo_lookup memo node = Some node' -> (is_internal_node cfg node -> nat_of_N (var cfg node) < bound) -> config_node_OK cfg node /\ BDDneg_2 cfg node bound = (cfg, node'). Fixpoint BDDneg_1 (arg : BDDconfig * ad * BDDneg_memo) (bound : nat) {struct bound} : BDDconfig * ad * BDDneg_memo := match BDDneg_memo_lookup (snd arg) (snd (fst arg)) with | Some node => (fst (fst arg), node, snd arg) | None => match MapGet _ (fst (fst (fst arg))) (snd (fst arg)) with | None => if Neqb (snd (fst arg)) BDDzero then (fst (fst arg), BDDone, BDDneg_memo_put (snd arg) BDDzero BDDone) else (fst (fst arg), BDDzero, BDDneg_memo_put (snd arg) BDDone BDDzero) | Some (x, (l, r)) => match bound with | O => (initBDDconfig, BDDzero, newMap ad) | S bound' => (BDDmake (fst (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))) x (snd (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound'))) (snd (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))), BDDneg_memo_put (snd (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound')) (snd (fst arg)) (snd (BDDmake (fst (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))) x (snd (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound'))) (snd (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound')))))) end end end. Lemma BDDneg_1_lemma_1 : forall (arg : BDDconfig * ad * BDDneg_memo) (node : ad) (bound : nat), BDDneg_memo_lookup (snd arg) (snd (fst arg)) = Some node -> BDDneg_1 arg bound = (fst (fst arg), node, snd arg). Proof. (* Goal: forall (arg : prod (prod BDDconfig ad) BDDneg_memo) (x : BDDvar) (l r : ad) (bound bound' : nat) (_ : @eq nat bound (S bound')) (_ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo arg) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@None ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 arg bound) (@pair (prod BDDconfig ad) (Map ad) (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))))))) *) intro arg. elim arg. clear arg. intro y. elim y; clear y. intros cfg node memo node' bound. (* Goal: forall _ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)))) (@Some ad node'), @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) bound) (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) node') (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) *) intros H. unfold BDDneg_1 in |- *. simpl in |- *. elim bound; rewrite H; simpl in |- *. reflexivity. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) reflexivity. Qed. Lemma BDDneg_1_lemma_2 : forall (arg : BDDconfig * ad * BDDneg_memo) (bound : nat), BDDneg_memo_lookup (snd arg) (snd (fst arg)) = None -> MapGet _ (fst (fst (fst arg))) (snd (fst arg)) = None -> BDDneg_1 arg bound = (if Neqb (snd (fst arg)) BDDzero then (fst (fst arg), BDDone, BDDneg_memo_put (snd arg) BDDzero BDDone) else (fst (fst arg), BDDzero, BDDneg_memo_put (snd arg) BDDone BDDzero)). Proof. (* Goal: forall (arg : prod (prod BDDconfig ad) BDDneg_memo) (x : BDDvar) (l r : ad) (bound bound' : nat) (_ : @eq nat bound (S bound')) (_ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo arg) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@None ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 arg bound) (@pair (prod BDDconfig ad) (Map ad) (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))))))) *) intro arg. elim arg. clear arg; intro y. elim y; clear y. intros cfg node memo bound. (* Goal: @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo) bound) (if N.eqb (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) BDDzero then @pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) BDDone) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) BDDzero BDDone) else @pair (prod BDDconfig N) (Map ad) (@pair BDDconfig N (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo))) BDDzero) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad cfg node) memo)) BDDone BDDzero)) *) intros H H0. unfold BDDneg_1 in |- *. simpl in |- *. elim bound; rewrite H; simpl in |- *. simpl in H0. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H0; reflexivity. fold BDDneg_1 in |- *. simpl in H0. rewrite H0. reflexivity. Qed. Lemma BDDneg_1_lemma_3 : forall (arg : BDDconfig * ad * BDDneg_memo) (x : BDDvar) (l r : ad), BDDneg_memo_lookup (snd arg) (snd (fst arg)) = None -> MapGet _ (fst (fst (fst arg))) (snd (fst arg)) = Some (x, (l, r)) -> BDDneg_1 arg 0 = (initBDDconfig, BDDzero, newMap ad). Proof. (* Goal: forall (arg : prod (prod BDDconfig ad) BDDneg_memo) (x : BDDvar) (l r : ad) (bound bound' : nat) (_ : @eq nat bound (S bound')) (_ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo arg) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@None ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 arg bound) (@pair (prod BDDconfig ad) (Map ad) (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))))))) *) intro arg. elim arg. clear arg; intro y. elim y; clear y. intros cfg node memo x l r. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) intros H H0. simpl in |- *. simpl in H, H0. rewrite H. rewrite H0. reflexivity. Qed. Lemma nat_sum : forall n : nat, {m : nat | n = S m} + {n = 0}. Proof. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro n. elim n. right. reflexivity. intros n0 H. left. split with n0. reflexivity. Qed. Lemma BDDneg_1_lemma_4 : forall (arg : BDDconfig * ad * BDDneg_memo) (x : BDDvar) (l r : ad) (bound bound' : nat), bound = S bound' -> BDDneg_memo_lookup (snd arg) (snd (fst arg)) = None -> MapGet _ (fst (fst (fst arg))) (snd (fst arg)) = Some (x, (l, r)) -> BDDneg_1 arg bound = (BDDmake (fst (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))) x (snd (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound'))) (snd (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))), BDDneg_memo_put (snd (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound')) (snd (fst arg)) (snd (BDDmake (fst (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound'))) x (snd (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound'))) (snd (fst (BDDneg_1 (fst (fst (BDDneg_1 (fst (fst arg), l, snd arg) bound')), r, snd (BDDneg_1 (fst (fst arg), l, snd arg) bound')) bound')))))). Proof. (* Goal: forall (arg : prod (prod BDDconfig ad) BDDneg_memo) (x : BDDvar) (l r : ad) (bound bound' : nat) (_ : @eq nat bound (S bound')) (_ : @eq (option ad) (BDDneg_memo_lookup (@snd (prod BDDconfig ad) BDDneg_memo arg) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@None ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (prod (prod BDDconfig ad) BDDneg_memo) (BDDneg_1 arg bound) (@pair (prod BDDconfig ad) (Map ad) (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')))) (BDDneg_memo_put (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound')) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))) x (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) r) (@snd (prod BDDconfig ad) BDDneg_memo (BDDneg_1 (@pair (prod BDDconfig ad) BDDneg_memo (@pair BDDconfig ad (@fst BDDconfig ad (@fst (prod BDDconfig ad) BDDneg_memo arg)) l) (@snd (prod BDDconfig ad) BDDneg_memo arg)) bound'))) bound'))))))) *) intro arg. elim arg. clear arg; intro y. elim y; clear y. intros cfg node memo x l r. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intros bound bound' H H0 H1. elim (nat_sum bound). intro y. elim y; clear y; intros x0 y. rewrite H in y. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) injection y; intro. rewrite H. simpl in |- *. simpl in H0, H1. rewrite H0; rewrite H1. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) reflexivity. intro y. rewrite H in y; discriminate. Qed. Lemma bool_fun_restrict_neg_1 : forall (bf : bool_fun) (x : BDDvar) (b : bool), bool_fun_ext bf -> bool_fun_eq (bool_fun_restrict (bool_fun_neg bf) x b) (bool_fun_neg (bool_fun_restrict bf x b)). Proof. (* Goal: forall (bf : bool_fun) (x : BDDvar) (b : bool) (_ : bool_fun_ext bf), bool_fun_eq (bool_fun_restrict (bool_fun_neg bf) x b) (bool_fun_neg (bool_fun_restrict bf x b)) *) intros bf x b H. unfold bool_fun_eq in |- *. unfold bool_fun_restrict in |- *. unfold bool_fun_eval at 2 in |- *. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro vb. unfold bool_fun_neg in |- *. unfold bool_fun_eval at 3 in |- *. reflexivity. Qed. Lemma bool_fun_neg_eq_var_2 : forall (cfg : BDDconfig) (node node' : ad), BDDconfig_OK cfg -> is_internal_node cfg node -> is_internal_node cfg node' -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)) -> var cfg node = var cfg node'. Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: forall (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))), @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intros node node' H H0 H1 H2. cut (BDDconfig_OK (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) /\ (forall (x : BDDvar) (l r a : ad), MapGet _ (fst (bs, (share, counter))) a = Some (x, (l, r)) -> MapGet _ (fst (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))) a = Some (x, (l, r))) /\ (is_internal_node (bs, (share, counter)) node -> is_internal_node (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) /\ var (bs, (share, counter)) node = var (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))) /\ config_node_OK (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) node))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. cut (var (bs, (share, counter)) node' = var (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) node'). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) intro H4. cut (var (bs, (share, counter)) node = var (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))). (* Goal: forall _ : @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intro H5. rewrite H5. rewrite H4. cut (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))) = node'). (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H6. rewrite H6. reflexivity. apply BDDunique with (cfg := fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))). (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) *) (* Goal: forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (and (forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) exact (proj1 H3). exact (proj1 (proj2 (proj2 (proj2 H3)))). (* Goal: or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) inversion H1. inversion H6. inversion H7. right. right. unfold in_dom in |- *. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite (proj1 (proj2 H3) x x0 x1 node' H8). reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) node)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (and (forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) exact (proj2 (proj2 (proj2 (proj2 H3)))). apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (bs, (share, counter)) node'). (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (and (forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) apply bool_fun_eq_symm; assumption. apply bool_fun_eq_symm. apply bool_fun_preservation. (* Goal: or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. exact (proj1 H3). exact (proj1 (proj2 H3)). right. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) right. unfold in_dom in |- *. inversion H1. inversion H6. inversion H7. rewrite H8; reflexivity. (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (and (forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) exact (proj2 (proj1 (proj2 (proj2 H3)) H0)). inversion H1. inversion H4. (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) node') *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (and (forall (x : BDDvar) (l r a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) inversion H5. unfold var at 1 2 in |- *. rewrite (proj1 (proj2 H3) x x0 x1 node' H6). (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H6. reflexivity. apply BDDneg_2_lemma. assumption. right. right. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) inversion H0. inversion H3. inversion H4. unfold in_dom in |- *; rewrite H5; reflexivity. (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_memo_OK_1_lemma_1_1_1 : forall (bound : nat) (cfg : BDDconfig) (node node' : ad), BDDconfig_OK cfg -> config_node_OK cfg node -> config_node_OK cfg node' -> (is_internal_node cfg node -> nat_of_N (var cfg node) < bound) -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)) -> BDDneg_2 cfg node bound = (cfg, node'). Proof. (* Goal: forall (bound : nat) (cfg : BDDconfig) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : config_node_OK cfg node') (_ : forall _ : is_internal_node cfg node, lt (N.to_nat (var cfg node)) bound) (_ : bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node))), @eq (prod BDDconfig ad) (BDDneg_2 cfg node bound) (@pair BDDconfig ad cfg node') *) intro bound. apply lt_wf_ind with (P := fun bound : nat => forall (cfg : BDDconfig) (node node' : ad), BDDconfig_OK cfg -> config_node_OK cfg node -> config_node_OK cfg node' -> (is_internal_node cfg node -> nat_of_N (var cfg node) < bound) -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)) -> BDDneg_2 cfg node bound = (cfg, node')). (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intros n H. intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intros node node' H0 H1 H2 H3 H4. elim H1; intro. cut (node' = BDDone). intro H6. rewrite H5. rewrite H6. (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) elim n. unfold BDDneg_2 in |- *. rewrite (config_OK_zero (bs, (share, counter)) H0). (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) cut (Neqb BDDzero BDDzero = true). intro H7. rewrite H7. reflexivity. apply Neqb_correct. (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone (S n0)) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intros n0 H7. unfold BDDneg_2 in |- *. fold BDDneg_2 in |- *. rewrite (config_OK_zero (bs, (share, counter)) H0). (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) cut (Neqb BDDzero BDDzero = true). intro H8. rewrite H8. reflexivity. apply Neqb_correct. (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite H5 in H4. rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0)) in H4. (* Goal: @eq ad node' BDDone *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite bool_fun_neg_zero in H4. rewrite <- (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0))) in H4. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply BDDunique with (cfg := (bs, (share, counter))). assumption. assumption. right; left; reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) assumption. elim H5; clear H5; intro. cut (node' = BDDzero). intro H6. rewrite H5. (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero) *) (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite H6. elim n. unfold BDDneg_2 in |- *. rewrite (config_OK_one (bs, (share, counter)) H0). (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) cut (Neqb BDDone BDDzero = false). intro H7. rewrite H7. reflexivity. simpl in |- *. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) reflexivity. intros n0 H7. unfold BDDneg_2 in |- *. fold BDDneg_2 in |- *. rewrite (config_OK_one (bs, (share, counter)) H0). (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) cut (Neqb BDDone BDDzero = false). intro H8. rewrite H8. reflexivity. reflexivity. (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite H5 in H4. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0))) in H4. (* Goal: @eq ad node' BDDzero *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite bool_fun_neg_one in H4. rewrite <- (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0)) in H4. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply BDDunique with (cfg := (bs, (share, counter))). assumption. assumption. left; reflexivity. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) assumption. elim (nat_sum n); intro y. elim y; clear y. intros m H6. rewrite H6. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) simpl in |- *. cut (is_internal_node (bs, (share, counter)) node). intro H7. inversion H7. (* Goal: @eq (prod BDDconfig ad) match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => BDDmake (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) x (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) | None => if N.eqb node BDDzero then @pair BDDconfig N (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDone else @pair BDDconfig N (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) BDDzero end (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) inversion H8. inversion H9. simpl in H10. rewrite H10. cut (is_internal_node (bs, (share, counter)) node'). (* Goal: forall _ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H11. inversion H11. inversion H12. inversion H13. clear H8 H9 H12 H13. (* Goal: forall _ : @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3), @eq (prod BDDconfig ad) (BDDmake (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m)) x1 m)) x (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m)) (@snd BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m)) x1 m))) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) cut (BDDneg_2 (bs, (share, counter)) x0 m = (bs, (share, counter), x3)). intro H8. rewrite H8. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) simpl in |- *. cut (BDDneg_2 (bs, (share, counter)) x1 m = (bs, (share, counter), x4)). intro H9. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) rewrite H9. simpl in |- *. unfold BDDmake in |- *. simpl in |- *. cut (Neqb x3 x4 = false). intro H12. (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') x4) false *) (* Goal: @eq ad x4 (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite H12. elim H0. intros H13 H15. unfold BDDsharing_OK in H15. cut (x = x2). intro H16. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H16. rewrite (proj2 (proj1 H15 x2 x3 x4 node') H14). reflexivity. (* Goal: @eq BDDvar x x2 *) (* Goal: @eq bool (N.eqb x3 x4) false *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) cut (x = var (bs, (share, counter)) node). cut (x2 = var (bs, (share, counter)) node'). (* Goal: @eq BDDvar x x2 *) (* Goal: @eq BDDvar x2 (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq BDDvar x (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: @eq bool (N.eqb x3 x4) false *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intros H16 H17. rewrite H16. rewrite H17. apply bool_fun_neg_eq_var_2 with (cfg := (bs, (share, counter))). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. assumption. assumption. assumption. unfold var in |- *. rewrite H14. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) reflexivity. unfold var in |- *. simpl in |- *; rewrite H10; reflexivity. cut (x3 = low (bs, (share, counter)) node'). (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') x4) false *) (* Goal: @eq ad x4 (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) cut (x4 = high (bs, (share, counter)) node'). intros H12 H13. rewrite H13. rewrite H12. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply low_high_neq. assumption. assumption. unfold high in |- *; rewrite H14; reflexivity. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold low in |- *; rewrite H14; reflexivity. cut (x1 = high (bs, (share, counter)) node). (* Goal: @eq bool (N.eqb (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') x4) false *) (* Goal: @eq ad x4 (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) cut (x4 = high (bs, (share, counter)) node'). intros H9 H12. rewrite H9; rewrite H12. (* Goal: lt m n *) (* Goal: BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) m *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x0 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply H. rewrite H6. unfold lt in |- *. apply le_n. assumption. apply high_OK. assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. apply high_OK. assumption. assumption. intro H13. apply lt_trans_1 with (y := nat_of_N (var (bs, (share, counter)) node)). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply BDDcompare_lt. apply BDDvar_ordered_high. assumption. assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. rewrite <- H6; apply H3. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node') (var (bs, (share, counter)) node') true). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) node)) (var (bs, (share, counter)) node') true). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_restrict_eq. assumption. cut (var (bs, (share, counter)) node = var (bs, (share, counter)) node'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) r), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) r) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H13. rewrite <- H13. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) true)). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x0 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply bool_fun_restrict_neg_1. apply bool_fun_of_BDD_ext. apply bool_fun_eq_neg_1. apply bool_fun_eq_symm. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_of_BDDhigh. assumption. assumption. apply bool_fun_neg_eq_var_2. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) assumption. assumption. assumption. assumption. unfold high in |- *; rewrite H14; reflexivity. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold high in |- *; simpl in |- *; rewrite H10; reflexivity. cut (x0 = low (bs, (share, counter)) node). (* Goal: @eq (prod BDDconfig ad) (BDDmake (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m)) x x3 (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m))) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x1 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x4) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x0 m) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x3) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) cut (x3 = low (bs, (share, counter)) node'). intros H8 H9. rewrite H8; rewrite H9. (* Goal: lt m n *) (* Goal: BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) m *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x0 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply H. rewrite H6. unfold lt in |- *. apply le_n. assumption. apply low_OK. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. assumption. apply low_OK. assumption. assumption. intros H12. (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)) m *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply lt_trans_1 with (y := nat_of_N (var (bs, (share, counter)) node)). apply BDDcompare_lt. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply BDDvar_ordered_low. assumption. assumption. assumption. rewrite <- H6; apply H3. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node') (var (bs, (share, counter)) node') false). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) node)) (var (bs, (share, counter)) node') false). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_restrict_eq. assumption. cut (var (bs, (share, counter)) node = var (bs, (share, counter)) node'). (* Goal: forall _ : @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node'), bool_fun_eq (bool_fun_restrict (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') false) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x0 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intro H12. rewrite <- H12. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_restrict (bool_fun_of_BDD (bs, (share, counter)) node) (var (bs, (share, counter)) node) false)). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) false) (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x3 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) (* Goal: @eq ad x0 (low (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply bool_fun_restrict_neg_1. apply bool_fun_of_BDD_ext. apply bool_fun_eq_neg_1. apply bool_fun_eq_symm. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_of_BDDlow. assumption. assumption. apply bool_fun_neg_eq_var_2. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) assumption. assumption. assumption. assumption. unfold low in |- *; rewrite H14; reflexivity. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold low in |- *; simpl in |- *; rewrite H10; reflexivity. elim H2; intro. rewrite H11 in H4. (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite (proj1 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0)) in H4. (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite <- bool_fun_neg_one in H4. absurd (bool_fun_eq bool_fun_one (bool_fun_of_BDD (bs, (share, counter)) node)). (* Goal: not (bool_fun_eq bool_fun_zero (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: bool_fun_eq bool_fun_zero (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply bool_fun_neq_lemma. exact (proj2 (internal_node_not_constant (bs, (share, counter)) node H0 H7)). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_eq_neg. assumption. elim H11; clear H11; intro. rewrite H11 in H4. rewrite (proj1 (proj2 (bool_fun_of_BDD_semantics (bs, (share, counter)) H0))) in H4. (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) rewrite <- bool_fun_neg_zero in H4. absurd (bool_fun_eq bool_fun_zero (bool_fun_of_BDD (bs, (share, counter)) node)). (* Goal: not (bool_fun_eq bool_fun_zero (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: bool_fun_eq bool_fun_zero (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) (* Goal: is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node n) (@pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) apply bool_fun_neq_lemma. exact (proj1 (internal_node_not_constant (bs, (share, counter)) node H0 H7)). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply bool_fun_eq_neg. assumption. apply in_dom_is_internal. assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply in_dom_is_internal. assumption. absurd (nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) rewrite y. apply lt_n_O. apply H3. apply in_dom_is_internal. assumption. Qed. Lemma BDDneg_memo_OK_1_2 : forall (cfg : BDDconfig) (memo : BDDneg_memo), BDDneg_memo_OK_2 cfg memo -> BDDneg_memo_OK_1 cfg memo. Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (_ : BDDneg_memo_OK_2 cfg memo), BDDneg_memo_OK_1 cfg memo *) unfold BDDneg_memo_OK_1 in |- *. unfold BDDneg_memo_OK_2 in |- *. intros cfg memo H node node' bound H0 H1 H2. exact (proj2 (H node node' bound H1 H2)). Qed. Lemma BDDneg_memo_OK_bool_fun_1 : forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_1 cfg memo -> config_node_OK cfg node -> BDDneg_memo_lookup memo node = Some node' -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg. intros bs y. elim y; clear y; intros share counter. (* Goal: forall (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) memo) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) intros memo node node' H H0 H1 H2. unfold BDDneg_memo_OK_1 in H0. cut (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))) = (bs, (share, counter), node')). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < S (nat_of_N (var (bs, (share, counter)) node))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) intro H4. cut (bool_fun_of_BDD (bs, (share, counter)) node' = bool_fun_of_BDD (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))). (* Goal: forall _ : @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))), bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: @eq bool_fun (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))))) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: @eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node') *) intro H5. rewrite H5. exact (proj2 (proj2 (proj2 (proj2 (BDDneg_2_lemma (S (nat_of_N (var (bs, (share, counter)) node))) (bs, (share, counter)) node H H1 H4))))). (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) rewrite H3. simpl in |- *. reflexivity. intro H4. unfold lt in |- *; apply le_n. apply H0. (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. assumption. intro H3. unfold lt in |- *; apply le_n. Qed. Lemma BDDneg_memo_OK_bool_fun_1' : forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg memo -> config_node_OK cfg node -> BDDneg_memo_lookup memo node = Some node' -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intros cfg memo node node' H H0 H1 H2. apply BDDneg_memo_OK_bool_fun_1 with (memo := memo). assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply BDDneg_memo_OK_1_2. assumption. assumption. assumption. Qed. Definition nodes_preserved (cfg cfg' : BDDconfig) := forall (x : BDDvar) (l r node : ad), MapGet _ (fst cfg) node = Some (x, (l, r)) -> MapGet _ (fst cfg') node = Some (x, (l, r)). Lemma BDDmake_preserves_nodes : forall (cfg : BDDconfig) (x : BDDvar) (l r : ad), BDDconfig_OK cfg -> nodes_preserved cfg (fst (BDDmake cfg x l r)). Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg. intros bs y. elim y; clear y; intros share counter. (* Goal: forall (x0 : BDDvar) (l0 r0 node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) x l r))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) intros x l r H00. unfold nodes_preserved in |- *. unfold BDDmake in |- *. elim (sumbool_of_bool (Neqb l r)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro y. rewrite y. simpl in |- *. intros; assumption. intro y. rewrite y. simpl in |- *. (* Goal: forall (x0 : BDDvar) (l0 r0 node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair BDDsharing_map N (BDDshare_put share x l r counter) (ad_S counter))) counter end)) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq (option ad) (BDDshare_lookup share x l r) (@None ad)) (x0 : BDDvar) (l0 r0 node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad match BDDshare_lookup share x l r with | Some y => @pair BDDconfig ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) y | None => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N)) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod BDDsharing_map N) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair BDDsharing_map N (BDDshare_put share x l r counter) (ad_S counter))) counter end)) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) elim (option_sum _ (BDDshare_lookup share x l r)). intro y0. inversion y0. rewrite H. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) simpl in |- *. intros x1 l0 r0 node H0. assumption. intro y0. rewrite y0. simpl in |- *. elim H00. intros H H0 x0 l0 r0 node H1. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) bs counter (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) rewrite (MapPut_semantics (BDDvar * (ad * ad)) bs counter (x, (l, r)) node). elim (sumbool_of_bool (Neqb counter node)). intro y1. absurd (counter = node). unfold not in |- *; intro. cut (MapGet (BDDvar * (ad * ad)) bs node = None). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. rewrite H1 in H3; discriminate. apply (proj1 (proj2 H0)). (* Goal: le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) rewrite H2. unfold Nleb in |- *. apply leb_correct. apply le_n. apply Neqb_complete. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. intro y1. rewrite y1. assumption. Qed. Lemma nodes_preserved_2 : forall (cfg cfg' : BDDconfig) (node : ad), config_node_OK cfg node -> nodes_preserved cfg cfg' -> config_node_OK cfg' node. Proof. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intros cfg cfg' node H H0. elim H; intro. rewrite H1. left; reflexivity. elim H1; intro. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H2; right; left; reflexivity. right; right. unfold in_dom in H2. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (fst cfg) node)). intro y. elim y. (* Goal: forall (a : BDDvar) (b : prod ad ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) a b))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intros x. elim x. intro y0. intro y1. elim y1. intros y2 y3 y4. unfold nodes_preserved in H0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold in_dom in |- *. rewrite (H0 y0 y2 y3 node y4). reflexivity. intro y. rewrite y in H2. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) cfg')) true *) discriminate. Qed. Lemma BDDneg_2_config_OK_lemma_2 : forall (cfg : BDDconfig) (node : ad) (x : BDDvar) (l r : ad) (n m : nat), BDDconfig_OK cfg -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> nat_of_N (var cfg node) < n -> n = S m -> BDDconfig_OK (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)). Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg. intros bs y. elim y; clear y; intros share counter. (* Goal: forall (node : ad) (x : BDDvar) (l r : ad) (n m : nat) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n) (_ : @eq nat n (S m)), BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) *) intros node x l r n m H H0 H1 H2. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < n). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. cut (BDDconfig_OK (fst (BDDneg_2 (bs, (share, counter)) l m)) /\ (forall (x0 : BDDvar) (l0 r0 a : ad), MapGet _ (fst (bs, (share, counter))) a = Some (x0, (l0, r0)) -> MapGet _ (fst (fst (BDDneg_2 (bs, (share, counter)) l m))) a = Some (x0, (l0, r0))) /\ (is_internal_node (bs, (share, counter)) l -> is_internal_node (fst (BDDneg_2 (bs, (share, counter)) l m)) (snd (BDDneg_2 (bs, (share, counter)) l m)) /\ var (bs, (share, counter)) l = var (fst (BDDneg_2 (bs, (share, counter)) l m)) (snd (BDDneg_2 (bs, (share, counter)) l m))) /\ config_node_OK (fst (BDDneg_2 (bs, (share, counter)) l m)) (snd (BDDneg_2 (bs, (share, counter)) l m)) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDneg_2 (bs, (share, counter)) l m)) (snd (BDDneg_2 (bs, (share, counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (bs, (share, counter)) l))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) intro H4. elim H4; clear H4; intros. elim H5; clear H5; intros. elim H6; clear H6; intros. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) elim H7; clear H7; intros. cut (is_internal_node (fst (BDDneg_2 (bs, (share, counter)) l m)) r -> nat_of_N (var (fst (BDDneg_2 (bs, (share, counter)) l m)) r) < m). (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H9. cut (config_node_OK (fst (BDDneg_2 (bs, (share, counter)) l m)) r). (* Goal: forall _ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H10. exact (proj1 (BDDneg_2_lemma m (fst (BDDneg_2 (bs, (share, counter)) l m)) r H4 H10 H9)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r *) (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply nodes_preserved_2 with (cfg := (bs, (share, counter))). cut (r = high (bs, (share, counter)) node). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H10. rewrite H10. apply high_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold high in |- *. rewrite H0. reflexivity. unfold nodes_preserved in |- *. assumption. (* Goal: forall _ : is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r, lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H9. cut (config_node_OK (bs, (share, counter)) (high (bs, (share, counter)) node)). (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H10. unfold high in H10. rewrite H0 in H10. elim H10. intro H11. inversion H9. (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: forall _ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)))) true), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) inversion H12. inversion H13. rewrite H11 in H14. rewrite (config_OK_zero (fst (BDDneg_2 (bs, (share, counter)) l m)) H4) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) cfg')) true *) in H14; discriminate. (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H11. elim H11; intro. inversion H9. inversion H13. inversion H14. rewrite H12 in H15. rewrite (config_OK_one (fst (BDDneg_2 (bs, (share, counter)) l m)) H4) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map ad) cfg')) true *) in H15; discriminate. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) elim (option_sum _ (MapGet _ (fst (bs, (share, counter))) r)). intro y. elim y. (* Goal: forall (a : BDDvar) (b : prod ad ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) a b))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro x0. elim x0. intro y0. intro y1. elim y1. intros y2 y3 y4. cut (var (fst (BDDneg_2 (bs, (share, counter)) l m)) r = var (bs, (share, counter)) r). (* Goal: lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r) (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) r) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) intro H13. rewrite H13. apply lt_trans_1 with (y := nat_of_N (var (bs, (share, counter)) node)). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S m) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) replace r with (high (bs, (share, counter)) node). apply BDDcompare_lt. apply BDDvar_ordered_high. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. split with x; split with l; split with r; assumption. unfold high in |- *. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H0. split with y0; split with y2; split with y3; assumption. unfold high in |- *; rewrite H0; reflexivity. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) rewrite <- H2; assumption. unfold var in |- *. rewrite y4. rewrite (H5 y0 y2 y3 r y4). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) reflexivity. intro y. unfold in_dom in H12. rewrite y in H12; discriminate. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply high_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply BDDneg_2_lemma. assumption. replace l with (low (bs, (share, counter)) node). (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply low_OK. assumption. split with x; split with l; split with r; assumption. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) unfold low in |- *; rewrite H0; reflexivity. intro H4. apply lt_trans_1 with (y := nat_of_N (var (bs, (share, counter)) node)). (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)) (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) *) (* Goal: lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S m) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) apply BDDcompare_lt. replace l with (low (bs, (share, counter)) node). apply BDDvar_ordered_low. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. split with x. split with l. split with r. assumption. unfold low in |- *. (* Goal: @eq BDDvar y0 y0 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) r) (@None (prod BDDvar (prod ad ad))), lt (N.to_nat (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r)) m *) (* Goal: config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) (high (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (and (forall (x0 : BDDvar) (l0 r0 a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0)))) (and (forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l, and (is_internal_node (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (@eq BDDvar (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l) (var (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) (@snd BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m))) (bool_fun_neg (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l)))))) *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) n *) rewrite H0. assumption. unfold low in |- *; rewrite H0; reflexivity. rewrite <- H2; assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro; assumption. Qed. Lemma nodes_preserved_1 : forall (cfg : BDDconfig) (node : ad) (n m : nat) (x : BDDvar) (l r : ad), BDDconfig_OK cfg -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> n = S m -> nat_of_N (var cfg node) < n -> nodes_preserved (fst (BDDneg_2 (fst (BDDneg_2 cfg l m)) r m)) (fst (BDDneg_2 cfg node n)). Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg. intros bs y. elim y; clear y; intros share counter. (* Goal: nodes_preserved (@fst BDDconfig ad (BDDneg_2 (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) l m)) r m)) (@fst BDDconfig ad (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S m))) *) intros node n m x l r H H0 H1 H2. rewrite H1. simpl in |- *. simpl in H0. rewrite H0. apply BDDmake_preserves_nodes. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) apply BDDneg_2_config_OK_lemma_2 with (node := node) (x := x) (n := n). assumption. assumption. (* Goal: @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node') *) (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) assumption. assumption. Qed. Lemma BDDneg_memo_OK_lemma_1_4' : forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad), BDDconfig_OK cfg -> BDDneg_memo_OK_2 cfg memo -> config_node_OK cfg node -> BDDneg_memo_lookup memo node = Some node' -> config_node_OK cfg node'. Proof. (* Goal: forall (cfg : BDDconfig) (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : BDDneg_memo_OK_2 cfg memo) (_ : config_node_OK cfg node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK cfg node' *) intro cfg. elim cfg; clear cfg; intros bs y; elim y; clear y; intros share counter. (* Goal: forall (memo : BDDneg_memo) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter))) (_ : BDDneg_memo_OK_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) memo) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (_ : @eq (option ad) (BDDneg_memo_lookup memo node) (@Some ad node')), config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node' *) intros memo node node' H H0 H1 H2. unfold BDDneg_memo_OK_2 in H0. cut (config_node_OK (bs, (share, counter)) node /\ BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))) = (bs, (share, counter), node')). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H3. cut (config_node_OK (fst (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node))))) (snd (BDDneg_2 (bs, (share, counter)) node (S (nat_of_N (var (bs, (share, counter)) node)))))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) intro H4. rewrite (proj2 H3) in H4. exact H4. cut (is_internal_node (bs, (share, counter)) node -> nat_of_N (var (bs, (share, counter)) node) < S (nat_of_N (var (bs, (share, counter)) node))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, lt (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) (* Goal: and (config_node_OK (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node) (@eq (prod BDDconfig ad) (BDDneg_2 (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node)))) (@pair (prod BDDstate (prod BDDsharing_map ad)) ad (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node')) *) intro H4. exact (proj1 (proj2 (proj2 (proj2 (BDDneg_2_lemma (S (nat_of_N (var (bs, (share, counter)) node))) (bs, (share, counter)) node H H1 H4))))). (* Goal: forall _ : is_internal_node (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node, le (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) (S (N.to_nat (var (@pair BDDstate (prod BDDsharing_map ad) bs (@pair BDDsharing_map ad share counter)) node))) *) intro H4. unfold lt in |- *. apply le_n. apply H0. assumption. unfold lt in |- *. intro H3. apply le_n. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import BDDvar_ad_nat. Require Import bdd1. Require Import bdd2. Require Import bdd3. Require Import bdd4. Require Import bdd5_1. Require Import bdd5_2. Require Import bdd6. Require Import bdd7. Lemma BDDdummy_lemma_3 : forall bound : nat, (forall m : nat, m < bound -> forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < m) -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 m)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 m)) (snd (snd (BDDor_1 cfg memo node1 node2 m))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 m)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 m)) (fst (snd (BDDor_1 cfg memo node1 node2 m)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) -> forall (cfg : BDDconfig) (node1 node2 : ad) (memo : BDDor_memo), BDDconfig_OK cfg -> BDDor_memo_OK cfg memo -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> (is_internal_node cfg node1 -> is_internal_node cfg node2 -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound) -> BDDor_memo_lookup memo node1 node2 = None -> in_dom (BDDvar * (ad * ad)) node1 (fst cfg) = true -> node2 = BDDone \/ in_dom (BDDvar * (ad * ad)) node2 (fst cfg) = true -> is_internal_node cfg node1 -> in_dom (BDDvar * (ad * ad)) node2 (fst cfg) = true -> is_internal_node cfg node2 -> forall bound' : nat, bound = S bound' -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2)) < bound -> BDDcompare (var cfg node1) (var cfg node2) = Datatypes.Lt -> BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound)) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. intros bound H cfg node1 node2 memo H0 H1 H2 H3 H4 y H5 H6 H8 H9 H7 bound' y0 H10 y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) cut (config_node_OK cfg (low cfg node1)). (* Goal: forall _ : config_node_OK cfg (low cfg node1), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (config_node_OK cfg (low cfg node2)). (* Goal: forall (_ : config_node_OK cfg (low cfg node2)) (_ : config_node_OK cfg (low cfg node1)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (config_node_OK cfg (high cfg node1)). (* Goal: forall (_ : config_node_OK cfg (high cfg node1)) (_ : config_node_OK cfg (low cfg node2)) (_ : config_node_OK cfg (low cfg node1)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (config_node_OK cfg (high cfg node2)). (* Goal: forall (_ : config_node_OK cfg (high cfg node2)) (_ : config_node_OK cfg (high cfg node1)) (_ : config_node_OK cfg (low cfg node2)) (_ : config_node_OK cfg (low cfg node1)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H11 H12 H13 H14. cut (is_internal_node cfg node1 -> is_internal_node cfg (low cfg node2) -> max (nat_of_N (var cfg node1)) (nat_of_N (var cfg (low cfg node2))) < bound'). (* Goal: forall _ : forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound', and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H15. cut (BDDconfig_OK (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) /\ BDDor_memo_OK (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) /\ config_node_OK (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) /\ nodes_preserved cfg (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) /\ BDDvar_le (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2))) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))). (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H16. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H16; clear H16; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H17; clear H17; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H18; clear H18; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H19; clear H19; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H20; clear H20; intros. cut (config_node_OK (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1). (* Goal: forall _ : config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H22. cut (config_node_OK (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)). (* Goal: forall _ : config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H23. cut (is_internal_node (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 -> is_internal_node (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) -> max (nat_of_N (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (nat_of_N (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) < bound'). (* Goal: forall _ : forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound', and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H24. cut (BDDconfig_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) /\ BDDor_memo_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) /\ config_node_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) /\ nodes_preserved (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) /\ BDDvar_le (var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))). (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H25. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H25; clear H25; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H26; clear H26; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H27; clear H27; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H28; clear H28; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H29; clear H29; intros. cut (config_node_OK (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))). (* Goal: forall _ : config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H31. cut (is_internal_node (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) -> BDDcompare (var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2) = Datatypes.Lt). (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H32. cut (is_internal_node (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) -> BDDcompare (var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2) = Datatypes.Lt). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H33. cut (BDDconfig_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) /\ (Neqb (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) = false -> MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) = Some (var cfg node2, (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')), fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) /\ (Neqb (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) = true -> snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) = fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) /\ (forall (a l' r' : ad) (x' : BDDvar), (MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a = Some (x', (l', r')) \/ snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) = a) /\ (MapGet _ (fst (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a = Some (x', (l', r')) -> MapGet _ (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a = Some (x', (l', r')))) /\ node_OK (fst (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1), @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H34. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H34; clear H34; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H35; clear H35; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H36; clear H36; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim H37; clear H37; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (BDDconfig_OK (fst (BDDor_1 cfg memo node1 node2 bound))). (* Goal: forall _ : BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H39. cut (config_node_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))). (* Goal: forall _ : config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H40. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (nodes_preserved cfg (fst (BDDor_1 cfg memo node1 node2 bound))). (* Goal: forall _ : nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H41. cut (BDDvar_le (var (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2)) = true). (* Goal: forall _ : @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true, and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H42. cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 node2 bound)) (fst (snd (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)), and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H43. cut (BDDor_memo_OK (fst (BDDor_1 cfg memo node1 node2 bound)) (snd (snd (BDDor_1 cfg memo node1 node2 bound)))). (* Goal: forall (_ : @eq ad node2 node2') (_ : @eq ad node1 node1') (_ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some ad node)), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H44. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in |- *. (* Goal: forall (node3 node4 node : ad) (_ : @eq (option ad) (BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) node3 node4) (@Some ad node)), and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node3) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) node4)))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros node1' node2' node. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. rewrite (BDDor_memo_lookup_semantics (snd (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (snd (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' node2') . (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) elim (sumbool_of_bool (Neqb node1 node1' && Neqb node2 node2')); intro y2. (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite y2. (* Goal: forall _ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (node1 = node1'). (* Goal: forall (_ : @eq ad node1 node1') (_ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some ad node)), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) cut (node2 = node2'). (* Goal: forall (_ : @eq ad node2 node2') (_ : @eq ad node1 node1') (_ : @eq (option ad) (@Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some ad node)), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H44. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node), @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H45. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1'), @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H46. (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) injection H46. (* Goal: forall _ : @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node, and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) clear H46; intros. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2'), @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H47. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'). (* Goal: forall _ : config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2', and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H48. cut (config_node_OK (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node). (* Goal: forall _ : config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node, and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H49. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H44; rewrite <- H45. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1 = var cfg node1). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1), @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H50. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H50. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2 = var cfg node2). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2) (var cfg node2), @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var cfg node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H51. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var cfg node1) (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H51. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H46. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H42. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in H42. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2) (var cfg node2) *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H42. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H41. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (var cfg node1) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in H39; exact H41. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H44; rewrite <- H45. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H46. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H43. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1) (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2)) *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in H43; exact H43. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H41. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H41. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H46. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H38. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H44. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). apply nodes_preserved_2 with (cfg := fst (BDDor_1 cfg memo node1 (low cfg node2) bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- H45. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: is_internal_node cfg node1 *) assumption. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1) in H41. (* Goal: nodes_preserved cfg (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: @eq ad node2 node2' *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H41. (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node2 node2') true *) (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj2 (andb_prop (Neqb node1 node1') (Neqb node2 node2') y2)). (* Goal: @eq ad node1 node1' *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply Neqb_complete. (* Goal: @eq bool (N.eqb node1 node1') true *) (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (andb_prop (Neqb node1 node1') (Neqb node2 node2') y2)). (* Goal: forall _ : @eq (option ad) (if andb (N.eqb node1 node1') (N.eqb node2 node2') then @Some ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) else BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite y2. (* Goal: forall _ : @eq (option ad) (BDDor_memo_lookup (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1' node2') (@Some ad node), and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (and (config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H44. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (H26 node1' node2' node H44)). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (H26 node1' node2' node H44))). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. apply nodes_preserved_2 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (@eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node = var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node), @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H45. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H45. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1' = var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1'), @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H46. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H46. cut (var (fst (BDDmake (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2' = var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2'). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2'), @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H47. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H47. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2'))) true *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (proj2 (proj2 (H26 node1' node2' node H44))))). (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (H26 node1' node2' node H44))). (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) apply BDDmake_preserves_nodes; assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: @eq BDDvar (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDor_memo_OK in H26. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (H26 node1' node2' node H44)). apply nodes_preserved_var_1 with (cfg := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (proj2 (H26 node1' node2' node H44)))). apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2')). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2')) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2')) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node1') (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2')) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj2 (proj2 (proj2 (proj2 (H26 node1' node2' node H44))))). (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node1' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) node2') (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2') *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (H26 node1' node2' node H44)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) node2' *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact (proj1 (proj2 (H26 node1' node2' node H44))). apply bool_fun_eq_trans with (bf2 := bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))). rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_if (var cfg node2) (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_of_BDD (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (bool_fun_if (var cfg node2) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))))) (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_bool_fun. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))))) (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_3. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))). (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (high cfg node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) *) (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_if_lemma_3. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2)))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node1) *) (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold bool_fun_eq in |- *. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) reflexivity. (* Goal: bool_fun_eq (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) (bool_fun_of_BDD cfg node2) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_eq_symm. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node2) (bool_fun_if (var cfg node2) (bool_fun_of_BDD cfg (high cfg node2)) (bool_fun_of_BDD cfg (low cfg node2))) *) (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply bool_fun_if_lemma_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold BDDvar_le in |- *. (* Goal: @eq bool (Nleb (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)))) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply Nleb_trans with (b := var cfg node2). (* Goal: @eq bool (Nleb (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) fold BDDvar_le in |- *. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. (* Goal: @eq bool (BDDvar_le (var (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (var cfg node2)) true *) (* Goal: @eq bool (Nleb (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_var_order. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq bool (Nleb (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) fold BDDvar_le in |- *. (* Goal: @eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_le_max_2. apply nodes_preserved_trans with (cfg2 := fst (BDDor_1 cfg memo node1 (low cfg node2) bound')). (* Goal: is_internal_node cfg node1 *) assumption. apply nodes_preserved_trans with (cfg2 := fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')). (* Goal: is_internal_node cfg node1 *) assumption. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. (* Goal: nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_preserves_nodes. (* Goal: is_internal_node cfg node1 *) assumption. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. (* Goal: config_node_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 node2 bound)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H38. rewrite (BDDor_1_lemma_internal_2 cfg memo node1 node2 bound bound' y H0 H8 H7 H10 y0 y1). (* Goal: BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (@pair BDDconfig (prod ad (Map (Map ad))) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@pair ad (Map (Map ad)) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (BDDor_memo_put (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) node1 node2 (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) simpl in |- *. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) exact H34. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) false, @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) (var cfg node2) (@pair ad ad (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))) (and (forall _ : @eq bool (N.eqb (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) true, @eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (forall (a l' r' : ad) (x' : BDDvar), and (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), or (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))) (@eq ad (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))) a)) (forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))))) (node_OK (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))))) (@snd BDDconfig ad (BDDmake (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (var cfg node2) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))))))))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDmake_semantics. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl (var cfg node2)) Lt *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros xl ll rl H34. cut (xl = var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))). (* Goal: forall _ : @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H35. (* Goal: @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H35. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply H32. (* Goal: is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with xl. (* Goal: @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad l r))))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with ll. (* Goal: @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll r)))) *) (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with rl. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar xl (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold var in |- *. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H34. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) reflexivity. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros xr lr rr H34. cut (xr = var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))). (* Goal: forall _ : @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H35. (* Goal: @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H35. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply H33. (* Goal: is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with xr. (* Goal: @ex ad (fun l : ad => @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad l r))))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with lr. (* Goal: @ex ad (fun r : ad => @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr r)))) *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) split with rr. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar xl xl *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map ad) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) unfold var in |- *; rewrite H34; reflexivity. (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H33. apply BDDcompare_le_INFERIEUR_1 with (y := BDDvar_max (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))). (* Goal: is_internal_node cfg node1 *) assumption. cut (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 = var cfg node1). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1), @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H34. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H34. cut (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) = var cfg (high cfg node2)). (* Goal: @eq comparison (BDDcompare xr (var cfg node2)) Lt *) (* Goal: @eq BDDvar xr (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro; rewrite H35. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg node1) (var cfg (high cfg node2))) (var cfg node2)) Lt *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)) (var cfg (high cfg node2)) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_ordered_high_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: forall _ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H32. cut (var (fst (BDDor_1 (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (snd (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound'))) = var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (fst (snd (BDDor_1 cfg memo node1 (low cfg node2) bound')))). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))), @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro H33. (* Goal: @eq comparison (BDDcompare (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var cfg node2)) Lt *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (and (nodes_preserved (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (BDDvar_max (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) node1 (high cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite H33. apply BDDcompare_le_INFERIEUR_1 with (y := BDDvar_max (var cfg node1) (var cfg (low cfg node2))). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg node1) (var cfg (low cfg node2))) (var cfg node2)) Lt *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_ordered_low_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. apply nodes_preserved_2 with (cfg := fst (BDDor_1 cfg memo node1 (low cfg node2) bound')). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply H. (* Goal: lt bound' bound *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDor_memo_OK cfg memo *) (* Goal: config_node_OK cfg node1 *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite y0; unfold lt in |- *; apply le_n. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: forall (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (_ : is_internal_node (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H24 H25. cut (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 = var cfg node1). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1), lt (max (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro; rewrite H26. cut (var (fst (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) = var cfg (high cfg node2)). (* Goal: forall _ : @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)) (var cfg (high cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)))) bound' *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)) (var cfg (high cfg node2)) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intro; rewrite H27. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply lt_trans_1 with (y := nat_of_N (var cfg node2)). (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) (N.to_nat (var cfg node2)) *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply lt_max_nat_of_N. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg node1) (var cfg (high cfg node2))) (var cfg node2)) Lt *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2)) (var cfg (high cfg node2)) *) (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_ordered_high_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- y0. apply le_lt_trans with (m := max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))). (* Goal: le (N.to_nat (var cfg node2)) (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply le_nat_of_N_max. (* Goal: @eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_le_max_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: @eq BDDvar (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1) (var cfg node1) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (high cfg node2) *) (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_var_1. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) node1 *) (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply nodes_preserved_2 with (cfg := cfg). (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (BDDor_memo_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@snd ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (config_node_OK (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (and (nodes_preserved cfg (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound'))) (and (@eq bool (BDDvar_le (var (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (BDDvar_max (var cfg node1) (var cfg (low cfg node2)))) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')) (@fst ad BDDor_memo (@snd BDDconfig (prod ad BDDor_memo) (BDDor_1 cfg memo node1 (low cfg node2) bound')))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg (low cfg node2)))))))) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply H. (* Goal: lt bound' bound *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDor_memo_OK cfg memo *) (* Goal: config_node_OK cfg node1 *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite y0; unfold lt in |- *; apply le_n. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: forall (_ : is_internal_node cfg node1) (_ : is_internal_node cfg (low cfg node2)), lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) intros H15 H16. (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) bound' *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply lt_trans_1 with (y := nat_of_N (var cfg node2)). (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg (low cfg node2)))) (N.to_nat (var cfg node2)) *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply lt_max_nat_of_N. (* Goal: @eq comparison (BDDcompare (BDDvar_max (var cfg node1) (var cfg (low cfg node2))) (var cfg node2)) Lt *) (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_ordered_low_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: lt (N.to_nat (var cfg node2)) (S bound') *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) rewrite <- y0. apply le_lt_trans with (m := max (nat_of_N (var cfg node1)) (nat_of_N (var cfg node2))). (* Goal: le (N.to_nat (var cfg node2)) (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply le_nat_of_N_max. (* Goal: @eq bool (BDDvar_le (var cfg node2) (BDDvar_max (var cfg node1) (var cfg node2))) true *) (* Goal: lt (max (N.to_nat (var cfg node1)) (N.to_nat (var cfg node2))) bound *) (* Goal: config_node_OK cfg (high cfg node2) *) (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply BDDvar_le_max_2. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply high_OK. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK cfg (high cfg node1) *) (* Goal: config_node_OK cfg (low cfg node2) *) (* Goal: config_node_OK cfg (low cfg node1) *) apply high_OK. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK cfg (low cfg node1) *) apply low_OK. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: config_node_OK cfg (low cfg node1) *) apply low_OK. (* Goal: is_internal_node cfg node1 *) assumption. (* Goal: is_internal_node cfg node1 *) assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* This contribution was updated for Coq V5.10 by the COQ workgroup. *) (* January 1995 *) (****************************************************************************) (* *) (* Coq V5.8 *) (* *) (* *) (* Ramsey Theory *) (* *) (* Marc Bezem *) (* Utrecht University *) (* *) (* June 1993 *) (* *) (* *) (* *) (* For dimension one, the Infinite Ramsey Theorem states that, *) (* for any subset A of the natural numbers nat, either A or nat\A *) (* is infinite. This special case of the Pigeon Hole Principle *) (* is classically equivalent to: *) (* if A and B are both co-finite, then so is their intersection. *) (* None of these principles is constructively valid. In [VB] the notion *) (* of an almost full set is introduced, classically equivalent *) (* to co-finiteness, for which closure under finite intersection can *) (* be proved constructively. A is almost full if for every (strictly) *) (* increasing sequence f: nat -> nat there exists an x in nat such *) (* that f(x) in A. The notion of almost full and its closure under *) (* finite intersection are generalized to all finite dimensions, *) (* yielding constructive Ramsey Theorems. The proofs for dimension *) (* two and higher essentially use Brouwer's Bar Theorem. *) (* *) (* In the proof development below we strengthen the notion of almost full *) (* for dimension one in the following sense. A: nat -> Prop is called *) (* Y-full if for every (strictly) increasing sequence f: nat -> nat *) (* we have (A (f (Y f))). Here of course Y : (nat -> nat) -> nat. *) (* Given YA-full A and YB-full B we construct X from YA and YB *) (* such that the intersection of A and B is X-full. *) (* This is essentially [VB, Th. 5.4], but now it *) (* can be done without using axioms, using only inductive types. *) (* The generalization to higher dimensions will be much more *) (* difficult and is not pursued here. *) (* *) (* [VB] Wim Veldman and Marc Bezem, Ramsey's Theorem and the Pigeon Hole *) (* Principle in intuitionistic mathematics, Journal of the London *) (* Mathematical Society (2), Vol. 47, April 1993, pp. 193-211. *) (* *) (* *) (****************************************************************************) (* Ramsey.v *) (****************************************************************************) Require Import Lt. Require Import Plus. Definition increasing (f : nat -> nat) := forall x y : nat, x < y -> f x < f y. Lemma compose_increasing : forall f g : nat -> nat, increasing f -> increasing g -> increasing (fun x : nat => f (g x)). (* Goal: forall (f g : forall _ : nat, nat) (_ : increasing f) (_ : increasing g), increasing (fun x : nat => f (g x)) *) unfold increasing in |- *; auto with arith. Qed. Hint Resolve compose_increasing. Lemma increasingbystep : forall f : nat -> nat, (forall n : nat, f n < f (S n)) -> increasing f. (* Goal: forall (f : forall _ : nat, nat) (_ : forall n : nat, lt (f n) (f (S n))), increasing f *) unfold increasing in |- *; intros f i x y ltxy. (* Goal: lt (f x) (f y) *) elim ltxy; trivial with arith. (* Goal: forall (m : nat) (_ : le (S x) m) (_ : lt (f x) (f m)), lt (f x) (f (S m)) *) intros; apply lt_trans with (f m); auto with arith. Qed. (* A is Y-full : (full A Y) *) Definition full (A : nat -> Prop) (Y : (nat -> nat) -> nat) := forall f : nat -> nat, increasing f -> A (f (Y f)). Definition enumerate (Y : (nat -> nat) -> nat) := (fix F (x : nat) : nat := match x return nat with | O => (* O *) Y (fun n : nat => n) (* S y *) | S y => Y (fun n : nat => n + S (F y)) + S (F y) end). Lemma increasing_enumerate : forall Y : (nat -> nat) -> nat, increasing (enumerate Y). (* Goal: forall Y : forall _ : forall _ : nat, nat, nat, increasing (enumerate Y) *) intro; apply increasingbystep; unfold enumerate in |- *; auto with arith. Qed. Section dimension_one. Variable A : nat -> Prop. Variable YA : (nat -> nat) -> nat. Definition FYA (x n : nat) := n + S (enumerate YA x). Lemma increasing_FYA : forall x : nat, increasing (FYA x). (* Goal: forall x : nat, increasing (FYA x) *) unfold increasing, FYA in |- *. (* Goal: forall (x x0 y : nat) (_ : lt x0 y), lt (Nat.add x0 (S (enumerate YA x))) (Nat.add y (S (enumerate YA x))) *) intros; apply plus_lt_compat_r; trivial with arith. Qed. Hint Resolve increasing_FYA. Lemma enumerate_YA : full A YA -> forall x : nat, A (enumerate YA x). (* Goal: forall (_ : full A YA) (x : nat), A (enumerate YA x) *) intro YAfull; unfold enumerate in |- *; simple induction x. (* Goal: A (YA (fun n : nat => n)) *) (* Goal: forall (n : nat) (_ : A ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n)), A (Nat.add (YA (fun n0 : nat => Nat.add n0 (S ((fix F (x : nat) : nat := match x with | O => YA (fun n1 : nat => n1) | S y => Nat.add (YA (fun n1 : nat => Nat.add n1 (S (F y)))) (S (F y)) end) n)))) (S ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n))) *) apply (YAfull (fun n : nat => n)). (* Goal: increasing (fun n : nat => n) *) (* Goal: forall (n : nat) (_ : A ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n)), A (Nat.add (YA (fun n0 : nat => Nat.add n0 (S ((fix F (x : nat) : nat := match x with | O => YA (fun n1 : nat => n1) | S y => Nat.add (YA (fun n1 : nat => Nat.add n1 (S (F y)))) (S (F y)) end) n)))) (S ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n))) *) unfold increasing in |- *; trivial with arith. (* Goal: forall (n : nat) (_ : A ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n)), A (Nat.add (YA (fun n0 : nat => Nat.add n0 (S ((fix F (x : nat) : nat := match x with | O => YA (fun n1 : nat => n1) | S y => Nat.add (YA (fun n1 : nat => Nat.add n1 (S (F y)))) (S (F y)) end) n)))) (S ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) n))) *) intros y H. (* Goal: A (Nat.add (YA (fun n : nat => Nat.add n (S ((fix F (x : nat) : nat := match x with | O => YA (fun n0 : nat => n0) | S y => Nat.add (YA (fun n0 : nat => Nat.add n0 (S (F y)))) (S (F y)) end) y)))) (S ((fix F (x : nat) : nat := match x with | O => YA (fun n : nat => n) | S y => Nat.add (YA (fun n : nat => Nat.add n (S (F y)))) (S (F y)) end) y))) *) change (A (FYA y (YA (FYA y)))) in |- *. (* Goal: A (FYA y (YA (FYA y))) *) apply YAfull; auto with arith. Qed. Variable B : nat -> Prop. Variable YB : (nat -> nat) -> nat. Lemma YB_enumerate_YA : full B YB -> B (enumerate YA (YB (enumerate YA))). (* Goal: forall _ : full B YB, B (enumerate YA (YB (enumerate YA))) *) intro YBfull. (* Goal: B (enumerate YA (YB (enumerate YA))) *) apply YBfull. (* Goal: increasing (enumerate YA) *) apply increasing_enumerate. Qed. Lemma pre_Ramsey1 : full A YA -> full B YB -> A (enumerate YA (YB (enumerate YA))) /\ B (enumerate YA (YB (enumerate YA))). (* Goal: forall (_ : full A YA) (_ : full B YB), and (A (enumerate YA (YB (enumerate YA)))) (B (enumerate YA (YB (enumerate YA)))) *) intros YAfull YBfull; split. (* Goal: A (enumerate YA (YB (enumerate YA))) *) (* Goal: B (enumerate YA (YB (enumerate YA))) *) apply enumerate_YA; trivial with arith. (* Goal: B (enumerate YA (YB (enumerate YA))) *) apply YB_enumerate_YA; trivial with arith. Qed. End dimension_one. Definition inter (A B : nat -> Prop) (n : nat) := A n /\ B n. Definition combine (YA YB : (nat -> nat) -> nat) (f : nat -> nat) := enumerate (fun g : nat -> nat => YA (fun x : nat => f (g x))) ((fun g : nat -> nat => YB (fun x : nat => f (g x))) (enumerate (fun g : nat -> nat => YA (fun x : nat => f (g x))))). Theorem Ramsey1 : forall (A B : nat -> Prop) (YA YB : (nat -> nat) -> nat), full A YA -> full B YB -> full (inter A B) (combine YA YB). (* Goal: forall (A B : forall _ : nat, Prop) (YA YB : forall _ : forall _ : nat, nat, nat) (_ : full A YA) (_ : full B YB), full (inter A B) (combine YA YB) *) unfold full, inter, combine in |- *; intros A B YA YB FAYA FBYB f If. apply (pre_Ramsey1 (fun x : nat => A (f x)) (fun g : nat -> nat => YA (fun x : nat => f (g x))) (fun x : nat => B (f x)) (fun g : nat -> nat => YB (fun x : nat => f (g x)))); unfold full in |- *; intros g Ig. (* Goal: A (f (g (YA (fun x : nat => f (g x))))) *) (* Goal: B (f (g (YB (fun x : nat => f (g x))))) *) apply (FAYA (fun x : nat => f (g x))); auto with arith. (* Goal: B (f (g (YB (fun x : nat => f (g x))))) *) apply (FBYB (fun x : nat => f (g x))); auto with arith. Qed.
Require Import Bool. Require Import Arith. Require Import Compare_dec. Require Import Peano_dec. Require Import General. Require Import MyList. Require Import MyRelations. Require Export Main. Require Export SortECC. Section ECC. Definition trm_ecc := term srt_ecc. Definition env_ecc := env srt_ecc. (* Construction du CTS *) Definition ecc : CTS_spec srt_ecc := Build_CTS_spec _ axiom_ecc rules_ecc univ_ecc (beta_delta_rule _). (* Construction du PTS issu du CTS *) Definition ecc_pts : PTS_sub_spec srt_ecc := cts_pts_functor _ ecc. Definition le_type : red_rule srt_ecc := Rule _ (Le_type _ (pts_le_type _ ecc_pts)). Definition typ_ecc : env_ecc -> trm_ecc -> trm_ecc -> Prop := typ _ ecc_pts. Definition wft_ecc : env_ecc -> trm_ecc -> Prop := wf_type _ ecc_pts. Definition wf_ecc : env_ecc -> Prop := wf _ ecc_pts. Definition ecc_sn := sn srt_ecc (ctxt _ (Rule _ (head_reduct _ ecc))). Hint Unfold le_type typ_ecc wft_ecc wf_ecc ecc_sn: pts. (* Algorithme de mise en forme normale de tete Decidabilite du sous-typage pour les types bien formes *) Lemma whnf : forall (e : env_ecc) (t : trm_ecc), ecc_sn e t -> {u : trm_ecc | red _ (beta_delta _) e t u & head_normal _ (beta_delta _) e u}. Proof beta_delta_whnf srt_ecc. Lemma bd_conv_hnf : forall (e : env_ecc) (x y : trm_ecc), ecc_sn e x -> ecc_sn e y -> decide (conv_hn_inv _ (beta_delta_rule _) e x y). Proof CR_WHNF_convert_hn srt_ecc ecc_sort_dec (beta_delta_rule srt_ecc) (church_rosser_beta_delta srt_ecc) whnf. Theorem ecc_is_subtype_dec : subtype_dec_CTS _ ecc. (* Goal: subtype_dec_CTS srt_ecc ecc *) apply Build_subtype_dec_CTS. (* Goal: church_rosser srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) *) (* Goal: forall (e : env srt_ecc) (s : srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Srt srt_ecc s) *) (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact (church_rosser_beta_delta srt_ecc). (* Goal: forall (e : env srt_ecc) (s : srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Srt srt_ecc s) *) (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact (bd_hn_sort srt_ecc). (* Goal: forall (e : env srt_ecc) (A B : term srt_ecc), head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e (Prod srt_ecc A B) *) (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact (bd_hn_prod srt_ecc). (* Goal: forall (e : env srt_ecc) (t : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e t), @sig2 (term srt_ecc) (fun u : term srt_ecc => red srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e t u) (fun u : term srt_ecc => head_normal srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc)) e u) *) (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact whnf. (* Goal: forall (e : env srt_ecc) (x y : term srt_ecc) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e x) (_ : sn srt_ecc (ctxt srt_ecc (Rule srt_ecc (head_reduct srt_ecc ecc))) e y), decide (conv_hn_inv srt_ecc (head_reduct srt_ecc ecc) e x y) *) (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact bd_conv_hnf. (* Goal: forall s s' : srt_ecc, decide (clos_refl_trans srt_ecc (universes srt_ecc ecc) s s') *) exact univ_ecc_dec. Qed. (* L'axiome: ECC est fortement normalisant *) Axiom ecc_normalise : forall (e : env_ecc) (t T : trm_ecc), typ_ecc e t T -> ecc_sn e t. (* Subject-Reduction *) Lemma sound_ecc_bd : rule_sound _ ecc_pts (beta_delta _). (* Goal: rule_sound srt_ecc ecc_pts (beta_delta srt_ecc) *) unfold beta_delta in |- *. (* Goal: product_inversion srt_ecc (Rule srt_ecc (Le_type srt_ecc (pts_le_type srt_ecc ecc_pts))) *) (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) simpl in |- *. (* Goal: rule_sound srt_ecc ecc_pts (reunion srt_ecc (beta srt_ecc) (delta srt_ecc)) *) unfold union in |- *. (* Goal: rule_sound srt_ecc ecc_pts (reunion srt_ecc (beta srt_ecc) (delta srt_ecc)) *) apply union_sound. (* Goal: rule_sound srt_ecc ecc_pts (beta srt_ecc) *) (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) apply beta_sound; auto with arith pts. (* Goal: product_inversion srt_ecc (Rule srt_ecc (Le_type srt_ecc (pts_le_type srt_ecc ecc_pts))) *) (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) simpl in |- *. (* Goal: product_inversion srt_ecc (R_rt srt_ecc (cumul srt_ecc ecc)) *) (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) apply cumul_inv_prod. (* Goal: subtype_dec_CTS srt_ecc ecc *) (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) exact ecc_is_subtype_dec. (* Goal: rule_sound srt_ecc ecc_pts (delta srt_ecc) *) apply delta_sound. Qed. Lemma ecc_is_norm_sound : norm_sound_CTS _ ecc. Proof. (* Goal: norm_sound_CTS srt_ecc ecc *) refine (Build_norm_sound_CTS srt_ecc ecc sound_ecc_bd ecc_normalise _ _ _). (* Goal: forall s : srt_ecc, @ppal_dec srt_ecc (cts_axiom srt_ecc ecc s) (clos_refl_trans srt_ecc (universes srt_ecc ecc)) *) (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) left. (* Goal: @sig srt_ecc (fun x : srt_ecc => @ppal srt_ecc (cts_axiom srt_ecc ecc s) (clos_refl_trans srt_ecc (universes srt_ecc ecc)) x) *) (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) apply ecc_inf_axiom. (* Goal: forall x1 x2 : srt_ecc, @sig2 srt_ecc (fun x3 : srt_ecc => cts_rules srt_ecc ecc x1 x2 x3) (fun x3 : srt_ecc => forall (s1 s2 s3 : srt_ecc) (_ : cts_rules srt_ecc ecc s1 s2 s3) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x1 s1) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) x2 s2), clos_refl_trans srt_ecc (universes srt_ecc ecc) x3 s3) *) (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) exact ecc_inf_rule. (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) intros. (* Goal: forall (s1 s2 : srt_ecc) (_ : clos_refl_trans srt_ecc (universes srt_ecc ecc) s1 s2) (_ : typed_sort srt_ecc (cts_axiom srt_ecc ecc) s2), typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) elim ecc_inf_axiom with s1; intros. (* Goal: typed_sort srt_ecc (cts_axiom srt_ecc ecc) s1 *) split with x. (* Goal: cts_axiom srt_ecc ecc s1 x *) apply (pp_ok p). Qed. (* Construction du type-checker *) Theorem ecc_algorithms : PTS_TC _ ecc_pts. Proof full_cts_type_checker srt_ecc ecc ecc_is_subtype_dec ecc_is_norm_sound. (* open the type-checker *) Lemma infer_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> infer_ppal_type _ ecc_pts e t. Proof ptc_inf_ppal_type _ _ ecc_algorithms. Lemma check_wf_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> wft_dec _ ecc_pts e t. Proof ptc_chk_wft _ _ ecc_algorithms. Lemma check_type : forall (e : env_ecc) (t T : trm_ecc), wf_ecc e -> check_dec _ ecc_pts e t T. Proof ptc_chk_typ _ _ ecc_algorithms. Lemma add_type : forall (e : env_ecc) (t : trm_ecc), wf_ecc e -> decl_dec _ ecc_pts e (Ax _ t). Proof ptc_add_typ _ _ ecc_algorithms. Lemma add_def : forall (e : env_ecc) (t T : trm_ecc), wf_ecc e -> decl_dec _ ecc_pts e (Def _ t T). Proof ptc_add_def _ _ ecc_algorithms. End ECC.
Require Import General. Require Export Relations. Unset Standard Proposition Elimination Names. Section SortsOfV6. (* Definition des composantes du calcul *) Inductive calc : Set := | Pos : calc | Neg : calc. Inductive srt_v6 : Set := | Sprop : calc -> srt_v6 | Stype : nat -> srt_v6. Inductive axiom_v6 : srt_v6 -> srt_v6 -> Prop := | ax_prop : forall (c : calc) (n : nat), axiom_v6 (Sprop c) (Stype n) | ax_type : forall n m : nat, n < m -> axiom_v6 (Stype n) (Stype m). Inductive rules_v6 : srt_v6 -> srt_v6 -> srt_v6 -> Prop := | rule_prop_l : forall (c : calc) (s : srt_v6), rules_v6 (Sprop c) s s | rule_prop_r : forall (c : calc) (s : srt_v6), rules_v6 s (Sprop c) (Sprop c) | rule_type : forall n m p : nat, n <= p -> m <= p -> rules_v6 (Stype n) (Stype m) (Stype p). Inductive univ_v6 : srt_v6 -> srt_v6 -> Prop := | univ_prop : forall (c : calc) (n : nat), univ_v6 (Sprop c) (Stype n) | univ_type : forall n m : nat, n <= m -> univ_v6 (Stype n) (Stype m). Definition univ : srt_v6 -> srt_v6 -> Prop := clos_refl_trans _ univ_v6. Hint Resolve ax_prop ax_type rule_prop_l rule_prop_r rule_type univ_prop univ_type: pts. Hint Unfold univ: pts. (* Inversion et Decidabilite de l'inclusion entre sortes *) Let univ_trans : forall x y z : srt_v6, univ x y -> univ y z -> univ x z. Proof rt_trans srt_v6 univ_v6. Inductive inv_univ : srt_v6 -> srt_v6 -> Prop := | iu_prop : forall c : calc, inv_univ (Sprop c) (Sprop c) | iu_pr_ty : forall (c : calc) (n : nat), inv_univ (Sprop c) (Stype n) | iu_type : forall n m : nat, n <= m -> inv_univ (Stype n) (Stype m). Hint Resolve iu_prop iu_pr_ty iu_type: pts. Lemma inv_univ_trans : forall x y z : srt_v6, inv_univ x y -> inv_univ y z -> inv_univ x z. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Sprop c) s1) (_ : univ x2 s2), univ x2 s3 *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) simple induction 1; intros; auto with arith pts. (* Goal: @eq calc c c' *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) inversion_clear H0; auto with arith pts. (* Goal: inv_univ (Stype n) z *) inversion_clear H1. (* Goal: inv_univ (Stype n) (Stype m0) *) apply iu_type. (* Goal: le n p *) (* Goal: le n' p *) apply le_trans with m; auto with arith pts. Qed. Lemma univ_inv : forall s s' : srt_v6, univ s s' -> forall P : Prop, (inv_univ s s' -> P) -> P. (* Goal: forall (s s' : srt_v6) (_ : univ s s') (P : Prop) (_ : forall _ : inv_univ s s', P), P *) simple induction 1. (* Goal: forall (x y : srt_v6) (_ : univ_v6 x y) (P : Prop) (_ : forall _ : inv_univ x y, P), P *) (* Goal: forall (x : srt_v6) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) (* Goal: forall (x y z : srt_v6) (_ : clos_refl_trans srt_v6 univ_v6 x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_v6 univ_v6 y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) simple induction 1; auto with arith pts. (* Goal: forall (x : srt_v6) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) (* Goal: forall (x y z : srt_v6) (_ : clos_refl_trans srt_v6 univ_v6 x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_v6 univ_v6 y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) simple destruct x; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) intros. (* Goal: P *) apply H4. (* Goal: inv_univ x z *) apply inv_univ_trans with y. (* Goal: inv_univ x y *) (* Goal: inv_univ y z *) apply H1; auto with arith pts. (* Goal: inv_univ y z *) apply H3; auto with arith pts. Qed. Lemma calc_dec : forall c c' : calc, decide (c = c'). simple destruct c; simple destruct c'; (right; discriminate) || auto with arith pts. Qed. Lemma v6_sort_dec : forall s s' : srt_v6, decide (s = s'). (* Goal: forall s s' : srt_v6, decide (@eq srt_v6 s s') *) simple destruct s; simple destruct s'; intros; try (right; discriminate). (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) elim calc_dec with c c0; intros. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) left; elim a; auto with arith pts. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) elim eq_nat_dec with n n0; intros. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) left; elim a; auto with arith pts. (* Goal: decide (@eq srt_v6 (Stype n) (Stype n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. Qed. Lemma univ_v6_dec : forall s s' : srt_v6, decide (univ s s'). refine (fun s s' : srt_v6 => match s, s' return (decide (univ s s')) with | Sprop c, Sprop c' => _ | Sprop _, Stype _ => left _ _ | Stype n, Stype n' => _ | Stype n, Sprop c => right _ _ end). (* Goal: decide (univ (Sprop c) (Sprop c')) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) case (calc_dec c c'); [ left | right ]. (* Goal: univ (Sprop c) (Sprop c') *) (* Goal: not (univ (Sprop c) (Sprop c')) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) elim e; auto with arith pts. (* Goal: not (univ (Sprop c) (Sprop c')) *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) red in |- *; intro; apply n. (* Goal: @eq calc c c' *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) apply univ_inv with (Sprop c) (Sprop c'); intros; auto with arith pts. (* Goal: @eq calc c c' *) (* Goal: univ (Sprop c) (Stype n) *) (* Goal: not (univ (Stype n) (Sprop c)) *) (* Goal: decide (univ (Stype n) (Stype n')) *) inversion_clear H0; auto with arith pts. (* Goal: univ (Stype n) (Stype n') *) (* Goal: not (univ (Stype n) (Stype n')) *) auto with pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) red in |- *; intros. (* Goal: False *) (* Goal: decide (univ (Stype n) (Stype n')) *) apply univ_inv with (Stype n) (Sprop c); intros; auto with arith pts. (* Goal: False *) inversion_clear H0. (* Goal: decide (univ (Stype n) (Stype n')) *) case (le_gt_dec n n'); [ left | right ]. (* Goal: univ (Stype n) (Stype n') *) (* Goal: not (univ (Stype n) (Stype n')) *) auto with pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) red in |- *; intros. (* Goal: False *) apply univ_inv with (Stype n) (Stype n'); intros; auto with arith pts. (* Goal: False *) inversion_clear H0. (* Goal: False *) absurd (n <= n'); auto with arith pts. Qed. (* Inference des axiomes et regles *) Lemma v6_inf_axiom : forall s : srt_v6, {sp : srt_v6 | ppal (axiom_v6 s) univ sp}. refine (fun s : srt_v6 => match s return {sp : srt_v6 | ppal (axiom_v6 s) univ sp} with | Sprop c => exist _ (Stype 0) _ | Stype n => exist _ (Stype (S n)) _ end). (* Goal: @ppal srt_v6 (axiom_v6 (Stype n)) univ (Stype (S n)) *) split; intros; auto with arith pts. (* Goal: univ (Stype (S n)) y *) inversion_clear H; auto with arith pts. (* Goal: @ppal srt_v6 (axiom_v6 (Stype n)) univ (Stype (S n)) *) split; intros; auto with arith pts. (* Goal: univ (Stype (S n)) y *) inversion_clear H; auto with arith pts. Qed. Lemma v6_inf_rule : forall x1 x2 : srt_v6, {x3 : srt_v6 | rules_v6 x1 x2 x3 & forall s1 s2 s3 : srt_v6, rules_v6 s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3}. refine (fun x1 x2 : srt_v6 => match x1, x2 return {x3 : srt_v6 | rules_v6 x1 x2 x3 & forall s1 s2 s3 : srt_v6, rules_v6 s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3} with | Sprop c, _ => exist2 _ _ x2 _ _ | Stype n, Sprop c' => exist2 _ _ (Sprop c') _ _ | Stype n, Stype n' => exist2 _ _ (Stype (max_nat n n')) _ _ (* Goal: univ (Stype n) (Stype n') *) (* Goal: not (univ (Stype n) (Stype n')) *) end); auto with pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Sprop c) s1) (_ : univ x2 s2), univ x2 s3 *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) simple induction 1; intros; auto with arith pts. (* Goal: univ x2 (Stype p) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) apply univ_trans with (Stype m); auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) intros. (* Goal: univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Sprop c') s2; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) generalize H. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H2; intros. (* Goal: univ (Sprop c') s3 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H2; auto with arith pts. (* Goal: univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Sprop c') s2; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) generalize H. (* Goal: forall _ : rules_v6 s1 s2 s3, univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H3; intros; auto with arith pts. (* Goal: univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H3; auto with arith pts. (* Goal: univ (Sprop c') s3 *) (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H3; auto with arith pts. (* Goal: rules_v6 (Stype n) (Stype n') (Stype (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) unfold max_nat in |- *. (* Goal: rules_v6 (Stype n) (Stype n') (Stype (if le_gt_dec n n' then n' else n)) *) (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) elim (le_gt_dec n n'); auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) intros. (* Goal: univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Stype n) s1; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) apply univ_inv with (Stype n') s2; intros; auto with arith pts. (* Goal: univ (Stype (max_nat n n')) s3 *) generalize H. (* Goal: forall _ : rules_v6 s1 s2 s3, univ (Stype (max_nat n n')) s3 *) inversion_clear H2. (* Goal: forall (s1 s2 s3 : srt_v6) (_ : rules_v6 s1 s2 s3) (_ : univ (Stype n) s1) (_ : univ (Stype n') s2), univ (Stype (max_nat n n')) s3 *) inversion_clear H3; intros. (* Goal: univ (Stype (max_nat n n')) s3 *) inversion_clear H3. (* Goal: univ (Stype (max_nat n n')) (Stype p) *) cut (max_nat n n' <= p); auto with arith pts. (* Goal: le (max_nat n n') p *) apply least_upper_bound_max_nat. (* Goal: le n p *) (* Goal: le n' p *) apply le_trans with m; auto with arith pts. (* Goal: le n' p *) apply le_trans with m0; auto with arith pts. Qed. End SortsOfV6. (* Uniform interface of sorts *) Require Export GenericSort. Definition sort_of_gen (gs : gen_sort) : Exc srt_v6 := match gs with | Gprop => value (Sprop Neg) | Gset => value (Sprop Pos) | Gtype n => value (Stype n) | _ => error end. Definition gen_of_sort (s : srt_v6) : gen_sort := match s with | Sprop Neg => Gprop | Sprop Pos => Gset | Stype n => Gtype n end.
Require Export Relation_Definitions. Require Export Relation_Operators. Require Export Operators_Properties. Require Export Inclusion. Require Export Transitive_Closure. Require Export Union. Require Export Inverse_Image. Require Export Lexicographic_Product. Hint Resolve rt_step rt_refl rst_step rst_refl t_step: core. Hint Unfold transp union reflexive transitive: core. Hint Immediate rst_sym: core. Lemma clos_refl_trans_ind_right : forall (A : Set) (R : relation A) (M : A) (P : A -> Prop), P M -> (forall P0 N : A, R N P0 -> clos_refl_trans A R P0 M -> P P0 -> P N) -> forall a : A, clos_refl_trans A R a M -> P a. (* Goal: forall (A : Set) (R : relation A) (M : A) (P : forall _ : A, Prop) (_ : P M) (_ : forall (P0 N : A) (_ : R N P0) (_ : clos_refl_trans A R P0 M) (_ : P P0), P N) (a : A) (_ : clos_refl_trans A R a M), P a *) intros. (* Goal: P a *) generalize H H0. (* Goal: forall (_ : P M) (_ : forall (P0 N : A) (_ : R N P0) (_ : clos_refl_trans A R P0 M) (_ : P P0), P N), P a *) elim H1; intros; auto. (* Goal: P x *) (* Goal: P x *) apply H4 with y; auto. (* Goal: forall (A : Set) (R : relation A) (M : A) (P : forall _ : A, Prop) (_ : P M) (_ : forall (P0 N : A) (_ : R N P0) (_ : clos_refl_trans A R P0 M) (_ : P P0), P N) (a : A) (_ : clos_refl_trans A R a M), P a *) apply H3; intros. (* Goal: P y *) (* Goal: P N *) apply H5; intros; auto. (* Goal: P N *) apply H7 with P0; auto. (* Goal: P N *) apply H7 with P0; auto. (* Goal: clos_refl_trans A R P0 z *) apply rt_trans with y; auto. Qed. Hint Resolve left_sym right_sym sp_swap sp_noswap: core.
Require Export Bool. Require Export Arith. Require Export Compare_dec. Require Export Peano_dec. Require Export MyList. Require Export MyRelations. Set Implicit Arguments. Unset Strict Implicit. Definition max_nat (n m : nat) := match le_gt_dec n m with | left _ => m | right _ => n end. Lemma least_upper_bound_max_nat : forall n m p : nat, n <= p -> m <= p -> max_nat n m <= p. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) intros. (* Goal: le (max_nat n m) p *) unfold max_nat in |- *. (* Goal: le (if le_gt_dec n m then m else n) p *) elim (le_gt_dec n m); auto with arith. Qed. Require Export Relation_Definitions. Definition decide (P : Prop) := {P} + {~ P}. Hint Unfold decide: core. Inductive Acc3 (A B C : Set) (R : relation (A * (B * C))) : A -> B -> C -> Prop := Acc3_intro : forall (x : A) (x0 : B) (x1 : C), (forall (y : A) (y0 : B) (y1 : C), R (y, (y0, y1)) (x, (x0, x1)) -> Acc3 R y y0 y1) -> Acc3 R x x0 x1. Lemma Acc3_rec : forall (A B C : Set) (R : relation (A * (B * C))) (P : A -> B -> C -> Set), (forall (x : A) (x0 : B) (x1 : C), (forall (y : A) (y0 : B) (y1 : C), R (y, (y0, y1)) (x, (x0, x1)) -> P y y0 y1) -> P x x0 x1) -> forall (x : A) (x0 : B) (x1 : C), Acc3 R x x0 x1 -> P x x0 x1. Proof. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (P : forall (_ : A) (_ : B) (_ : C), Set) (_ : forall (x : A) (x0 : B) (x1 : C) (_ : forall (y : A) (y0 : B) (y1 : C) (_ : R (@pair A (prod B C) y (@pair B C y0 y1)) (@pair A (prod B C) x (@pair B C x0 x1))), P y y0 y1), P x x0 x1) (x : A) (x0 : B) (x1 : C) (_ : @Acc3 A B C R x x0 x1), P x x0 x1 *) do 6 intro. (* Goal: forall (x : A) (x0 : B) (x1 : C) (_ : @Acc3 A B C R x x0 x1), P x x0 x1 *) fix F 4. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) intros. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) apply H; intros. (* Goal: P y y0 y1 *) apply F. (* Goal: @Acc3 A B C R y y0 y1 *) generalize H1. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) case H0; intros. (* Goal: @Acc3 A B C R y y0 y1 *) apply H2. (* Goal: R (@pair A (prod B C) y (@pair B C y0 y1)) (@pair A (prod B C) x2 (@pair B C x3 x4)) *) exact H3. Qed. Lemma Acc_Acc3 : forall (A B C : Set) (R : relation (A * (B * C))) (x : A) (y : B) (z : C), Acc R (x, (y, z)) -> Acc3 R x y z. Proof. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) intros. change ((fun p : A * (B * C) => match p with | (x2, (x3, x4)) => Acc3 R x2 x3 x4 end) (x, (y, z))) in |- *. (* Goal: (fun p : prod A (prod B C) => let (x2, p0) := p in let (x3, x4) := p0 in @Acc3 A B C R x2 x3 x4) (@pair A (prod B C) x (@pair B C y z)) *) elim H. (* Goal: forall (x : prod A (prod B C)) (_ : forall (y : prod A (prod B C)) (_ : R y x), @Acc (prod A (prod B C)) R y) (_ : forall (y : prod A (prod B C)) (_ : R y x), let (x2, p) := y in let (x3, x4) := p in @Acc3 A B C R x2 x3 x4), let (x2, p) := x in let (x3, x4) := p in @Acc3 A B C R x2 x3 x4 *) simple destruct x0. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) simple destruct p; intros. (* Goal: forall (A B C : Set) (R : relation (prod A (prod B C))) (x : A) (y : B) (z : C) (_ : @Acc (prod A (prod B C)) R (@pair A (prod B C) x (@pair B C y z))), @Acc3 A B C R x y z *) apply Acc3_intro; intros. (* Goal: @Acc3 A B C R y0 y1 y2 *) apply (H1 (y0, (y1, y2))); auto. Qed. Section Principal. Variables (A : Set) (P : A -> Prop) (R : A -> A -> Prop). Record ppal (x : A) : Prop := Pp_intro {pp_ok : P x; pp_least : forall y : A, P y -> R x y}. Definition ppal_dec : Set := {x : A | ppal x} + {(forall x : A, ~ P x)}. End Principal.
Require Import Bool. Require Import Arith. Require Import Compare_dec. Require Import Peano_dec. Require Import General. Require Import MyList. Require Import MyRelations. Require Export Main. Require Export SortV6. Section CoqV6. (* Definition des composantes du calcul *) Definition trm_v6 := term srt_v6. Definition env_v6 := env srt_v6. (* Construction du CTS *) Definition v6 : CTS_spec srt_v6 := Build_CTS_spec _ axiom_v6 rules_v6 univ_v6 (beta_delta_rule _). (* Construction du PTS issu du CTS *) Definition v6_pts : PTS_sub_spec srt_v6 := cts_pts_functor _ v6. Definition le_type : red_rule srt_v6 := Rule _ (Le_type _ (pts_le_type _ v6_pts)). Definition typ_v6 : env_v6 -> trm_v6 -> trm_v6 -> Prop := typ _ v6_pts. Definition wft_v6 : env_v6 -> trm_v6 -> Prop := wf_type _ v6_pts. Definition wf_v6 : env_v6 -> Prop := wf _ v6_pts. Definition v6_sn := sn srt_v6 (ctxt _ (Rule _ (head_reduct _ v6))). Hint Unfold le_type typ_v6 wft_v6 wf_v6 v6_sn: pts. (* Algorithme de mise en forme normale de tete Decidabilite du sous-typage pour les types bien formes *) Lemma whnf : forall (e : env_v6) (t : trm_v6), v6_sn e t -> {u : trm_v6 | red _ (beta_delta _) e t u & head_normal _ (beta_delta _) e u}. Proof beta_delta_whnf srt_v6. Lemma bd_conv_hnf : forall (e : env_v6) (x y : trm_v6), v6_sn e x -> v6_sn e y -> decide (conv_hn_inv _ (beta_delta_rule _) e x y). Proof CR_WHNF_convert_hn srt_v6 v6_sort_dec (beta_delta_rule srt_v6) (church_rosser_beta_delta srt_v6) whnf. Theorem v6_is_subtype_dec : subtype_dec_CTS _ v6. (* Goal: subtype_dec_CTS srt_v6 v6 *) apply Build_subtype_dec_CTS. (* Goal: church_rosser srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) *) (* Goal: forall (e : env srt_v6) (s : srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Srt srt_v6 s) *) (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (church_rosser_beta_delta srt_v6). (* Goal: forall (e : env srt_v6) (s : srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Srt srt_v6 s) *) (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (bd_hn_sort srt_v6). (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (bd_hn_prod srt_v6). (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact whnf. (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact bd_conv_hnf. (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact univ_v6_dec. Qed. (* Subject-Reduction *) Lemma sound_v6_bd : rule_sound _ v6_pts (beta_delta _). (* Goal: rule_sound srt_v6 v6_pts (beta_delta srt_v6) *) unfold beta_delta in |- *. (* Goal: product_inversion srt_v6 (Rule srt_v6 (Le_type srt_v6 (pts_le_type srt_v6 v6_pts))) *) (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) simpl in |- *. (* Goal: rule_sound srt_v6 v6_pts (reunion srt_v6 (beta srt_v6) (delta srt_v6)) *) apply union_sound. (* Goal: rule_sound srt_v6 v6_pts (beta srt_v6) *) (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) apply beta_sound; auto with arith pts. (* Goal: product_inversion srt_v6 (Rule srt_v6 (Le_type srt_v6 (pts_le_type srt_v6 v6_pts))) *) (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) simpl in |- *. (* Goal: product_inversion srt_v6 (R_rt srt_v6 (cumul srt_v6 v6)) *) (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) apply cumul_inv_prod. (* Goal: subtype_dec_CTS srt_v6 v6 *) (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) exact v6_is_subtype_dec. (* Goal: rule_sound srt_v6 v6_pts (delta srt_v6) *) apply delta_sound. Qed. (* L'axiome: ECC est fortement normalisant *) Axiom v6_normalise : forall (e : env_v6) (t T : trm_v6), typ_v6 e t T -> v6_sn e t. Lemma v6_is_norm_sound : norm_sound_CTS _ v6. Proof. (* Goal: norm_sound_CTS srt_v6 v6 *) refine (Build_norm_sound_CTS srt_v6 v6 sound_v6_bd v6_normalise _ _ _). (* Goal: forall s : srt_v6, @ppal_dec srt_v6 (cts_axiom srt_v6 v6 s) (clos_refl_trans srt_v6 (universes srt_v6 v6)) *) (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) left. (* Goal: @sig srt_v6 (fun x : srt_v6 => @ppal srt_v6 (cts_axiom srt_v6 v6 s) (clos_refl_trans srt_v6 (universes srt_v6 v6)) x) *) (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) apply v6_inf_axiom. (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) exact v6_inf_rule. (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) intros. (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) elim v6_inf_axiom with s1; intros. (* Goal: typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) split with x. (* Goal: cts_axiom srt_v6 v6 s1 x *) apply (pp_ok p). Qed. (* Construction du type-checker *) Theorem v6_algorithms : PTS_TC _ v6_pts. Proof full_cts_type_checker srt_v6 v6 v6_is_subtype_dec v6_is_norm_sound. (* open the type-checker *) Lemma infer_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> infer_ppal_type _ v6_pts e t. Proof ptc_inf_ppal_type _ _ v6_algorithms. Lemma check_wf_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> wft_dec _ v6_pts e t. Proof ptc_chk_wft _ _ v6_algorithms. Lemma check_type : forall (e : env_v6) (t T : trm_v6), wf_v6 e -> check_dec _ v6_pts e t T. Proof ptc_chk_typ _ _ v6_algorithms. Lemma add_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> decl_dec _ v6_pts e (Ax _ t). Proof ptc_add_typ _ _ v6_algorithms. Lemma add_def : forall (e : env_v6) (t T : trm_v6), wf_v6 e -> decl_dec _ v6_pts e (Def _ t T). Proof ptc_add_def _ _ v6_algorithms. End CoqV6.
Require Import Bool. Require Import Arith. Require Import Compare_dec. Require Import Peano_dec. Require Import General. Require Import MyList. Require Import MyRelations. Require Export Main. Require Export SortV6. Section CoqV6Beta. Definition trm_v6 := term srt_v6. Definition env_v6 := env srt_v6. (* Construction du CTS *) Definition v6 : CTS_spec srt_v6 := Build_CTS_spec _ axiom_v6 rules_v6 univ_v6 (beta_rule _). (* Construction du PTS issu du CTS *) Definition v6_pts : PTS_sub_spec srt_v6 := cts_pts_functor _ v6. Definition le_type : red_rule srt_v6 := Rule _ (Le_type _ (pts_le_type _ v6_pts)). Definition typ_v6 : env_v6 -> trm_v6 -> trm_v6 -> Prop := typ _ v6_pts. Definition wft_v6 : env_v6 -> trm_v6 -> Prop := wf_type _ v6_pts. Definition wf_v6 : env_v6 -> Prop := wf _ v6_pts. Definition v6_sn := sn srt_v6 (ctxt _ (Rule _ (head_reduct _ v6))). Hint Unfold le_type typ_v6 wft_v6 wf_v6 v6_sn: pts. (* Algorithme de mise en forme normale de tete Decidabilite du sous-typage pour les types bien formes *) Lemma whnf : forall (e : env_v6) (t : trm_v6), v6_sn e t -> {u : trm_v6 | red _ (beta _) e t u & head_normal _ (beta _) e u}. Proof beta_whnf srt_v6. Lemma beta_conv_hnf : forall (e : env_v6) (x y : trm_v6), v6_sn e x -> v6_sn e y -> decide (conv_hn_inv _ (beta_rule _) e x y). Proof CR_WHNF_convert_hn srt_v6 v6_sort_dec (beta_rule srt_v6) (church_rosser_red srt_v6) whnf. Theorem v6_is_subtype_dec : subtype_dec_CTS _ v6. (* Goal: subtype_dec_CTS srt_v6 v6 *) apply Build_subtype_dec_CTS. (* Goal: church_rosser srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) *) (* Goal: forall (e : env srt_v6) (s : srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Srt srt_v6 s) *) (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (church_rosser_red srt_v6). (* Goal: forall (e : env srt_v6) (s : srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Srt srt_v6 s) *) (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (beta_hn_sort srt_v6). (* Goal: forall (e : env srt_v6) (A B : term srt_v6), head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e (Prod srt_v6 A B) *) (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact (beta_hn_prod srt_v6). (* Goal: forall (e : env srt_v6) (t : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e t), @sig2 (term srt_v6) (fun u : term srt_v6 => red srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e t u) (fun u : term srt_v6 => head_normal srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6)) e u) *) (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact whnf. (* Goal: forall (e : env srt_v6) (x y : term srt_v6) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e x) (_ : sn srt_v6 (ctxt srt_v6 (Rule srt_v6 (head_reduct srt_v6 v6))) e y), decide (conv_hn_inv srt_v6 (head_reduct srt_v6 v6) e x y) *) (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact beta_conv_hnf. (* Goal: forall s s' : srt_v6, decide (clos_refl_trans srt_v6 (universes srt_v6 v6) s s') *) exact univ_v6_dec. Qed. (* L'axiome: ECC est fortement normalisant *) Axiom v6_normalise : forall (e : env_v6) (t T : trm_v6), typ_v6 e t T -> v6_sn e t. (* Subject-Reduction *) Lemma sound_v6_beta : rule_sound _ v6_pts (beta _). (* Goal: product_inversion srt_v6 (Rule srt_v6 (Le_type srt_v6 (pts_le_type srt_v6 v6_pts))) *) simpl in |- *. (* Goal: rule_sound srt_v6 v6_pts (beta srt_v6) *) apply beta_sound; auto with arith pts. (* Goal: product_inversion srt_v6 (Rule srt_v6 (Le_type srt_v6 (pts_le_type srt_v6 v6_pts))) *) simpl in |- *. (* Goal: product_inversion srt_v6 (R_rt srt_v6 (cumul srt_v6 v6)) *) apply cumul_inv_prod. (* Goal: subtype_dec_CTS srt_v6 v6 *) exact v6_is_subtype_dec. Qed. Lemma v6_is_norm_sound : norm_sound_CTS _ v6. Proof. (* Goal: norm_sound_CTS srt_v6 v6 *) refine (Build_norm_sound_CTS srt_v6 v6 sound_v6_beta v6_normalise _ _ _). (* Goal: forall s : srt_v6, @ppal_dec srt_v6 (cts_axiom srt_v6 v6 s) (clos_refl_trans srt_v6 (universes srt_v6 v6)) *) (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) left. (* Goal: @sig srt_v6 (fun x : srt_v6 => @ppal srt_v6 (cts_axiom srt_v6 v6 s) (clos_refl_trans srt_v6 (universes srt_v6 v6)) x) *) (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) apply v6_inf_axiom. (* Goal: forall x1 x2 : srt_v6, @sig2 srt_v6 (fun x3 : srt_v6 => cts_rules srt_v6 v6 x1 x2 x3) (fun x3 : srt_v6 => forall (s1 s2 s3 : srt_v6) (_ : cts_rules srt_v6 v6 s1 s2 s3) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x1 s1) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) x2 s2), clos_refl_trans srt_v6 (universes srt_v6 v6) x3 s3) *) (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) exact v6_inf_rule. (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) intros. (* Goal: forall (s1 s2 : srt_v6) (_ : clos_refl_trans srt_v6 (universes srt_v6 v6) s1 s2) (_ : typed_sort srt_v6 (cts_axiom srt_v6 v6) s2), typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) elim v6_inf_axiom with s1; intros. (* Goal: typed_sort srt_v6 (cts_axiom srt_v6 v6) s1 *) split with x. (* Goal: cts_axiom srt_v6 v6 s1 x *) apply (pp_ok p). Qed. (* Construction du type-checker *) Theorem v6_algorithms : PTS_TC _ v6_pts. Proof full_cts_type_checker srt_v6 v6 v6_is_subtype_dec v6_is_norm_sound. (* open the type-checker *) Lemma infer_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> infer_ppal_type _ v6_pts e t. Proof ptc_inf_ppal_type _ _ v6_algorithms. Lemma check_wf_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> wft_dec _ v6_pts e t. Proof ptc_chk_wft _ _ v6_algorithms. Lemma check_type : forall (e : env_v6) (t T : trm_v6), wf_v6 e -> check_dec _ v6_pts e t T. Proof ptc_chk_typ _ _ v6_algorithms. Lemma add_type : forall (e : env_v6) (t : trm_v6), wf_v6 e -> decl_dec _ v6_pts e (Ax _ t). Proof ptc_add_typ _ _ v6_algorithms. Lemma add_def : forall (e : env_v6) (t T : trm_v6), wf_v6 e -> decl_dec _ v6_pts e (Def _ t T). Proof ptc_add_def _ _ v6_algorithms. End CoqV6Beta.
Require Import General. Require Export Relations. Unset Standard Proposition Elimination Names. Section SortsOfECC. Inductive calc : Set := | Pos : calc | Neg : calc. Inductive srt_ecc : Set := | Sprop : calc -> srt_ecc | Stype : calc -> nat -> srt_ecc. Inductive axiom_ecc : srt_ecc -> srt_ecc -> Prop := | ax_prop : forall (c : calc) (n : nat), axiom_ecc (Sprop c) (Stype c n) | ax_type : forall (c : calc) (n m : nat), n < m -> axiom_ecc (Stype c n) (Stype c m). Inductive rules_ecc : srt_ecc -> srt_ecc -> srt_ecc -> Prop := | rule_prop_l : forall (c : calc) (s : srt_ecc), rules_ecc (Sprop c) s s | rule_prop_r : forall (c : calc) (s : srt_ecc), rules_ecc s (Sprop c) (Sprop c) | rule_type : forall (c1 c2 : calc) (n m p : nat), n <= p -> m <= p -> rules_ecc (Stype c1 n) (Stype c2 m) (Stype c2 p). Inductive univ_ecc : srt_ecc -> srt_ecc -> Prop := univ_type : forall (c : calc) (n m : nat), n <= m -> univ_ecc (Stype c n) (Stype c m). Definition univ : relation srt_ecc := clos_refl_trans _ univ_ecc. Hint Resolve ax_prop ax_type rule_prop_l rule_prop_r rule_type univ_type: pts. Hint Unfold univ: pts. (* Inversion et Decidabilite de l'inclusion entre sortes *) Let univ_trans : forall x y z : srt_ecc, univ x y -> univ y z -> univ x z. Proof rt_trans srt_ecc univ_ecc. Inductive inv_univ : srt_ecc -> srt_ecc -> Prop := | iu_prop : forall c : calc, inv_univ (Sprop c) (Sprop c) | iu_type : forall (c : calc) (n m : nat), n <= m -> inv_univ (Stype c n) (Stype c m). Hint Resolve iu_prop iu_type: pts. Lemma inv_univ_trans : forall x y z : srt_ecc, inv_univ x y -> inv_univ y z -> inv_univ x z. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Sprop c) s1) (_ : univ x2 s2), univ x2 s3 *) (* Goal: rules_ecc (Stype c n) (Sprop c') (Sprop c') *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) simple induction 1; intros; auto with arith pts. (* Goal: inv_univ (Stype c n) z *) inversion_clear H1. (* Goal: inv_univ (Stype c n) (Stype c m0) *) apply iu_type. (* Goal: le n p *) (* Goal: le n' p *) apply le_trans with m; auto with arith pts. Qed. Lemma univ_inv : forall s s' : srt_ecc, univ s s' -> forall P : Prop, (inv_univ s s' -> P) -> P. (* Goal: forall (s s' : srt_ecc) (_ : univ s s') (P : Prop) (_ : forall _ : inv_univ s s', P), P *) simple induction 1. (* Goal: forall (x y : srt_ecc) (_ : univ_ecc x y) (P : Prop) (_ : forall _ : inv_univ x y, P), P *) (* Goal: forall (x : srt_ecc) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) (* Goal: forall (x y z : srt_ecc) (_ : clos_refl_trans srt_ecc univ_ecc x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_ecc univ_ecc y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) simple induction 1; auto with arith pts. (* Goal: forall (x : srt_ecc) (P : Prop) (_ : forall _ : inv_univ x x, P), P *) (* Goal: forall (x y z : srt_ecc) (_ : clos_refl_trans srt_ecc univ_ecc x y) (_ : forall (P : Prop) (_ : forall _ : inv_univ x y, P), P) (_ : clos_refl_trans srt_ecc univ_ecc y z) (_ : forall (P : Prop) (_ : forall _ : inv_univ y z, P), P) (P : Prop) (_ : forall _ : inv_univ x z, P), P *) simple destruct x; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) intros. (* Goal: P *) apply H4. (* Goal: inv_univ x z *) apply inv_univ_trans with y. (* Goal: inv_univ x y *) (* Goal: inv_univ y z *) apply H1; auto with arith pts. (* Goal: inv_univ y z *) apply H3; auto with arith pts. Qed. Lemma calc_dec : forall c c' : calc, decide (c = c'). simple destruct c; simple destruct c'; (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) (right; discriminate) || auto with arith pts. Qed. Lemma ecc_sort_dec : forall s s' : srt_ecc, decide (s = s'). (* Goal: forall s s' : srt_ecc, decide (@eq srt_ecc s s') *) simple destruct s; simple destruct s'; intros; try (right; discriminate). (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) elim calc_dec with c c0; intros. (* Goal: decide (@eq srt_ecc (Sprop c) (Sprop c0)) *) (* Goal: decide (@eq srt_ecc (Sprop c) (Sprop c0)) *) (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) left; elim a; auto with arith pts. (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) elim eq_nat_dec with n n0; intros. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) elim calc_dec with c c0; intros. (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) left; elim a; elim a0; auto with arith pts. (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. (* Goal: decide (@eq srt_ecc (Stype c n) (Stype c0 n0)) *) right; red in |- *; intros H; apply b; injection H; auto with arith pts. Qed. Lemma univ_ecc_dec : forall s s' : srt_ecc, decide (univ s s'). refine (fun s s' : srt_ecc => match s, s' return (decide (univ s s')) with | Sprop c, Sprop c' => _ | Stype c n, Stype c' n' => _ | Sprop c, Stype c0 n => right _ _ | Stype c n, Sprop c0 => right _ _ end). (* Goal: decide (univ (Sprop c) (Sprop c')) *) (* Goal: not (univ (Sprop c) (Stype c0 n)) *) (* Goal: not (univ (Stype c n) (Sprop c0)) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) case (calc_dec c c'); [ left | right ]. (* Goal: univ (Stype c n) (Stype c' n') *) (* Goal: not (univ (Stype c n) (Stype c' n')) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) elim e; auto with arith pts. (* Goal: not (univ (Sprop c) (Sprop c')) *) (* Goal: not (univ (Sprop c) (Stype c0 n)) *) (* Goal: not (univ (Stype c n) (Sprop c0)) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) red in |- *; intro; apply n. (* Goal: @eq calc c c' *) (* Goal: not (univ (Sprop c) (Stype c0 n)) *) (* Goal: not (univ (Stype c n) (Sprop c0)) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) apply univ_inv with (Sprop c) (Sprop c'); intros; auto with arith pts. (* Goal: @eq calc c c' *) inversion_clear H0; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) red in |- *; intros. (* Goal: False *) (* Goal: not (univ (Stype c n) (Sprop c0)) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) apply univ_inv with (Sprop c) (Stype c0 n); intros; auto with arith pts. (* Goal: False *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) inversion_clear H0. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) red in |- *; intros. (* Goal: False *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) apply univ_inv with (Stype c n) (Sprop c0); intros; auto with arith pts. (* Goal: False *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) inversion_clear H0. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) case (calc_dec c c'); intros. (* Goal: decide (univ (Stype c n) (Stype c' n')) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) case (le_gt_dec n n'); [ left | right ]. (* Goal: univ (Stype c n) (Stype c' n') *) (* Goal: not (univ (Stype c n) (Stype c' n')) *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) elim e; auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) red in |- *; intros. (* Goal: @eq calc c c' *) apply univ_inv with (Stype c n) (Stype c' n'); intros; auto with arith pts. (* Goal: False *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) inversion_clear H0. (* Goal: False *) (* Goal: decide (univ (Stype c n) (Stype c' n')) *) absurd (n <= n'); auto with arith pts. (* Goal: decide (univ (Stype c n) (Stype c' n')) *) right; red in |- *; intros; apply n0. (* Goal: @eq calc c c' *) apply univ_inv with (Stype c n) (Stype c' n'); intros; auto with arith pts. (* Goal: @eq calc c c' *) inversion_clear H0; auto with arith pts. Qed. (* Inference des axiomes et regles *) Lemma ecc_inf_axiom : forall s : srt_ecc, {sp : srt_ecc | ppal (axiom_ecc s) univ sp}. refine (fun s : srt_ecc => match s return {sp : srt_ecc | ppal (axiom_ecc s) univ sp} with | Sprop c => exist _ (Stype c 0) _ | Stype c n => exist _ (Stype c (S n)) _ end). (* Goal: @ppal srt_ecc (axiom_ecc (Stype c n)) univ (Stype c (S n)) *) split; intros; auto with arith pts. (* Goal: univ (Stype c (S n)) y *) inversion_clear H; auto with arith pts. (* Goal: @ppal srt_ecc (axiom_ecc (Stype c n)) univ (Stype c (S n)) *) split; intros; auto with arith pts. (* Goal: univ (Stype c (S n)) y *) inversion_clear H; auto with arith pts. Qed. Lemma ecc_inf_rule : forall x1 x2 : srt_ecc, {x3 : srt_ecc | rules_ecc x1 x2 x3 & forall s1 s2 s3 : srt_ecc, rules_ecc s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3}. refine (fun x1 x2 : srt_ecc => match x1, x2 return {x3 : srt_ecc | rules_ecc x1 x2 x3 & forall s1 s2 s3 : srt_ecc, rules_ecc s1 s2 s3 -> univ x1 s1 -> univ x2 s2 -> univ x3 s3} with | Sprop c, _ => exist2 _ _ x2 _ _ | Stype c n, Sprop c' => exist2 _ _ (Sprop c') _ _ | Stype c n, Stype c' n' => exist2 _ _ (Stype c' (max_nat n n')) _ _ end). (* Goal: rules_ecc (Stype c n) (Sprop c') (Sprop c') *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) auto with pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Sprop c) s1) (_ : univ x2 s2), univ x2 s3 *) (* Goal: rules_ecc (Stype c n) (Sprop c') (Sprop c') *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) simple induction 1; intros; auto with arith pts. (* Goal: univ x2 (Stype c2 p) *) (* Goal: rules_ecc (Stype c n) (Sprop c') (Sprop c') *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) apply univ_trans with (Stype c2 m); auto with arith pts. (* Goal: rules_ecc (Stype c n) (Sprop c') (Sprop c') *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Sprop c') s2), univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) auto with pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) intros. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) apply univ_inv with (Sprop c') s2; intros. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) auto with arith pts. (* Goal: univ (Stype c' (max_nat n n')) s3 *) generalize H. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) inversion_clear H2; intros. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) inversion_clear H2; auto with arith pts. (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) unfold max_nat in |- *. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) elim (le_gt_dec n n'); auto with arith pts. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) intros. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) apply univ_inv with (Stype c n) s1; intros; auto with arith pts. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) apply univ_inv with (Stype c' n') s2; intros; auto with arith pts. (* Goal: univ (Stype c' (max_nat n n')) s3 *) generalize H. (* Goal: forall _ : rules_ecc s1 s2 s3, univ (Stype c' (max_nat n n')) s3 *) inversion_clear H2. (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) inversion_clear H3; intros. (* Goal: univ (Stype c' (max_nat n n')) s3 *) inversion_clear H3. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) cut (max_nat n n' <= p); auto with arith pts. (* Goal: le (max_nat n n') p *) apply least_upper_bound_max_nat. (* Goal: le n p *) (* Goal: le n' p *) apply le_trans with m; auto with arith pts. (* Goal: univ (Sprop c') s2 *) (* Goal: univ (Sprop c') s3 *) (* Goal: rules_ecc (Stype c n) (Stype c' n') (Stype c' (max_nat n n')) *) (* Goal: forall (s1 s2 s3 : srt_ecc) (_ : rules_ecc s1 s2 s3) (_ : univ (Stype c n) s1) (_ : univ (Stype c' n') s2), univ (Stype c' (max_nat n n')) s3 *) apply le_trans with m0; auto with arith pts. Qed. End SortsOfECC. (* Uniform interface of sorts *) Require Export GenericSort. Definition sort_of_gen (gs : gen_sort) : Exc srt_ecc := match gs with | Gprop => value (Sprop Neg) | Gset => value (Sprop Pos) | Gtype n => value (Stype Neg n) | Gtypeset n => value (Stype Pos n) end. Definition gen_of_sort (s : srt_ecc) : gen_sort := match s with | Sprop Neg => Gprop | Sprop Pos => Gset | Stype Neg n => Gtype n | Stype Pos n => Gtypeset n end.
Set Implicit Arguments. Unset Strict Implicit. Require Export List. Section Listes. Variable A : Set. Let List := list A. Inductive item (x : A) : List -> nat -> Prop := | item_hd : forall l : List, item x (x :: l) 0 | item_tl : forall (l : List) (n : nat) (y : A), item x l n -> item x (y :: l) (S n). Lemma fun_item : forall (u v : A) (e : List) (n : nat), item u e n -> item v e n -> u = v. Proof. (* Goal: forall (u v : A) (e : List) (n : nat) (_ : item u e n) (_ : item v e n), @eq A u v *) simple induction 1; intros. (* Goal: @eq A u v *) (* Goal: @eq A u v *) inversion_clear H0; auto. (* Goal: @eq A u v *) inversion_clear H2; auto. Qed. Lemma list_item : forall e n, {t : _ | item t e n} + {(forall t, ~ item t e n)}. Proof. (* Goal: forall (e : List) (n : nat), sumor (@sig A (fun t : A => item t e n)) (forall t : A, not (item t e n)) *) fix item_rec 1. (* Goal: forall (e : List) (n : nat), sumor (@sig A (fun t : A => item t e n)) (forall t : A, not (item t e n)) *) intros [| h l]. (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@nil A) n)) (forall t : A, not (item t (@nil A) n)) *) (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@cons A h l) n)) (forall t : A, not (item t (@cons A h l) n)) *) right; red in |- *; intros t in_nil; inversion in_nil. (* Goal: forall n : nat, sumor (@sig A (fun t : A => item t (@cons A h l) n)) (forall t : A, not (item t (@cons A h l) n)) *) intros [| k]. (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) O)) (forall t : A, not (item t (@cons A h l) O)) *) (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) left; exists h; constructor. (* Goal: sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) case (item_rec l k). (* Goal: forall _ : @sig A (fun t : A => item t l k), sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) (* Goal: forall _ : forall t : A, not (item t l k), sumor (@sig A (fun t : A => item t (@cons A h l) (S k))) (forall t : A, not (item t (@cons A h l) (S k))) *) intros (y, in_tl); left; exists y; constructor; trivial. intros not_in_tl; right; intros t in_tl_l; inversion_clear in_tl_l; red in not_in_tl; eauto. Defined. Inductive trunc : nat -> List -> List -> Prop := | trunc_O : forall e : List, trunc 0 e e | trunc_S : forall (k : nat) (e f : List) (x : A), trunc k e f -> trunc (S k) (x :: e) f. Lemma item_trunc : forall (n : nat) (e : List) (t : A), item t e n -> exists f : List, trunc (S n) e f. Proof. (* Goal: forall (n : nat) (e : List) (t : A) (_ : item t e n), @ex List (fun f : List => trunc (S n) e f) *) simple induction n; intros. (* Goal: @ex List (fun f : List => trunc (S O) e f) *) (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) inversion_clear H. (* Goal: @ex List (fun f : List => trunc (S O) (@cons A t l) f) *) (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) exists l. (* Goal: trunc (S (S n0)) (@cons A y l) x *) (* Goal: item t l n0 *) apply trunc_S. (* Goal: trunc O l l *) (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) apply trunc_O. (* Goal: @ex List (fun f : List => trunc (S (S n0)) e f) *) inversion_clear H0. (* Goal: @ex List (fun f : List => trunc (S (S n0)) (@cons A y l) f) *) elim H with l t; intros. (* Goal: @ex List (fun f : List => trunc (S (S n0)) (@cons A y l) f) *) (* Goal: item t l n0 *) exists x. (* Goal: trunc (S (S n0)) (@cons A y l) x *) (* Goal: item t l n0 *) apply trunc_S. (* Goal: item t l n0 *) trivial. (* Goal: item t l n0 *) trivial. Qed. End Listes. Hint Resolve item_hd item_tl trunc_O trunc_S: core.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* This contribution was updated for Coq V5.10 by the COQ workgroup. *) (* January 1995 *) (****************************************************************************) (* *) (*Author: Pierre Casteran. *) (* LABRI, URA CNRS 1304, *) (* Departement d'Informatique, Universite Bordeaux I, *) (* 33405 Talence CEDEX, *) (* e-mail: [email protected] *) (* *) (*Date: May, 3, 1993 *) (* *) (*Pro[gramm,v]ing with continuations:A development in Coq. *) (* *) (*(see the file "leavemult.dvi" for more explanations ) *) (* *) (* *) (* *) (****************************************************************************) (* leavemult.v *) (****************************************************************************) Set Asymmetric Patterns. Require Import Arith. (* Binary trees on some domain:*) Section Domain. Variable Dom : Set. Inductive tree : Set := | leaf : Dom -> tree | cons : tree -> tree -> tree. End Domain. (* Binary trees labeled by natural numbers *) Definition nat_tree := tree nat. Definition nat_cons := cons nat. Definition nat_leaf := leaf nat. (* Product of all the leaves of some nat_tree *) Fixpoint leavemult (t : nat_tree) : nat := match t return nat with | leaf n1 => (* (nat_leaf n1) *) n1 (* (nat_cons t1 t2) *) | cons t1 t2 => leavemult t1 * leavemult t2 end. (* the specification of our problem: *) Definition SPECIF (t : nat_tree) := {n : nat | n = leavemult t}. (* A (too much) trivial proof *) Theorem trivialalgo : forall t : nat_tree, SPECIF t. (* Goal: forall t : nat_tree, SPECIF t *) intro t. (* Goal: SPECIF t *) unfold SPECIF in |- *. (* Goal: @sig nat (fun n : nat => @eq nat n (leavemult t)) *) apply exist with (leavemult t); auto. Defined. (* Here we define a predicate "Has an occurrence of O" *) Fixpoint Has_Zero (t : nat_tree) : Prop := match t return Prop with | leaf n1 => (* (nat_leaf n1) *) n1 = 0 (* (nat_cons t1 t2) *) | cons t1 t2 => Has_Zero t1 \/ Has_Zero t2 end. (* If some tree t has an occurence of 0, then (leavmult t)=0 *) Lemma zero_occ : forall t : nat_tree, Has_Zero t -> leavemult t = 0. (* Goal: forall (t : nat_tree) (_ : Has_Zero t), @eq nat (leavemult t) O *) simple induction t. (* Goal: forall (d : nat) (_ : Has_Zero (leaf nat d)), @eq nat (leavemult (leaf nat d)) O *) (* Goal: forall (t : tree nat) (_ : forall _ : Has_Zero t, @eq nat (leavemult t) O) (t0 : tree nat) (_ : forall _ : Has_Zero t0, @eq nat (leavemult t0) O) (_ : Has_Zero (cons nat t t0)), @eq nat (leavemult (cons nat t t0)) O *) simple induction d; simpl in |- *; auto. intros t1 H1 t2 H2 H. (* Goal: @eq nat (leavemult (cons nat t1 t2)) O *) simpl in |- *. elim H; intro H0. (* Goal: @eq nat (Init.Nat.mul (leavemult t1) (leavemult t2)) O *) (* Goal: @eq nat (Init.Nat.mul (leavemult t1) (leavemult t2)) O *) cut (leavemult t1 = 0). intro H3. rewrite H3; simpl in |- *; auto. auto. (* Goal: @eq nat (leavemult (cons nat t1 t2)) O *) cut (leavemult t2 = 0). intro H3. rewrite H3; simpl in |- *. (* Goal: @eq nat (leavemult t2) O *) symmetry in |- *; apply mult_n_O. auto. Qed. (* A proof of (t:nat_tree)(SPECIF t) which uses the preceding lemma *) Let subtree_ersatz (t' t : nat_tree) := Has_Zero t' -> Has_Zero t. Let kappa (t t' : nat_tree) := forall n' : nat, n' = leavemult t' -> SPECIF t. Theorem cpsalgo : forall t : nat_tree, SPECIF t. intro. cut (Has_Zero t -> SPECIF t). intro ESCAPE_O. (* 2 subgoals (SPECIF t) ============================ ESCAPE_O : (Has_Zero t)->(SPECIF t) t : nat_tree subgoal 2 is: (Has_Zero t)->(SPECIF t) *) 2: intro. (* Goal: SPECIF t *) 2: unfold SPECIF in |- *. 2: apply exist with 0. 2: symmetry in |- *. 2: apply zero_occ. (* Goal: @eq nat (leavemult t2) O *) 2: auto. (* 1 subgoal (SPECIF t) ============================ ESCAPE_O : (Has_Zero t)->(SPECIF t) t : nat_tree *) Hint Unfold subtree_ersatz. Hint Unfold kappa. cut (forall t' : nat_tree, subtree_ersatz t' t -> kappa t t' -> SPECIF t). Hint Unfold SPECIF. intro AUX. apply AUX with t. (* Goal: @eq nat (leavemult t2) O *) auto. unfold kappa in |- *. intros n H. (* Goal: @eq nat (leavemult t2) O *) unfold SPECIF in |- *; apply exist with n; auto. (* 1 subgoal (t':nat_tree)(subtree_ersatz t' t)->(kappa t t')->(SPECIF t) ============================ ESCAPE_O : (Has_Zero t)->(SPECIF t) t : nat_tree *) simple induction t'. simple induction d. intros H H0. apply ESCAPE_O. (* Goal: @eq nat (leavemult (cons nat t1 t2)) O *) apply H. simpl in |- *. (* Goal: @eq nat (leavemult t2) O *) auto. intros y H1 H2 H3. unfold kappa in H3. apply H3 with (S y). (* Goal: @eq nat (leavemult (cons nat t1 t2)) O *) simpl in |- *. (* Goal: @eq nat (leavemult t2) O *) auto. intro t1. intro ind1. intro t2. intro ind2. intros H H0. apply ind2. intro H1. apply H. unfold Has_Zero in |- *. (* Goal: @eq nat (leavemult t2) O *) unfold Has_Zero in H1. auto. (* 1 subgoal (kappa t t2) ============================ H0 : (kappa t (cons nat t1 t2)) H : (subtree_ersatz (cons nat t1 t2) t) ind2 : (subtree_ersatz t2 t)->(kappa t t2)->(SPECIF t) t2 : (tree nat) ind1 : (subtree_ersatz t1 t)->(kappa t t1)->(SPECIF t) t1 : (tree nat) t' : nat_tree ESCAPE_O : (Has_Zero t)->(SPECIF t) t : nat_tree *) unfold kappa in |- *. unfold kappa in H0. intros n2 eg2. (* 1 subgoal (SPECIF t) ============================ eg2 : <nat>n2=(leavemult t2) n2 : nat H0 : (n':nat)(<nat>n'=(leavemult (cons nat t1 t2)))->(SPECIF t) H : (subtree_ersatz (cons nat t1 t2) t) ind2 : (subtree_ersatz t2 t)->(kappa t t2)->(SPECIF t) t2 : (tree nat) ind1 : (subtree_ersatz t1 t)->(kappa t t1)->(SPECIF t) t1 : (tree nat) t' : nat_tree ESCAPE_O : (Has_Zero t)->(SPECIF t) t : nat_tree *) apply ind1. intro. apply H. (* Goal: @eq nat (leavemult t2) O *) simpl in |- *; auto. unfold kappa in |- *. intros n1 eg1. apply H0 with (n1 * n2). (* Goal: @eq nat (leavemult (cons nat t1 t2)) O *) simpl in |- *. rewrite eg2; rewrite eg1. (* Goal: @eq nat (leavemult t2) O *) auto. Defined. (* Old extraction Coq < Extraction cpsalgo. cpsalgo ==> [t:nat_tree] (tree_rec nat kappa->SPECIF [d:nat] (nat_rec kappa->SPECIF [_:kappa] O [y:nat][_:kappa->SPECIF] ([H3:kappa](H3 (S y))) d) [_:(tree nat)] ([ind1:kappa->SPECIF] [_:(tree nat)] ([ind2:kappa->SPECIF] [H0:kappa] (ind2 [n2:nat](ind1 [n1:nat](H0 (mult n1 n2)))))) t [n:nat]n) Coq < Extraction SPECIF. SPECIF ==> nat Coq < Extraction kappa. kappa ==> nat->SPECIF *) Require Extraction. Extraction "leavemult.ml" SPECIF kappa trivialalgo cpsalgo.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import EqNat. Require Import Peano_dec. Require Import List. Require Import Ensembles. Require Import Finite_sets. Require Import Finite_sets_facts. Require Import Image. Require Import Compare. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import neg. Require Import or. Require Import univ. Require Import op. Require Import tauto. Require Import quant. Require Import gc. Require Import mu. Require Import munew. Lemma relfreeeven : forall (f : mu_form) (P : ad) (b : bool), mu_rel_free P f = false -> f_P_even P f b. Proof. (* Goal: forall (f : mu_form) (re : rel_env) (sre : set_renv) (_ : f_ok f) (_ : mu_form_ap_ok (var_lu O N) f) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste f sre) (bool_expr_to_var_env'' O N (mu_eval N te f re)) *) simple induction f. intros. elim b; [ apply mu_0_even | apply mu_0_odd ]. intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim b; [ apply mu_1_even | apply mu_1_odd ]. intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim b; [ apply mu_ap_even | apply mu_ap_odd ]. intros. (* Goal: f_P_even P (mu_rel_var a) b *) (* Goal: forall (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_neg m)) false), f_P_even P (mu_neg m) b *) (* Goal: forall (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (m0 : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m0) false), f_P_even P m0 b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_and m m0)) false), f_P_even P (mu_and m m0) b *) (* Goal: forall (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (m0 : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m0) false), f_P_even P m0 b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_or m m0)) false), f_P_even P (mu_or m m0) b *) (* Goal: forall (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (m0 : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m0) false), f_P_even P m0 b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_impl m m0)) false), f_P_even P (mu_impl m m0) b *) (* Goal: forall (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (m0 : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m0) false), f_P_even P m0 b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_iff m m0)) false), f_P_even P (mu_iff m m0) b *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_all a m)) false), f_P_even P (mu_all a m) b *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_ex a m)) false), f_P_even P (mu_ex a m) b *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P m) false), f_P_even P m b) (P : ad) (b : bool) (_ : @eq bool (mu_rel_free P (mu_mu a m)) false), f_P_even P (mu_mu a m) b *) simpl in H. elim b. apply mu_rel_var_even. apply mu_rel_var_odd. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. intros. simpl in H0. elim b. apply mu_neg_even. apply H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. apply mu_neg_odd. apply H. assumption. intros. simpl in H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (orb_false_elim _ _ H1); intros. elim b. apply mu_and_even. apply H. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply H0. assumption. apply mu_and_odd. apply H. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply H0. assumption. intros. simpl in H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (orb_false_elim _ _ H1); intros. elim b. apply mu_or_even. apply H. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply H0. assumption. apply mu_or_odd. apply H. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply H0. assumption. intros. simpl in H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (orb_false_elim _ _ H1); intros. elim b. apply mu_impl_even. apply H. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply H0. assumption. apply mu_impl_odd. apply H. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply H0. assumption. intros. simpl in H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (orb_false_elim _ _ H1); intros. elim b. apply mu_iff_even. apply H. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply H0. assumption. apply H. assumption. apply H0. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply mu_iff_odd. apply H. assumption. apply H0. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply H. assumption. apply H0. assumption. intros. simpl in H0. elim b. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply mu_all_even. apply H. assumption. apply mu_all_odd. apply H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. intros. simpl in H0. elim b. apply mu_ex_even. apply H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. apply mu_ex_odd. apply H. assumption. intros. simpl in H0. (* Goal: f_P_even P (mu_mu a m) b *) elim (sumbool_of_bool (Neqb P a)). intro y. (* Goal: f_P_even P (mu_mu a m) b *) rewrite <- (Neqb_complete _ _ y). elim b. apply mu_mu_P_even. (* Goal: f_P_even P (mu_mu a m) b *) apply mu_mu_P_odd. intro y. rewrite y in H0. simpl in H0. elim b. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply mu_mu_Q_even. assumption. apply H. assumption. apply mu_mu_Q_odd. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. apply H. assumption. Qed. Section mu2set. Variable N : nat. Definition set_1 := Evar_env'' 0 N. Definition rel_1 (s t : var_env'') := In _ set_1 s /\ In _ set_1 t. Definition t_to_rel1 (t : bool_expr) (ve1 ve2 : var_env') := eval_be' t (var_env'_or ve1 (var_env'_dash N ve2)). Definition t_to_rel (t : bool_expr) (ve1 ve2 : var_env'') := t_to_rel1 t (var_env''_to_env' ve1) (var_env''_to_env' ve2). Definition new_t_to_rel (t : bool_expr) (ve1 ve2 : var_env'') := t_to_rel t ve1 ve2 = true /\ rel_1 ve1 ve2. Definition state_set (S : Ensemble var_env'') := Included _ S set_1. Definition state_rel (R : Relation var_env'') := forall s t : var_env'', R s t -> rel_1 s t. (* (In ? set_1 s) /\ (In ? set_1 t).*) Definition set_0 := Empty_set var_env''. Definition set_ap (x : ad) (s : var_env'') := In _ set_1 s /\ in_dom _ x s = true. Definition set_or := Union var_env''. Definition set_and := Intersection var_env''. Definition set_neg := Setminus _ set_1. Definition set_impl (S1 S2 : Ensemble var_env'') := set_or (set_neg S1) S2. Definition set_iff (S1 S2 : Ensemble var_env'') := set_and (set_impl S1 S2) (set_impl S2 S1). Inductive set_ex (R : Relation var_env'') (S : Ensemble var_env'') : Ensemble var_env'' := setex_intro : forall s t : var_env'', In _ set_1 s -> R s t -> In _ S t -> In _ (set_ex R S) s. Definition set_all (R : Relation var_env'') (S : Ensemble var_env'') (s : var_env'') := In _ set_1 s /\ (forall t : var_env'', R s t -> In _ S t). Definition set_mu (f : Ensemble var_env'' -> Ensemble var_env'') (s : var_env'') := forall X : Ensemble var_env'', state_set X -> Included _ (f X) X -> In _ X s. Definition set_renv := ad -> Ensemble var_env''. Definition set_tenv := ad -> Relation var_env''. Definition sre_put (sre : set_renv) (P : ad) (S : Ensemble var_env'') (Q : ad) := if Neqb P Q then S else sre Q. Definition te_ste_ok (te : trans_env) (ste : set_tenv) := forall (a : ad) (ve1 ve2 : var_env''), new_t_to_rel (te a) ve1 ve2 <-> ste a ve1 ve2. Definition re_sre_ok (re : rel_env) (sre : set_renv) := forall P : ad, bool_expr_to_var_env'' 0 N (re P) = sre P. Fixpoint mu_form2set (ste : set_tenv) (f : mu_form) {struct f} : set_renv -> Ensemble var_env'' := fun sre => match f with | mu_0 => set_0 | mu_1 => set_1 | mu_ap p => set_ap p | mu_rel_var P => sre P | mu_neg g => set_neg (mu_form2set ste g sre) | mu_and g1 g2 => set_and (mu_form2set ste g1 sre) (mu_form2set ste g2 sre) | mu_or g1 g2 => set_or (mu_form2set ste g1 sre) (mu_form2set ste g2 sre) | mu_impl g1 g2 => set_impl (mu_form2set ste g1 sre) (mu_form2set ste g2 sre) | mu_iff g1 g2 => set_iff (mu_form2set ste g1 sre) (mu_form2set ste g2 sre) | mu_all t g => set_all (ste t) (mu_form2set ste g sre) | mu_ex t g => set_ex (ste t) (mu_form2set ste g sre) | mu_mu P g => set_mu (fun S => mu_form2set ste g (sre_put sre P S)) end. Lemma set_ap_state_set : forall x : ad, state_set (set_ap x). Proof. (* Goal: forall x : ad, state_set (set_ap x) *) unfold state_set, set_ap in |- *. unfold Included in |- *. unfold In in |- *. tauto. Qed. Lemma var_env'_to_env''_to_env' : forall (L U : nat) (ve : var_env') (x : ad), var_lu L U x = true -> var_env''_to_env' (var_env'_to_env'' L U ve) (nat_of_N x) = ve (nat_of_N x). Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold var_env''_to_env', var_env'_to_env'' in |- *. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x)) (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub U L) L U ve (@eq_refl nat (Init.Nat.sub U L)) in ve'')) (ve (N.to_nat x)) *) elim (var_env'_to_var_env''_lemma2 (U - L) L U ve (refl_equal (U - L))). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) intros x0 y. rewrite (N_of_nat_of_N x). apply (proj2 y). assumption. Qed. Lemma le_minus_le1 : forall m n p : nat, m <= n -> m - p <= n - p. Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simple induction 1. auto with arith. intros. apply le_trans with (m := m0 - p). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. generalize p. generalize m0. simple induction m1. simpl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) auto with arith. intros. elim p0. auto with arith. intros. (* Goal: le (Init.Nat.sub (S n0) (S n1)) (Init.Nat.sub (S (S n0)) (S n1)) *) replace (S n0 - S n1) with (n0 - n1). (* Goal: le (Init.Nat.sub n0 n1) (Init.Nat.sub (S (S n0)) (S n1)) *) (* Goal: @eq nat (Init.Nat.sub n0 n1) (Init.Nat.sub (S n0) (S n1)) *) replace (S (S n0) - S n1) with (S n0 - n1). apply H2. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) reflexivity. reflexivity. Qed. Fixpoint ve''_to_be (ve : var_env'') (n : nat) {struct n} : bool_expr := match n with | O => One | S m => match in_dom _ (N_of_nat m) ve with | true => ANd (ve''_to_be ve m) (Var (N_of_nat m)) | false => ANd (ve''_to_be ve m) (Neg (Var (N_of_nat m))) end end. Lemma ve''_to_be_ok : forall (n : nat) (ve ve' : var_env''), bool_fun_of_bool_expr (ve''_to_be ve n) (var_env''_to_env ve') = true -> forall m : nat, m < n -> MapGet _ ve (N_of_nat m) = MapGet _ ve' (N_of_nat m). Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simple induction n. intros. elim (lt_n_O _ H0). intros. simpl in H0. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) elim (option_sum _ (MapGet unit ve (N_of_nat n0))). intro y. elim y. intro x. (* Goal: forall _ : @eq (option unit) (MapGet unit ve (N.of_nat n0)) (@Some unit x), @eq bool (eval_be' (if match MapGet unit ve (N.of_nat n0) with | Some a => true | None => false end then ANd (ve''_to_be ve n0) (Var (N.of_nat n0)) else ANd (ve''_to_be ve n0) (Neg (Var (N.of_nat n0)))) (var_env''_to_env' ve)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit ve (N.of_nat n0)) (@None unit), @eq bool (eval_be' (if match MapGet unit ve (N.of_nat n0) with | Some a => true | None => false end then ANd (ve''_to_be ve n0) (Var (N.of_nat n0)) else ANd (ve''_to_be ve n0) (Neg (Var (N.of_nat n0)))) (var_env''_to_env' ve)) true *) elim x. intros y0. unfold in_dom in H0. clear y. rewrite y0 in H0. (* Goal: @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) simpl in H0. unfold bool_fun_and in H0. elim (andb_prop _ _ H0). clear H0. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold bool_fun_var in H2. unfold var_env''_to_env in H2. (* Goal: @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) unfold lt in H1. elim (le_lt_eq_dec m n0). intros y. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) rewrite (H ve ve' H0 m y). reflexivity. intro y. rewrite y. rewrite y0. (* Goal: @eq (option unit) (@Some unit tt) (MapGet unit ve' (N.of_nat n0)) *) (* Goal: le m n0 *) (* Goal: forall _ : @eq (option unit) (MapGet unit ve (N.of_nat n0)) (@None unit), @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) unfold in_dom in H2. elim (option_sum _ (MapGet unit ve' (N_of_nat n0))). (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intro y1. inversion y1. rewrite H3. elim x0. reflexivity. intro y1. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite y1 in H2. discriminate. apply le_S_n. assumption. intro y. (* Goal: @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) unfold in_dom in H0. rewrite y in H0. simpl in H0. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold bool_fun_and in H0. elim (andb_prop _ _ H0). intros. (* Goal: @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) unfold bool_fun_neg, bool_fun_var, var_env''_to_env in H3. unfold in_dom in H3. (* Goal: @eq (option unit) (MapGet unit ve (N.of_nat m)) (MapGet unit ve' (N.of_nat m)) *) unfold lt in H1. elim (le_lt_eq_dec m n0). intro y0. apply (H ve ve'). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. intro y0. rewrite y0. rewrite y. (* Goal: @eq (option unit) (@None unit) (MapGet unit ve' (N.of_nat n0)) *) (* Goal: le m n0 *) elim (option_sum _ (MapGet unit ve' (N_of_nat n0))). intro y1. inversion y1. (* Goal: forall _ : @eq (option unit) (MapGet unit ve' (N.of_nat n0)) (@None unit), @eq (option unit) (@None unit) (MapGet unit ve' (N.of_nat n0)) *) (* Goal: le m n0 *) rewrite H4 in H3. simpl in H3. discriminate. intro y1. rewrite y1. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) reflexivity. apply le_S_n. assumption. Qed. Lemma ve''_to_be_ok1 : forall (n : nat) (ve ve' : var_env''), Evar_env'' 0 n ve -> bool_expr_to_var_env'' 0 n (ve''_to_be ve n) ve' -> ve = ve'. Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold Evar_env'' in H. unfold bool_expr_to_var_env'' in H0. elim H; clear H; intros H2 H3. elim H0; clear H0; intros H4 H5. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply (mapcanon_unique unit). assumption. unfold Evar_env'' in H5. unfold In in H5. exact (proj1 H5). unfold Evar_env'' in H5. unfold In in H5. elim H5; intros H0 H1. unfold var_lu in H1, H3. unfold eqmap in |- *. unfold eqm in |- *. intro. elim (le_lt_dec n (nat_of_N a)). (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold in_dom in H3, H1. intro. lapply (H3 a). lapply (H1 a). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (MapGet unit ve' a). Focus 2. elim (MapGet unit ve a); try reflexivity. intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) discriminate. intros. discriminate. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (leb (S (nat_of_N a)) n) with false. simpl in |- *. reflexivity. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) symmetry in |- *. apply not_true_is_false. unfold not in |- *; intro. elim (le_Sn_n n). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply le_trans with (m := S (nat_of_N a)). apply le_n_S. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply leb_complete. assumption. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (leb (S (nat_of_N a)) n) with false. simpl in |- *. reflexivity. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) symmetry in |- *. apply not_true_is_false. unfold not in |- *; intro. elim (le_Sn_n n). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply le_trans with (m := S (nat_of_N a)). apply le_n_S. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply leb_complete. assumption. intro. rewrite <- (N_of_nat_of_N a). apply (ve''_to_be_ok n ve ve'). unfold eval_be' in H4. rewrite <- H4. apply (bool_fun_of_be_ext (ve''_to_be ve n)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold var_env''_to_env, var_env'_to_env, var_env''_to_env' in |- *. intros. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite (N_of_nat_of_N x). reflexivity. assumption. Qed. Lemma ve''_to_be_ok2 : forall (n : nat) (ve : var_env''), eval_be' (ve''_to_be ve n) (var_env''_to_env' ve) = true. Proof. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) simple induction n. simpl in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_one in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) reflexivity. simpl in |- *. intros. unfold in_dom in |- *. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) elim (option_sum _ (MapGet unit ve (N_of_nat n0))). intro y. elim y; clear y. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intro x. elim x. clear x. intros y. rewrite y. unfold eval_be' in |- *. simpl in |- *. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold eval_be' in H. unfold bool_fun_and in |- *. apply andb_true_intro. split. (* Goal: be_ok (var_lu O N) (ve''_to_be ve n0) *) (* Goal: be_ok (var_lu O N) (Neg (Var (N.of_nat n0))) *) apply H. unfold bool_fun_var, var_env'_to_env, var_env''_to_env' in |- *. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (nat_of_N_of_nat n0). unfold in_dom in |- *. rewrite y. reflexivity. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y. unfold eval_be' in |- *. simpl in |- *. unfold eval_be' in H. (* Goal: be_ok (var_lu O N) (ve''_to_be ve n0) *) (* Goal: be_ok (var_lu O N) (Neg (Var (N.of_nat n0))) *) unfold bool_fun_and in |- *. apply andb_true_intro. split. apply H. unfold bool_fun_var, var_env'_to_env, var_env''_to_env', bool_fun_neg in |- *. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (nat_of_N_of_nat n0). unfold in_dom in |- *. rewrite y. reflexivity. Qed. Lemma ve''_to_be_ok3 : forall (n : nat) (ve : var_env''), n <= N -> be_ok (var_lu 0 N) (ve''_to_be ve n). Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simple induction n. intros. simpl in |- *. apply one_ok. simpl in |- *. intros. (* Goal: be_ok (var_lu O N) (ve''_to_be ve n0) *) (* Goal: be_ok (var_lu O N) (Neg (Var (N.of_nat n0))) *) elim (in_dom unit (N_of_nat n0) ve). apply and_ok. apply H. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply lt_le_weak. assumption. apply var_ok. unfold var_lu in |- *. (* Goal: @eq nat N (Init.Nat.add N O) *) (* Goal: le N (N.to_nat x1) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) apply andb_true_intro. split. auto with arith. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite (nat_of_N_of_nat n0). apply leb_correct. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply and_ok. apply H. apply lt_le_weak. assumption. apply neg_ok. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply var_ok. unfold var_lu in |- *. apply andb_true_intro. split. (* Goal: @eq nat N (Init.Nat.add N O) *) (* Goal: le N (N.to_nat x1) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) auto with arith. rewrite (nat_of_N_of_nat n0). apply leb_correct. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. Qed. Lemma env_to_be_lemma : forall S : Ensemble var_env'', Finite _ S -> Included _ S (Evar_env'' 0 N) -> exists be : bool_expr, bool_expr_to_var_env'' 0 N be = S /\ be_ok (var_lu 0 N) be. Proof. (* Goal: forall (_ : Finite var_env'' S) (_ : Included var_env'' S (Evar_env'' O N)), @ex bool_expr (fun be : bool_expr => and (@eq (Ensemble var_env'') (bool_expr_to_var_env'' O N be) S) (be_ok (var_lu O N) be)) *) intro. simple induction 1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included, bool_expr_to_var_env'', Evar_env'' in |- *. unfold In in |- *. intros. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split with Zero. split. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) apply Extensionality_Ensembles. split. unfold Included in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold In in H1. unfold eval_be' in H1. simpl in H1. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_fun_zero in H1. decompose [and] H1. discriminate. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included in |- *. unfold In in |- *. intros. elim H1. apply zero_ok. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. elim H1. clear H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. split with (Or x0 (ve''_to_be x N)). unfold bool_expr_to_var_env'' in |- *. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. elim H1. clear H1. intros y H00. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) apply Extensionality_Ensembles. split. unfold Included in |- *. unfold In in |- *. (* Goal: forall (x1 : var_env'') (_ : and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' x1)) true) (Evar_env'' O N x1)), Add var_env'' A x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) unfold Evar_env'', eval_be' in |- *. unfold bool_expr_to_var_env'' in y. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold eval_be', In, Evar_env'' in y. intros. simpl in H1. (* Goal: Add var_env'' A x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) elim H1; clear H1; intros H5 H4; elim H4; clear H4; intros H4 H7. (* Goal: Add var_env'' A x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) unfold bool_fun_or in H5. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim (orb_prop _ _ H5). clear H5. intro. unfold Add in |- *. (* Goal: Union var_env'' A (Singleton var_env'' x) x1 *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr (ve''_to_be x N) (var_env'_to_env (var_env''_to_env' x1))) true, Add var_env'' A x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) apply (Union_introl _ A (Singleton var_env'' x) x1). rewrite <- y. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold In in |- *. split. assumption. split. assumption. assumption. intro. (* Goal: Add var_env'' A x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) clear H5. unfold Add in |- *. apply (Union_intror _ A (Singleton var_env'' x) x1). (* Goal: In var_env'' (Singleton var_env'' x) x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) replace x with x1. apply In_singleton. symmetry in |- *. (* Goal: @eq var_env'' x x1 *) (* Goal: Included var_env'' (Add var_env'' A x) (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) apply (ve''_to_be_ok1 N x x1). unfold Included in H3. unfold In at 2 in H3. (* Goal: In var_env'' (Add var_env'' A x) x0 *) apply H3. unfold Add in |- *. apply Union_intror. apply In_singleton. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. split. assumption. split. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. assumption. unfold Included in |- *. intros. unfold Add in H1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim H1. intros. split. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_or in |- *. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply orb_true_intro. left. unfold bool_expr_to_var_env'' in y. (* Goal: @eq bool (bool_fun_of_bool_expr x0 (var_env'_to_env (var_env''_to_env' x2))) true *) (* Goal: In var_env'' (Evar_env'' O N) x2 *) (* Goal: forall (x1 : var_env'') (_ : In var_env'' (Singleton var_env'' x) x1), In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x1 *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) rewrite <- y in H4. unfold In in H4. unfold eval_be' in H4. (* Goal: In var_env'' (Evar_env'' O N) x2 *) (* Goal: forall (x1 : var_env'') (_ : In var_env'' (Singleton var_env'' x) x1), In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (Or x0 (ve''_to_be x N)) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x1 *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) exact (proj1 H4). rewrite <- y in H4. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) unfold bool_expr_to_var_env'' in H4. unfold In in H4. unfold In in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) exact (proj2 H4). intros. elim H4. unfold In in |- *. split. unfold eval_be' in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) simpl in |- *. unfold bool_fun_or in |- *. apply orb_true_intro. right. (* Goal: Evar_env'' O N x *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) apply (ve''_to_be_ok2 N x). unfold Included in H3. unfold In in H3. (* Goal: In var_env'' (Add var_env'' A x) x0 *) apply H3. unfold Add in |- *. apply (Union_intror _ A (Singleton var_env'' x) x). (* Goal: In var_env'' (Singleton var_env'' x) x *) (* Goal: be_ok (var_lu O N) (Or x0 (ve''_to_be x N)) *) (* Goal: Included var_env'' A (Evar_env'' O N) *) apply In_singleton. apply or_ok. exact (proj2 H1). apply ve''_to_be_ok3. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply le_n. unfold Included in |- *. intros. apply H3. unfold Add in |- *. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply Union_introl. assumption. Qed. Lemma env_to_be_lemma1 : forall S : Ensemble var_env'', Included _ S (Evar_env'' 0 N) -> exists be : bool_expr, bool_expr_to_var_env'' 0 N be = S /\ be_ok (var_lu 0 N) be. Proof. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. apply env_to_be_lemma. (* Goal: Finite var_env'' S *) (* Goal: Included var_env'' S (Evar_env'' O N) *) apply Finite_downward_closed with (A := Evar_env'' 0 N). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply Eenv''_var''finite. assumption. assumption. Qed. Lemma muevaleqset : forall (te : trans_env) (ste : set_tenv), ad_to_be_ok (var_lu 0 (2 * N)) te -> te_ste_ok te ste -> forall (f : mu_form) (re : rel_env) (sre : set_renv), f_ok f -> mu_form_ap_ok (var_lu 0 N) f -> ad_to_be_ok (var_lu 0 N) re -> re_sre_ok re sre -> mu_form2set ste f sre = bool_expr_to_var_env'' 0 N (mu_eval N te f re). Proof. (* Goal: forall (f : mu_form) (re : rel_env) (sre : set_renv) (_ : f_ok f) (_ : mu_form_ap_ok (var_lu O N) f) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste f sre) (bool_expr_to_var_env'' O N (mu_eval N te f re)) *) intro. intro. intro te_ok. intro. simple induction f. simpl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold set_0, bool_expr_to_var_env'' in |- *. intros. apply Extensionality_Ensembles. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) split. auto with sets. unfold Included in |- *. unfold eval_be' in |- *. simpl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold In, bool_fun_zero in |- *. intros. decompose [and] H4. discriminate. simpl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. apply Extensionality_Ensembles. unfold set_1 in |- *. simpl in |- *. split. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold Included in |- *. unfold Evar_env'', bool_expr_to_var_env'' in |- *. unfold In in |- *. (* Goal: and (@eq bool true true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) false, @eq bool (negb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true *) (* Goal: and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false) *) (* Goal: forall (x : var_env'') (_ : and (@eq bool (bool_fun_neg (bool_fun_of_bool_expr (mu_eval N te m re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false))), and (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) (not (and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold eval_be' in |- *. simpl in |- *. unfold Evar_env'' in |- *. tauto. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold bool_expr_to_var_env'', Evar_env'' in |- *. unfold Included in |- *. unfold eval_be' in |- *. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) simpl in |- *. unfold In in |- *. tauto. simpl in |- *. unfold set_ap in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_var in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold In in |- *. unfold Evar_env'' in |- *. unfold set_1 in |- *. unfold Evar_env'' in |- *. intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply Extensionality_Ensembles. split. unfold Included in |- *. unfold In in |- *. intros. (* Goal: and (@eq bool (var_env'_to_env (var_env''_to_env' x) a) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (var_env'_to_env (var_env''_to_env' ve) a) true) (and (mapcanon unit ve) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x ve) false))) (fun s : var_env'' => and (and (mapcanon unit s) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x s) false)) (@eq bool (in_dom unit a s) true)) *) (* Goal: forall (a : ad) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_rel_var a)) (_ : mu_form_ap_ok (var_lu O N) (mu_rel_var a)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_rel_var a) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_rel_var a) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_neg m)) (_ : mu_form_ap_ok (var_lu O N) (mu_neg m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_neg m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_neg m) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H4; intros H5 H7; elim H5; clear H5; intros H5 H8. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. unfold var_env'_to_env, var_env''_to_env' in |- *. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite (N_of_nat_of_N a). assumption. split. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (set_and (set_impl (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve))) (set_impl (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_env'_to_env, var_env''_to_env' in |- *. rewrite (N_of_nat_of_N a). (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold Included in |- *. unfold In in |- *. tauto. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simpl in |- *. unfold re_sre_ok in |- *. intros. symmetry in |- *. apply H3. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. simpl in |- *. inversion H2. rewrite (H0 re sre). (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' t1)) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_neg, bool_expr_to_var_env'' in |- *. unfold Setminus in |- *. unfold eval_be' in |- *. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) simpl in |- *. apply Extensionality_Ensembles. unfold Same_set in |- *. unfold Included in |- *. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) unfold In in |- *. unfold var_env'_to_env, var_env''_to_env' in |- *. unfold set_1 in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Evar_env'' in |- *. split. intros. (* Goal: and (@eq bool (bool_fun_neg (bool_fun_of_bool_expr (mu_eval N te m re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) *) (* Goal: forall (x : var_env'') (_ : and (@eq bool (bool_fun_neg (bool_fun_of_bool_expr (mu_eval N te m re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false))), and (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) (not (and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H8 H10; elim H8; clear H8; intros H8 H11. (* Goal: forall (x : var_env'') (_ : and (@eq bool (bool_fun_neg (bool_fun_of_bool_expr (mu_eval N te m re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false))), and (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) (not (and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_fun_neg in |- *. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. elim (sumbool_of_bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N_of_nat (nat_of_N x0)) x))). (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y in H10. elim H10. tauto. intro y. rewrite y. reflexivity. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) split. assumption. assumption. unfold bool_fun_neg in |- *. intros. (* Goal: and (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)) (not (and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false)))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H9 H8; elim H8; clear H8; intros H8 H11. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) split. split. assumption. assumption. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold not in |- *; intro. (* Goal: False *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_and m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_and m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H10; intros H13 H12; elim H12; clear H12; intros H12 H15. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite H13 in H9. discriminate. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) inversion H1. assumption. assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simpl in |- *. intros. inversion H3. rewrite (H0 re sre). rewrite (H1 re sre). (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' t1)) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_and, bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. (* Goal: @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) unfold var_env'_to_env, var_env''_to_env' in |- *. apply Extensionality_Ensembles. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Same_set in |- *. unfold Included in |- *. split. intros. inversion H10. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) simpl in |- *. unfold bool_fun_and in |- *. unfold In in H11, H12. unfold In in |- *. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (proj1 H11). rewrite (proj1 H12). split. reflexivity. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) exact (proj2 H12). intros. simpl in H10. unfold bool_fun_and in H10. (* Goal: In var_env'' (Intersection var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold In in H10. (* Goal: In var_env'' (Intersection var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H10; clear H10; intros H12 H13. (* Goal: In var_env'' (Intersection var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_or m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_or m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (andb_prop _ _ H12). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. apply Intersection_intro. unfold In in |- *. rewrite H10. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) split; [ reflexivity | assumption ]. unfold In in |- *. rewrite H11. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) split; [ reflexivity | assumption ]. inversion H2. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. inversion H2. assumption. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simpl in |- *. intros. rewrite (H0 re sre). rewrite (H1 re sre). (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' t1)) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_or, bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. (* Goal: @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) unfold var_env'_to_env, var_env''_to_env' in |- *. apply Extensionality_Ensembles. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Same_set in |- *. unfold Included in |- *. split. intros. inversion H6. unfold In in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) simpl in |- *. unfold bool_fun_or in |- *. unfold In in H7. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H10 H11. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) rewrite H10. auto with bool. unfold In in |- *. unfold In in H7. simpl in |- *. (* Goal: and (@eq bool (bool_fun_or (bool_fun_of_bool_expr (mu_eval N te m re)) (bool_fun_of_bool_expr (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Or (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (Union var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_fun_or in |- *. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H10 H11. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite H10. auto with bool. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. simpl in H6. unfold In in H6. unfold bool_fun_or in H6. (* Goal: In var_env'' (Union var_env'' (fun x : var_env'' => and (In var_env'' (Evar_env'' O N) x) (not (In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H8 H9. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true, In var_env'' (Union var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true, In var_env'' (Union var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_impl m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_impl m m0) re)) *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (orb_true_elim _ _ H8). intros y. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) apply Union_introl. unfold In in |- *. rewrite y. auto with bool. intro y. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) apply Union_intror. unfold In in |- *. rewrite y. auto with bool. inversion H2. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. inversion H3. assumption. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) inversion H2. assumption. inversion H3. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simpl in |- *. intros. rewrite (H0 re sre). rewrite (H1 re sre). (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' t1)) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_impl, bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. (* Goal: @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) *) unfold var_env'_to_env, var_env''_to_env' in |- *. apply Extensionality_Ensembles. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Same_set in |- *. unfold Included in |- *. split. intros. unfold In in |- *. simpl in |- *. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_fun_impl in |- *. inversion H6. unfold set_neg in H7. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold Setminus in H7. unfold In in H7. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H10 H11. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) true) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold implb in |- *. (* Goal: and (@eq bool (if bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x) then true else true) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold ifb in |- *. elim (sumbool_of_bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x1 : BDDvar => in_dom unit (N_of_nat (nat_of_N x1)) x))). (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y in H11. unfold set_1 in H10. elim H11. auto with bool. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y. auto with bool. unfold In in H7. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H7; intros H10 H11. (* Goal: and (@eq bool (implb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Impl (mu_eval N te m re) (mu_eval N te m0 re)) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite H10. unfold implb in |- *. unfold ifb in |- *. elim (bool_fun_of_bool_expr (mu_eval N te m re) (fun x1 : BDDvar => in_dom unit (N_of_nat (nat_of_N x1)) x)); (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) auto with bool. unfold set_or, set_neg in |- *. unfold Setminus in |- *. simpl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold bool_fun_impl in |- *. unfold set_1 in |- *. intros. unfold In in H6. (* Goal: In var_env'' (Union var_env'' (fun x : var_env'' => and (In var_env'' (Evar_env'' O N) x) (not (In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H8 H9. (* Goal: In var_env'' (Union var_env'' (fun x : var_env'' => and (In var_env'' (Evar_env'' O N) x) (not (In var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) x))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold implb in H8. unfold ifb in H8. elim (sumbool_of_bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N_of_nat (nat_of_N x0)) x))). (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y in H8. apply Union_intror. unfold In in |- *. rewrite H8. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) auto with bool. intro y. apply Union_introl. unfold In in |- *. split. assumption. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold not in |- *; intro. (* Goal: False *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (m0 : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m0 sre) (bool_expr_to_var_env'' O N (mu_eval N te m0 re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_iff m m0) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_iff m m0) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; intros H10 H11. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite y in H10. discriminate. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) inversion H2. assumption. inversion H3. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. inversion H2. assumption. inversion H3. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) simpl in |- *. intros. rewrite (H0 re sre). rewrite (H1 re sre). (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' t1)) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_iff, bool_expr_to_var_env'' in |- *. unfold eval_be' in |- *. (* Goal: @eq (Ensemble var_env'') (set_and (set_impl (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve))) (set_impl (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (var_env'_to_env (var_env''_to_env' ve))) true) (In var_env'' (Evar_env'' O N) ve)) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_env'_to_env, var_env''_to_env' in |- *. unfold set_and, set_impl in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply Extensionality_Ensembles. split. unfold Included in |- *. intros. unfold In in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) simpl in |- *. unfold bool_fun_iff in |- *. inversion H6. clear H6. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_or, set_neg in H7. unfold Setminus in H7. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_or, set_neg in H8. unfold Setminus in H8. unfold set_1 in H7. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_1 in H8. inversion H7. unfold In in H6. clear H7. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H11 H12. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. inversion H8. clear H8. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold In in H6. (* Goal: @eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true *) (* Goal: @eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true *) (* Goal: Evar_env'' O N x *) (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H13 H14. replace (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N_of_nat (nat_of_N x0)) x)) with false. replace (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N_of_nat (nat_of_N x0)) x)) with false. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) reflexivity. symmetry in |- *. apply not_true_is_false. (* Goal: @eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) false *) (* Goal: @eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true *) (* Goal: Evar_env'' O N x *) (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) exact (fun x => H14 (conj x H13)). symmetry in |- *. apply not_true_is_false. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) exact (fun x => H12 (conj x H13)). unfold In in H6. (* Goal: @eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true *) (* Goal: Evar_env'' O N x *) (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; intros H14 H15. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite H14 in H12. elim H12; auto with bool. assumption. unfold In in H6. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H12 H13. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) inversion H8. clear H8. unfold In in H6. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; clear H6; intros H14 H15. (* Goal: and (@eq bool true true) (Evar_env'' O N x) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) false, In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite H12 in H15. elim H15; auto with bool. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold In in H6. (* Goal: and (@eq bool (eqb (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x)) (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x0 : BDDvar => in_dom unit (N.of_nat (N.to_nat x0)) x))) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (Iff (mu_eval N te m re) (mu_eval N te m0 re)) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)) (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; intros H15 H16. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite H12. rewrite H15. split. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) reflexivity. assumption. unfold Included in |- *. intros. unfold In in H6. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) simpl in H6. unfold bool_fun_iff in H6. (* Goal: In var_env'' (Intersection var_env'' (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (set_or (set_neg (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m0 re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve))) (fun ve : var_env'' => and (@eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x : BDDvar => in_dom unit (N.of_nat (N.to_nat x)) ve)) true) (In var_env'' (Evar_env'' O N) ve)))) x *) (* Goal: f_ok m0 *) (* Goal: mu_form_ap_ok (var_lu O N) m0 *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_all a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_all a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H6; intros H8 H9. elim (sumbool_of_bool (bool_fun_of_bool_expr (mu_eval N te m re) (fun x0 : BDDvar => in_dom unit (N_of_nat (nat_of_N x0)) x))). (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. apply Intersection_intro. unfold set_or, set_neg in |- *. unfold Setminus in |- *. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) apply Union_intror. unfold In in |- *. rewrite (eqb_prop _ _ H8) in y. rewrite y. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) auto with bool. unfold set_or, set_neg in |- *. apply Union_intror. unfold In in |- *. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) rewrite y. auto with bool. intro y. apply Intersection_intro. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold set_or, set_neg in |- *. apply Union_introl. unfold Setminus, In in |- *. rewrite y. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold set_1 in |- *. split. assumption. unfold not in |- *; intros. decompose [and] H7. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) discriminate. unfold set_or, set_neg in |- *. apply Union_introl. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold Setminus, In in |- *. unfold set_1 in |- *. split. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) rewrite <- (eqb_prop _ _ H8). rewrite y. unfold not in |- *; intro. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) decompose [and] H7. discriminate. inversion H2. assumption. inversion H3. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. assumption. inversion H2. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) inversion H3. assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. simpl in |- *. unfold set_all in |- *. inversion H1. inversion H2. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (H0 re sre). apply Extensionality_Ensembles. split. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included in |- *. intros. unfold In in |- *. unfold bool_expr_to_var_env'' in |- *. (* Goal: ste a x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold te_ste_ok in H. unfold In in H11. (* Goal: set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H11; clear H11; intros H13 H14. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold set_1 in H13. split. apply mu_all_eval_semantics2. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6). intros. apply H11. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. unfold Evar_env'' in H13. unfold var_env''_to_env' in |- *. intros. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply not_false_is_true. unfold not in |- *; intro. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (proj2 H13 _ H12) in H11. discriminate. (* Goal: @eq bool (eval_be' (te t) (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' t1)))) true *) (* Goal: In var_env'' (Evar_env'' O N) t1 *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold new_t_to_rel in H. unfold t_to_rel in H. unfold t_to_rel1 in H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold bool_expr_to_var_env'' in H14. replace (eval_be' (mu_eval N te m re) ve') with (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' 0 N ve'))). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (H14 (var_env'_to_env'' 0 N ve')). intros. apply H15. clear H14. (* Goal: ste a x (var_env'_to_env'' O N ve') *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) apply (proj1 (H a x (var_env'_to_env'' 0 N ve'))). rewrite <- H12. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) split. apply bool_fun_of_be_ext1. intros. unfold ad_to_be_ok in te_ok. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) cut (var_lu 0 (2 * N) x0 = true). intro. unfold var_lu in H15. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (andb_prop _ _ H15). intros. unfold var_env'_or in |- *. (* Goal: Evar_env'' O N (var_env'_to_env'' O N ve) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold var_env'_to_env'' in |- *. unfold var_env''_to_env' at 2 in |- *. (* Goal: and (mapcanon unit (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve' (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve' (@eq_refl nat (Init.Nat.sub N O)) in ve'')) false) *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N ve' (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x1 : ad) (_ : @eq bool (var_lu O N x1) true), @eq bool (in_dom unit x1 x) (x0 (N.to_nat x1)))), and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) intros x1 y. (* Goal: @eq bool (orb (var_env''_to_env' x (N.to_nat x0)) (var_env'_dash N (fun n : nat => in_dom unit (N.of_nat n) x1) (N.to_nat x0))) (orb (var_env''_to_env' x (N.to_nat x0)) (var_env'_dash N ve' (N.to_nat x0))) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x0) true *) (* Goal: rel_1 x (var_env'_to_env'' O N ve') *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim y; intros H19 H20. (* Goal: @eq bool (orb (var_env''_to_env' x (N.to_nat x0)) (var_env'_dash N (fun n : nat => in_dom unit (N.of_nat n) x1) (N.to_nat x0))) (orb (var_env''_to_env' x (N.to_nat x0)) (var_env'_dash N ve' (N.to_nat x0))) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x0) true *) (* Goal: rel_1 x (var_env'_to_env'' O N ve') *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env''_to_env' x (nat_of_N x0)). (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) reflexivity. simpl in |- *. unfold var_env'_dash in |- *. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) elim (sumbool_of_bool (leb N (nat_of_N x0))). intro y0. rewrite y0. (* Goal: @eq bool (in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x0) N)) x1) (ve' (Init.Nat.sub (N.to_nat x0) N)) *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x0)) false, @eq bool (if Nat.leb N (N.to_nat x0) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x0) N)) x1 else false) (if Nat.leb N (N.to_nat x0) then ve' (Init.Nat.sub (N.to_nat x0) N) else false) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x0) true *) (* Goal: rel_1 x (var_env'_to_env'' O N ve') *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (H20 (N_of_nat (nat_of_N x0 - N))). (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (nat_of_N_of_nat (nat_of_N x0 - N)). reflexivity. (* Goal: @eq nat N (Init.Nat.add N O) *) (* Goal: le N (N.to_nat x1) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_lu in |- *. apply andb_true_intro. split. auto with arith. (* Goal: @eq bool (Nat.leb (S (Init.Nat.sub (N.to_nat x1) N)) N) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (nat_of_N_of_nat (nat_of_N x0 - N)). apply leb_correct. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (minus_Sn_m (nat_of_N x0) N). cut (N = 2 * N - N). intro. replace (S (nat_of_N x0) - N <= N) with (S (nat_of_N x0) - N <= 2 * N - N). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply le_minus_le1. apply leb_complete. assumption. unfold mult at 1 in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (N + (N + 0) - N) with N. reflexivity. simpl in |- *. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (N + 0) with N. apply plus_minus. reflexivity. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) auto with arith. apply leb_complete; assumption. intro y0. rewrite y0. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) reflexivity. apply be_ok_be_x_free with (be := te t). apply te_ok. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite H5. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold rel_1 in |- *. unfold set_1 in |- *. split. assumption. unfold In in |- *. (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) true), @eq bool (in_dom unit x0 x) (ve' (N.to_nat x0)))), and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false) *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold Evar_env'' in |- *. unfold var_env'_to_env'' in |- *. (* Goal: and (mapcanon unit (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve' (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve' (@eq_refl nat (Init.Nat.sub N O)) in ve'')) false) *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N ve' (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) unfold Evar_env'' in |- *. unfold In in |- *. intros x0 y. (* Goal: and (mapcanon unit x0) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x x0) false) *) (* Goal: @eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N ve'))) (eval_be' (mu_eval N te m re) ve') *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_all_eval N (te a) (mu_eval N te m re))) (fun s : var_env'' => and (In var_env'' set_1 s) (forall (t : var_env'') (_ : ste a s t), In var_env'' (bool_expr_to_var_env'' O N (mu_eval N te m re)) t)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim y; intros H14 H16; elim H14; clear H14; intros H14 H17. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. assumption. apply bool_fun_of_be_ext1. intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6 H9). intros. clear H17. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (var_env'_to_env''_to_env' 0 N ve' x0). reflexivity. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply be_ok_be_x_free with (be := mu_eval N te m re). apply H16. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. assumption. unfold Included in |- *. unfold In in |- *. intros. (* Goal: and (set_1 x) (forall (t : var_env'') (_ : ste a x t), bool_expr_to_var_env'' O N (mu_eval N te m re) t) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_expr_to_var_env'' in H11. (* Goal: set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H11; clear H11; intros H13 H14. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) split. unfold set_1 in |- *. assumption. intros. unfold te_ste_ok in H. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold bool_expr_to_var_env'' in |- *. split. apply mu_all_eval_semantics1 with (N := N) (t := te t) (ve := var_env''_to_env' x). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6). intros. apply H12. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. intros. unfold Evar_env'', In in H14. (* Goal: @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_all_eval N (te t) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' t1 n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (te t) (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' t1)))) true *) (* Goal: In var_env'' (Evar_env'' O N) t1 *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_env''_to_env' in H12. (* Goal: @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_all_eval N (te t) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' t1 n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (te t) (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' t1)))) true *) (* Goal: In var_env'' (Evar_env'' O N) t1 *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H14; intros H16 H17. (* Goal: @eq bool (var_lu O N (N.of_nat (Init.Nat.sub (N.to_nat x1) N))) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_lu in |- *. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (nat_of_N_of_nat n). apply andb_true_intro. split. (* Goal: @eq nat N (Init.Nat.add N O) *) (* Goal: le N (N.to_nat x1) *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) auto with arith. unfold var_lu in H17. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) cut (leb 0 n && leb (S n) N = true). intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (andb_prop _ _ H15). intros. assumption. apply not_false_is_true. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold not in |- *. replace n with (nat_of_N (N_of_nat n)). intro. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (H17 _ H15) in H12. discriminate. apply nat_of_N_of_nat. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite H5. assumption. unfold new_t_to_rel in H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (proj2 (H a x t1) H11). intros. unfold rel_1 in H15. (* Goal: @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (te t) (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' t1)))) true *) (* Goal: In var_env'' (Evar_env'' O N) t1 *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold set_1 in H15. unfold Evar_env'' in H15. unfold In in H15. (* Goal: @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (te t) (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' t1)))) true *) (* Goal: In var_env'' (Evar_env'' O N) t1 *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_ex a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_ex a m) re)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_env''_to_env' in H16. elim H15; intros H17 H18; elim H17; clear H17; intros H17 H20; elim H18; clear H18; intros H18 H21. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply not_false_is_true. unfold not in |- *; intro. rewrite (H21 _ H19) in H16. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) discriminate. unfold new_t_to_rel in H. unfold t_to_rel in H. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold t_to_rel1 in H. elim (H t x t1). intros. rewrite <- H5 in H11. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (H15 H11). intros. assumption. elim (H t x t1). intros. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) rewrite <- H5 in H11. elim (H15 H11). intros. unfold rel_1, set_1 in H17. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) exact (proj2 H17). assumption. assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. simpl in |- *. (* Unfold set_ex. *) inversion H1. inversion H2. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (H0 re sre). apply Extensionality_Ensembles. split. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included in |- *. intros. unfold In in |- *. unfold bool_expr_to_var_env'' in |- *. (* Goal: and (@eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true) (In var_env'' (Evar_env'' O N) x) *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold te_ste_ok in H. unfold In in H11. (* Unfold set_ex in H11. *) elim H11. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. elim (proj2 (H a s t1) H13). intros. unfold rel_1, set_1 in H16. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. apply mu_ex_eval_semantics2. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6 H9). intros. apply H17. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold set_1, In in H12. unfold Evar_env'' in H12. intros. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold var_env''_to_env' in H17. apply not_false_is_true. unfold not in |- *; intro. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (proj2 H12 _ H18) in H17. discriminate. (* Goal: @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @eq bool (var_lu O N (N.of_nat n)) true) (and (@eq bool (eval_be' (te a) (var_env'_or (var_env''_to_env' s) (var_env'_dash N ve'))) true) (@eq bool (eval_be' (mu_eval N te m re) ve') true))) *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) split with (var_env''_to_env' t1). unfold In, Evar_env'' in H16. elim H16; intros H17 H18; elim H17; clear H17; intros H17 H20; elim H18; clear H18; intros H18 H21. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) split. intros. apply not_false_is_true. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold not in |- *; intro. unfold var_env''_to_env' in H19. (* Goal: False *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (H21 _ H22) in H19. discriminate. split. unfold t_to_rel in H15. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold t_to_rel1 in H15. assumption. unfold eval_be' in |- *. unfold In in H14. (* Goal: @eq bool (bool_fun_of_bool_expr (mu_eval N te m re) (var_env'_to_env (var_env''_to_env' t1))) true *) (* Goal: In var_env'' (Evar_env'' O N) s *) (* Goal: Included var_env'' (bool_expr_to_var_env'' O N (mu_ex_eval N (te a) (mu_eval N te m re))) (set_ex (ste a) (bool_expr_to_var_env'' O N (mu_eval N te m re))) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold bool_expr_to_var_env'' in H14. unfold eval_be' in H14. (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) exact (proj1 H14). exact (proj1 H16). unfold Included in |- *. unfold In in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold bool_expr_to_var_env'' in |- *. intros. (* Goal: set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H11; clear H11; intros H13 H14. elim mu_ex_eval_semantics1 with (N := N) (t := te a) (be := mu_eval N te m re) (ve := var_env''_to_env' x). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. (* Goal: set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H11; clear H11; intros H15 H12; elim H12; clear H12; intros H12 H17. cut (forall s t0 : var_env'', In var_env'' set_1 s -> ste a s t0 -> In var_env'' (fun ve : var_env'' => eval_be' (mu_eval N te m re) (var_env''_to_env' ve) = true /\ In var_env'' (Evar_env'' 0 N) ve) t0 -> In var_env'' (set_ex (ste a) (fun ve : var_env'' => eval_be' (mu_eval N te m re) (var_env''_to_env' ve) = true /\ In var_env'' (Evar_env'' 0 N) ve)) s). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold In in |- *. intros. apply H11 with (s := x) (t0 := var_env'_to_env'' 0 N x0). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold set_1 in |- *. assumption. unfold te_ste_ok in H. (* Goal: ste a x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) apply (proj1 (H a x (var_env'_to_env'' 0 N x0))). unfold new_t_to_rel in |- *. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold t_to_rel in |- *. unfold t_to_rel1 in |- *. split. rewrite <- H12. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply bool_fun_of_be_ext1. intros. (* Goal: @eq bool (var_env'_or (var_env''_to_env' x) (var_env'_dash N (var_env''_to_env' (var_env'_to_env'' O N x0))) (N.to_nat x1)) (var_env'_or (var_env''_to_env' x) (var_env'_dash N x0) (N.to_nat x1)) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold var_env'_or, var_env''_to_env', var_env'_dash in |- *. (* Goal: @eq bool (orb (in_dom unit (N.of_nat (N.to_nat x1)) x) (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false)) (orb (in_dom unit (N.of_nat (N.to_nat x1)) x) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false)) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (N_of_nat_of_N x1). elim (sumbool_of_bool (in_dom unit x1 x)). (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) intro y. rewrite y. simpl in |- *. reflexivity. intro y. rewrite y. simpl in |- *. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) elim (sumbool_of_bool (leb N (nat_of_N x1))). intro y0. rewrite y0. (* Goal: Evar_env'' O N (var_env'_to_env'' O N ve) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold var_env'_to_env'' in |- *. (* Goal: and (mapcanon unit (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N x0 (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x1 : ad) (_ : @eq bool (var_lu O N x1) true), @eq bool (in_dom unit x1 x) (x0 (N.to_nat x1)))), @eq bool (in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) x) (x0 (Init.Nat.sub (N.to_nat x1) N)) *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) intros x2 y1. (* Goal: @eq bool (in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) x2) (x0 (Init.Nat.sub (N.to_nat x1) N)) *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim y1; intros H19 H20. (* Goal: @eq bool (in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) x2) (x0 (Init.Nat.sub (N.to_nat x1) N)) *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (H20 (N_of_nat (nat_of_N x1 - N))). (* Goal: @eq bool (Nat.leb (S (N.to_nat (N.of_nat (Init.Nat.sub (N.to_nat x1) N)))) N) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (nat_of_N_of_nat (nat_of_N x1 - N)). (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) reflexivity. unfold var_lu in |- *. apply andb_true_intro. split. (* Goal: @eq bool (Nat.leb (S (Init.Nat.sub (N.to_nat x1) N)) N) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) apply leb_correct. apply le_O_n. (* Goal: @eq bool (Nat.leb (S (N.to_nat (N.of_nat (Init.Nat.sub (N.to_nat x1) N)))) N) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (nat_of_N_of_nat (nat_of_N x1 - N)). (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) cut (var_lu 0 (2 * N) x1 = true). intro. unfold var_lu in H18. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (andb_prop _ _ H18). intros. clear H21. apply leb_correct. (* Goal: le (S (Init.Nat.sub (N.to_nat x1) N)) N *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x1) true *) (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x1)) false, @eq bool (if Nat.leb N (N.to_nat x1) then in_dom unit (N.of_nat (Init.Nat.sub (N.to_nat x1) N)) (var_env'_to_env'' O N x0) else false) (if Nat.leb N (N.to_nat x1) then x0 (Init.Nat.sub (N.to_nat x1) N) else false) *) (* Goal: rel_1 x (var_env'_to_env'' O N x0) *) (* Goal: and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' (var_env'_to_env'' O N x0))) true) (Evar_env'' O N (var_env'_to_env'' O N x0)) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) rewrite (minus_Sn_m (nat_of_N x1) N). replace (S (nat_of_N x1) - N <= N) with (S (nat_of_N x1) - N <= 2 * N - N). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply le_minus_le1. apply leb_complete. assumption. unfold mult at 1 in |- *. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (N + (N + 0) - N) with N. reflexivity. simpl in |- *. (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) replace (N + 0) with N. apply plus_minus. reflexivity. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) auto with arith. apply leb_complete; assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply be_ok_be_x_free with (be := te a). apply te_ok. assumption. intro y0. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite y0. reflexivity. unfold rel_1 in |- *. unfold set_1 in |- *. split. assumption. (* Goal: Evar_env'' O N (var_env'_to_env'' O N ve) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold var_env'_to_env'' in |- *. (* Goal: and (mapcanon unit (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N x0 (refl_equal (N - 0))). (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intros x1 y. exact (proj1 y). split. rewrite <- H17. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply bool_fun_of_be_ext1. intros. apply var_env'_to_env''_to_env'. (* Goal: @eq bool (var_lu O N x1) true *) (* Goal: Evar_env'' O N (var_env'_to_env'' O N x0) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) apply be_ok_be_x_free with (be := mu_eval N te m re). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6 H9). intros. apply H18. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. unfold Evar_env'', var_env'_to_env'' in |- *. (* Goal: and (mapcanon unit (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N x0 (@eq_refl nat (Init.Nat.sub N O)) in ve'')) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N x0 (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x1 : ad) (_ : @eq bool (var_lu O N x1) true), @eq bool (in_dom unit x1 x) (x0 (N.to_nat x1)))), and (mapcanon unit x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) false), @eq bool (in_dom unit x0 x) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) intros x1 y. unfold Evar_env'' in y. unfold In in y. (* Goal: and (mapcanon unit x1) (forall (x : ad) (_ : @eq bool (var_lu O N x) false), @eq bool (in_dom unit x x1) false) *) (* Goal: forall (s t0 : var_env'') (_ : In var_env'' set_1 s) (_ : ste a s t0) (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) t0), In var_env'' (set_ex (ste a) (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te m re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve))) s *) (* Goal: be_ok (var_lu O N) (mu_eval N te m re) *) (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim y; intros H16 H19; elim H16; clear H16; intros H16 H20. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) split. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. exact (setex_intro (ste a) (fun ve : var_env'' => eval_be' (mu_eval N te m re) (var_env''_to_env' ve) = true /\ In var_env'' (Evar_env'' 0 N) ve)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m H6 H9). intros. apply H11. assumption. (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) unfold In, Evar_env'' in H14. (* Goal: forall (n : nat) (_ : @eq bool (var_env''_to_env' x n) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (eval_be' (mu_ex_eval N (te a) (mu_eval N te m re)) (var_env''_to_env' x)) true *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) re *) (* Goal: re_sre_ok re sre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (re : rel_env) (sre : set_renv) (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste m sre) (bool_expr_to_var_env'' O N (mu_eval N te m re))) (re : rel_env) (sre : set_renv) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)) (_ : ad_to_be_ok (var_lu O N) re) (_ : re_sre_ok re sre), @eq (Ensemble var_env'') (mu_form2set ste (mu_mu a m) sre) (bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re)) *) elim H14; intros H12 H15. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply not_false_is_true. unfold not in |- *; intro. unfold var_env''_to_env' in H11. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) rewrite (H15 _ H16) in H11. discriminate. assumption. assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold bool_expr_to_var_env'' in |- *. inversion H1. inversion H2. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply Extensionality_Ensembles. split. unfold Included in |- *. intros. (* Goal: forall (x : var_env'') (_ : In var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) x), In var_env'' (mu_form2set ste (mu_mu a m) sre) x *) simpl in H12. unfold In in H12. unfold set_mu in H12. unfold In in |- *. (* Goal: and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' x)) true) (Evar_env'' O N x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) cut (bool_expr_to_var_env'' 0 N (mu_eval N te (mu_mu a m) re) x). (* Goal: In var_env'' (bool_expr_to_var_env'' O N Be) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold bool_expr_to_var_env'' in |- *. trivial. unfold In in H12. apply H12. (* Goal: state_set (fun x : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) x) *) (* Goal: Included var_env'' (mu_form2set ste m (sre_put sre a (fun x : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) x))) (fun x : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) x) *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold state_set in |- *. unfold set_1, Included in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold bool_expr_to_var_env'', Evar_env'', In in |- *. intros. exact (proj2 H13). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included in |- *. intros. unfold In in |- *. unfold In in H13. cut (mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' 0 N (mu_eval N te (mu_mu a m) re) v)) x0). rewrite (H0 (re_put re a (mu_eval N te (mu_mu a m) re)) (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' 0 N (mu_eval N te (mu_mu a m) re) v))) . (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold bool_expr_to_var_env'' in |- *. intros. (* Goal: and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' x0)) true) (In var_env'' (Evar_env'' O N) x0) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a (mu_eval N te (mu_mu a m) re)) *) (* Goal: re_sre_ok (re_put re a (mu_eval N te (mu_mu a m) re)) (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) elim H14; clear H14; intros H16 H17. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_mu_is_lfp N te te_ok a m re). intros. unfold fp in H14. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold be_eq in H14. rewrite (H14 (var_env''_to_env' x0)). split. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. unfold ad_to_be_ok in |- *. intros. unfold re_put in |- *. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) elim (sumbool_of_bool (Neqb a x1)). intro y. rewrite y. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok (mu_mu a m)). intros. apply H14. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. assumption. assumption. intro y. rewrite y. apply H3. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold re_sre_ok in |- *. unfold re_put, sre_put in |- *. intro. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) elim (sumbool_of_bool (Neqb a P1)). intro y. rewrite y. (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then mu_eval N te (mu_mu a m) re else re P1)) (if N.eqb a P1 then fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v else sre P1) *) (* Goal: mu_form2set ste m (sre_put sre a (fun v : var_env'' => bool_expr_to_var_env'' O N (mu_eval N te (mu_mu a m) re) v)) x0 *) (* Goal: Included var_env'' (fun ve : var_env'' => and (@eq bool (eval_be' (mu_eval N te (mu_mu a m) re) (var_env''_to_env' ve)) true) (In var_env'' (Evar_env'' O N) ve)) (mu_form2set ste (mu_mu a m) sre) *) unfold bool_expr_to_var_env'' in |- *. reflexivity. intro y. rewrite y. apply H4. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold Included in |- *. unfold In in |- *. intros. simpl in |- *. unfold set_mu in |- *. intros. (* Goal: In var_env'' X x *) elim H12; clear H12; intros H16 H17. (* Goal: In var_env'' X x *) elim (env_to_be_lemma1 X H13). intro Be. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intro. elim H12. clear H12. intros y H00. (* Goal: In var_env'' X x *) rewrite (H0 (re_put re a Be) (sre_put sre a X)) in H14. simpl in H16. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m). intros. (* Goal: In var_env'' X x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim H15; intros H19 H18; elim H18; clear H18; intros H18 H21. (* Goal: and (@eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true) (Evar_env'' O N (var_env'_to_env'' O N ve)) *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) clear H15 H18. rewrite <- y. unfold bool_expr_to_var_env'' in |- *. split. cut (be_le (fst (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval N te m (re_put re a be)) Zero N)) Be). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) intro. unfold be_le in H15. apply H15. assumption. apply be_le_trans with (be2 := fst (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be N)). apply be_le_trans with (be2 := be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Zero (two_power N)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply be_eq_le. apply be_iter2n_2n. intros. apply H21. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold ad_to_be_eq, re_put in |- *. intros. elim (Neqb a x0). assumption. (* Goal: be_eq (re x0) (re x0) *) (* Goal: be_le (be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (two_power N)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply be_eq_refl. apply be_le_trans with (be2 := be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (two_power N)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply be_iter1_le_preserved. apply be_le_zero. intros. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold re_to_be_inc in H19. apply H19. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply be_eq_le. apply be_eq_sym. apply be_iter2n_2n. intros. apply H21. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold ad_to_be_eq, re_put in |- *. intro. elim (Neqb a x0). assumption. (* Goal: be_eq (re x0) (re x0) *) (* Goal: be_le (be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (two_power N)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply be_eq_refl. apply be_le_trans with (be2 := be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (two_power N)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) apply be_eq_le. apply be_iter2n_2n. intros. apply H21. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold ad_to_be_eq, re_put in |- *. intro. elim (Neqb a x0). assumption. (* Goal: be_eq (re x0) (re x0) *) (* Goal: be_le (be_iter1 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (two_power N)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply be_eq_refl. rewrite (be_iter1eq2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) (two_power N) Be). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) generalize (two_power N). simple induction n. simpl in |- *. apply be_le_refl. intros. (* Goal: be_le (be_iter2 (fun be : bool_expr => mu_eval N te m (re_put re a be)) Be (S n0)) Be *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) simpl in |- *. apply be_le_trans with (be2 := mu_eval N te m (re_put re a Be)). (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) unfold re_to_be_inc in H19. apply H19. assumption. assumption. (* Goal: forall (ve : var_env') (_ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) ve) true), @eq bool (eval_be' Be ve) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold be_le in |- *. intro. replace (eval_be' (mu_eval N te m (re_put re a Be)) ve) with (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' 0 N ve))). replace (eval_be' Be ve) with (eval_be' Be (var_env''_to_env' (var_env'_to_env'' 0 N ve))). (* Goal: forall _ : @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) true, @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) true *) (* Goal: @eq bool (eval_be' Be (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' Be ve) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite <- y in H14. unfold Included, bool_expr_to_var_env'' in H14. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold In in H14. intros. elim (H14 (var_env'_to_env'' 0 N ve)). intros. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. split. assumption. unfold var_env'_to_env'' in |- *. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N ve (refl_equal (N - 0))). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros x0 y0. exact (proj1 y0). apply bool_fun_of_be_ext1. intros. (* Goal: @eq bool (var_env''_to_env' (var_env'_to_env'' O N ve) (N.to_nat x0)) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) unfold var_env''_to_env', var_env'_to_env'' in |- *. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N ve (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) true), @eq bool (in_dom unit x0 x) (ve (N.to_nat x0)))), @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intros x1 y0. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x1) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim y0; intros H22 H23. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x1) (ve (N.to_nat x0)) *) (* Goal: @eq bool (eval_be' (mu_eval N te m (re_put re a Be)) (var_env''_to_env' (var_env'_to_env'' O N ve))) (eval_be' (mu_eval N te m (re_put re a Be)) ve) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite <- (H23 _ (be_ok_be_x_free _ _ H00 _ H18)). (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (N_of_nat_of_N x0). reflexivity. apply bool_fun_of_be_ext1. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. unfold var_env''_to_env', var_env'_to_env'' in |- *. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub N O) O N ve (@eq_refl nat (Init.Nat.sub N O)) in ve'')) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim (var_env'_to_var_env''_lemma2 (N - 0) 0 N ve (refl_equal (N - 0))). (* Goal: forall (x : var_env'') (_ : and (In var_env'' (Evar_env'' O N) x) (forall (x0 : ad) (_ : @eq bool (var_lu O N x0) true), @eq bool (in_dom unit x0 x) (ve (N.to_nat x0)))), @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) intros x1 y0. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x1) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) elim y0; intros H22 H23. (* Goal: @eq bool (in_dom unit (N.of_nat (N.to_nat x0)) x1) (ve (N.to_nat x0)) *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite (N_of_nat_of_N x0). (* Goal: @eq bool (in_dom unit x0 x1) (in_dom unit x0 x1) *) (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) rewrite <- (H23 x0). reflexivity. (* Goal: @eq bool (var_lu O N x0) true *) (* Goal: In var_env'' (Evar_env'' O N) x *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: ad_to_be_ok (var_lu O N) (re_put re a Be) *) (* Goal: re_sre_ok (re_put re a Be) (sre_put sre a X) *) apply be_ok_be_x_free with (be := mu_eval N te m (re_put re a Be)). (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) elim (mu_eval_lemma1 N te te_ok m). intros. apply H20. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) unfold ad_to_be_ok, re_put in |- *. intros. elim (Neqb a x2). assumption. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) apply H3. assumption. assumption. assumption. assumption. assumption. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) assumption. assumption. assumption. unfold ad_to_be_ok, re_put in |- *. intros. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) elim (Neqb a x0). assumption. apply H3. unfold re_sre_ok, re_put, sre_put in |- *. (* Goal: forall P : ad, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P then Be else re P)) (if N.eqb a P then X else sre P) *) intros. elim (sumbool_of_bool (Neqb a P1)). intro y0. rewrite y0. (* Goal: @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N Be) X *) (* Goal: forall _ : @eq bool (N.eqb a P1) false, @eq (Ensemble var_env'') (bool_expr_to_var_env'' O N (if N.eqb a P1 then Be else re P1)) (if N.eqb a P1 then X else sre P1) *) assumption. intro y0. rewrite y0. apply H4. Qed. End mu2set.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Section BDD_alloc. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. (* The arguments for the allocation function *) Variable cfg : BDDconfig. Variable x : BDDvar. Variable l r : ad. Variable ul : list ad. (* Conditions on the arguments for the allocation function *) Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis l_used' : used_node' cfg ul l. Hypothesis r_used' : used_node' cfg ul r. Hypothesis l_neq_r : Neqb l r = false. Hypothesis xl_lt_x : forall (xl : BDDvar) (ll rl : ad), MapGet _ (bs_of_cfg cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt. Hypothesis xr_lt_x : forall (xr : BDDvar) (lr rr : ad), MapGet _ (bs_of_cfg cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt. Hypothesis no_dup : forall (x' : BDDvar) (l' r' a : ad), MapGet _ (bs_of_cfg cfg) a = Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r')). Let new_cfg := gc cfg ul. Lemma no_dup_new : forall (x' : BDDvar) (l' r' a : ad), MapGet _ (bs_of_cfg new_cfg) a = Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r')). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. apply no_dup with (a := a). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) apply (proj2 (proj2 (gc_is_OK _ _ cfg_OK ul_OK))). assumption. Qed. Lemma new_cfg_OK : BDDconfig_OK new_cfg. Proof. (* Goal: BDDconfig_OK new_cfg *) exact (proj1 (gc_is_OK _ _ cfg_OK ul_OK)). Qed. Lemma new_cfg_nodes_preserved : used_nodes_preserved cfg new_cfg ul. Proof. (* Goal: used_nodes_preserved cfg new_cfg ul *) exact (proj1 (proj2 (gc_is_OK _ _ cfg_OK ul_OK))). Qed. Lemma new_l_OK : node_OK (bs_of_cfg new_cfg) l. Proof. (* Goal: node_OK (bs_of_cfg new_cfg) r *) apply node_preserved_OK_bs with (bs := bs_of_cfg cfg). (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_node'_OK_bs with (ul := ul). exact (bs_of_cfg_OK _ cfg_OK). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. assumption. (* Goal: node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) r *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_nodes_preserved_preserved'_bs with (ul := ul). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact (bs_of_cfg_OK _ cfg_OK). exact new_cfg_nodes_preserved. assumption. Qed. Lemma new_r_OK : node_OK (bs_of_cfg new_cfg) r. Proof. (* Goal: node_OK (bs_of_cfg new_cfg) r *) apply node_preserved_OK_bs with (bs := bs_of_cfg cfg). (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_node'_OK_bs with (ul := ul). exact (bs_of_cfg_OK _ cfg_OK). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. assumption. (* Goal: node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) r *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_nodes_preserved_preserved'_bs with (ul := ul). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact (bs_of_cfg_OK _ cfg_OK). exact new_cfg_nodes_preserved. assumption. Qed. Lemma BDD_OK_l : BDD_OK (bs_of_cfg new_cfg) l. Proof. (* Goal: BDD_OK (bs_of_cfg new_cfg) r *) apply node_OK_BDD_OK. exact (proj1 new_cfg_OK). exact new_l_OK. Qed. Lemma BDD_OK_r : BDD_OK (bs_of_cfg new_cfg) r. Proof. (* Goal: BDD_OK (bs_of_cfg new_cfg) r *) apply node_OK_BDD_OK. exact (proj1 new_cfg_OK). exact new_r_OK. Qed. Lemma new_xl_lt_x : forall (xl : BDDvar) (ll rl : ad), MapGet _ (bs_of_cfg new_cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) cut (node_OK (bs_of_cfg cfg) l). intro H00. elim H00. intros. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (_ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (bs_of_cfg cfg)) true)) (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite H in H0. unfold bs_of_cfg in H0. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (_ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (bs_of_cfg cfg)) true)) (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite (config_OK_zero _ new_cfg_OK) in H0. discriminate. intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H; intros. rewrite H0 in H1. unfold bs_of_cfg in H1. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite (config_OK_one _ new_cfg_OK) in H1. discriminate. (* Goal: @eq comparison (BDDcompare xl x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) l *) elim (option_sum _ (MapGet _ (bs_of_cfg cfg) l)). intro y. elim y. intro x0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@Some (prod BDDvar (prod ad ad)) x0), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) elim x0. intro y0. intro y1. elim y1; intros y2 y3 y4. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (MapGet _ (bs_of_cfg new_cfg) l = Some (y0, (y2, y3))). intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite H2 in H1. injection H1. intros. rewrite H3 in y4. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y0 (@pair ad ad y2 y3))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite H4 in y4. rewrite H5 in y4. apply xl_lt_x with (ll := ll) (rl := rl). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. cut (node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) l). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) intro. apply H2. apply nodes_reachable_0. assumption. (* Goal: node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) r *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_nodes_preserved_preserved'_bs with (ul := ul). (* Goal: BDDstate_OK (bs_of_cfg cfg) *) (* Goal: used_list_OK_bs (bs_of_cfg cfg) ul *) (* Goal: used_node'_bs (bs_of_cfg cfg) ul r *) exact (bs_of_cfg_OK _ cfg_OK). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact new_cfg_nodes_preserved. assumption. intro y. unfold in_dom in H0. (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite y in H0. discriminate. apply used_node'_OK_bs with (ul := ul). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact (bs_of_cfg_OK _ cfg_OK). assumption. assumption. Qed. Lemma new_xr_lt_x : forall (xr : BDDvar) (lr rr : ad), MapGet _ (bs_of_cfg new_cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) cut (node_OK (bs_of_cfg cfg) r). intro H00. elim H00. intros. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (_ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (bs_of_cfg cfg)) true)) (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite H in H0. unfold bs_of_cfg in H0. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (_ : or (@eq ad r BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) r (bs_of_cfg cfg)) true)) (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite (config_OK_zero _ new_cfg_OK) in H0. discriminate. intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H; intros. rewrite H0 in H1. unfold bs_of_cfg in H1. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite (config_OK_one _ new_cfg_OK) in H1. discriminate. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (option_sum _ (MapGet _ (bs_of_cfg cfg) r)). intro y. elim y. intro x0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@Some (prod BDDvar (prod ad ad)) x0), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) elim x0. intro y0. intro y1. elim y1; intros y2 y3 y4. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (MapGet _ (bs_of_cfg new_cfg) r = Some (y0, (y2, y3))). intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite H2 in H1. injection H1. intros. rewrite H3 in y4. (* Goal: @eq comparison (BDDcompare xr x) Lt *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y0 (@pair ad ad y2 y3))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite H4 in y4. rewrite H5 in y4. apply xr_lt_x with (lr := lr) (rr := rr). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. cut (node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) r). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) intro. apply H2. apply nodes_reachable_0. assumption. (* Goal: node_preserved_bs (bs_of_cfg cfg) (bs_of_cfg new_cfg) r *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) r) (@None (prod BDDvar (prod ad ad))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: node_OK (bs_of_cfg cfg) r *) apply used_nodes_preserved_preserved'_bs with (ul := ul). (* Goal: BDDstate_OK (bs_of_cfg cfg) *) (* Goal: used_list_OK_bs (bs_of_cfg cfg) ul *) (* Goal: used_node'_bs (bs_of_cfg cfg) ul r *) exact (bs_of_cfg_OK _ cfg_OK). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact new_cfg_nodes_preserved. assumption. intro y. unfold in_dom in H0. (* Goal: node_OK (bs_of_cfg cfg) r *) rewrite y in H0. discriminate. apply used_node'_OK_bs with (ul := ul). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact (bs_of_cfg_OK _ cfg_OK). assumption. assumption. Qed. Definition BDDalloc : BDDconfig * ad := match new_cfg with | (bs, (share, (fl, (cnt, (negm, orm))))) => match fl with | a :: fl' => (MapPut _ bs a (x, (l, r)), (MapPut3 _ share l r x a, (fl', (cnt, (negm, orm)))), a) | nil => (MapPut _ bs cnt (x, (l, r)), (MapPut3 _ share l r x cnt, (fl, (ad_S cnt, (negm, orm)))), cnt) end end. Lemma BDDalloc_lemma_1 : forall a : ad, MapGet _ (fst (fst BDDalloc)) a = (if Neqb a (snd BDDalloc) then Some (x, (l, r)) else MapGet _ (fst new_cfg) a). Proof. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. unfold BDDalloc in |- *. rewrite (cfg_comp new_cfg). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) elim (list_sum _ (fl_of_cfg new_cfg)). intro. rewrite H. simpl in |- *. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (x, (l, r)) a). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite (Neqb_comm a (cnt_of_cfg new_cfg)). reflexivity. intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H; clear H. intros. elim H; clear H; intros. rewrite H. simpl in |- *. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) x0 (x, (l, r)) a). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (Neqb_comm a x0). reflexivity. Qed. Lemma BDDalloc_lemma_2 : In (snd BDDalloc) (fl_of_cfg new_cfg) \/ cnt_of_cfg new_cfg = snd BDDalloc. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. unfold BDDalloc in |- *. rewrite (cfg_comp new_cfg). (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (list_sum _ (fl_of_cfg new_cfg)). intros. rewrite H. simpl in |- *. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) unfold cnt_of_cfg in |- *. simpl in |- *. right; reflexivity. intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H; intros. elim H0; intros. rewrite H1. simpl in |- *. left. left. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) reflexivity. Qed. Lemma BDDalloc_lemma_3 : MapGet _ (bs_of_cfg new_cfg) (snd BDDalloc) = None. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. elim BDDalloc_lemma_2. intros. elim new_cfg_OK. intros. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H1; intros. elim H3; intros. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc)) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc)) (@None (prod BDDvar (prod ad ad))) *) exact (proj2 (proj2 (proj1 (proj2 H4 (snd BDDalloc)) H))). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. rewrite <- H. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (N.eqb x0 a) false *) apply (proj2 (proj1 (proj2 (proj2 (proj2 new_cfg_OK))))). (* Goal: @eq bool (Nleb (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))) (cnt_of_cfg new_cfg)) true *) apply Nleb_refl. Qed. Lemma BDDalloc_lemma_4 : fst (fst BDDalloc) = MapPut _ (bs_of_cfg new_cfg) (snd BDDalloc) (x, (l, r)). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. unfold BDDalloc in |- *. rewrite (cfg_comp new_cfg). simpl in |- *. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (fl_of_cfg new_cfg). reflexivity. intros. reflexivity. Qed. Lemma BDDalloc_lemma_5 : fst (snd (fst BDDalloc)) = MapPut3 _ (share_of_cfg new_cfg) l r x (snd BDDalloc). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. unfold BDDalloc in |- *. rewrite (cfg_comp new_cfg). simpl in |- *. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (fl_of_cfg new_cfg). reflexivity. intros. reflexivity. Qed. Lemma BDDalloc_preserves_nodes : nodes_preserved_bs (bs_of_cfg new_cfg) (fst (fst BDDalloc)). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. unfold nodes_preserved_bs in |- *. intros. rewrite BDDalloc_lemma_1. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb node (snd BDDalloc))). intro y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb node (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq bool (N.eqb node (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb node (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) rewrite (Neqb_complete _ _ y) in H. rewrite BDDalloc_lemma_3 in H. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) discriminate H. intro y. rewrite y. assumption. Qed. Lemma BDDalloc_zero : MapGet _ (fst (fst BDDalloc)) BDDzero = None. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. elim BDDalloc_lemma_2. intro. rewrite (BDDalloc_lemma_1 BDDzero). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb BDDzero (snd BDDalloc))). intro y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq bool (N.eqb BDDone (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDone) (@None (prod BDDvar (prod ad ad))) *) rewrite <- (Neqb_complete _ _ y) in H. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDzero (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDzero) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq bool (N.eqb BDDzero (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDzero (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDzero) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDzero) (@None (prod BDDvar (prod ad ad))) *) absurd (Nleb (Npos 2) BDDzero = true). unfold BDDzero in |- *. unfold not in |- *. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. unfold Nleb in H0. simpl in H0. discriminate. (* Goal: @eq bool (Nleb (Npos (xO xH)) BDDzero) true *) (* Goal: forall _ : @eq bool (N.eqb BDDzero (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDzero (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDzero) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDzero) (@None (prod BDDvar (prod ad ad))) *) apply (proj1 (proj1 (proj2 (fl_of_cfg_OK _ new_cfg_OK) BDDzero) H)). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro y. rewrite y. exact (proj1 (bs_of_cfg_OK _ new_cfg_OK)). intro. (* Goal: no_dup_list ad (@cons ad x0 x1) *) rewrite (BDDalloc_lemma_1 BDDzero). rewrite <- H. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb BDDzero (cnt_of_cfg new_cfg))). intro y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (cnt_of_cfg new_cfg) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq bool (N.eqb BDDone (cnt_of_cfg new_cfg)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (cnt_of_cfg new_cfg) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) cut (Nleb (Npos 2) (cnt_of_cfg new_cfg) = true). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite <- (Neqb_complete _ _ y). intro. unfold Nleb in H0. simpl in H0. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) discriminate. exact (proj1 (cnt_of_cfg_OK _ new_cfg_OK)). intro y. (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite y. exact (proj1 (bs_of_cfg_OK _ new_cfg_OK)). Qed. Lemma BDDalloc_one : MapGet _ (fst (fst BDDalloc)) BDDone = None. Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. elim BDDalloc_lemma_2. intro. rewrite (BDDalloc_lemma_1 BDDone). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb BDDone (snd BDDalloc))). intro y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq bool (N.eqb BDDone (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDone) (@None (prod BDDvar (prod ad ad))) *) rewrite <- (Neqb_complete _ _ y) in H. (* Goal: not (@eq bool (Nleb (Npos (xO xH)) (Npos xH)) true) *) (* Goal: @eq bool (Nleb (Npos (xO xH)) BDDone) true *) (* Goal: forall _ : @eq bool (N.eqb BDDone (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDone) (@None (prod BDDvar (prod ad ad))) *) absurd (Nleb (Npos 2) BDDone = true). unfold BDDone in |- *. unfold not in |- *. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. unfold Nleb in H0. simpl in H0. discriminate. (* Goal: @eq bool (Nleb (Npos (xO xH)) BDDone) true *) (* Goal: forall _ : @eq bool (N.eqb BDDone (@snd BDDconfig ad BDDalloc)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (@snd BDDconfig ad BDDalloc) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq ad (cnt_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) BDDone) (@None (prod BDDvar (prod ad ad))) *) apply (proj1 (proj1 (proj2 (fl_of_cfg_OK _ new_cfg_OK) BDDone) H)). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intro y. rewrite y. exact (proj1 (proj2 (bs_of_cfg_OK _ new_cfg_OK))). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. rewrite (BDDalloc_lemma_1 BDDone). rewrite <- H. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb BDDone (cnt_of_cfg new_cfg))). intro y. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (cnt_of_cfg new_cfg) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @eq bool (N.eqb BDDone (cnt_of_cfg new_cfg)) false, @eq (option (prod BDDvar (prod ad ad))) (if N.eqb BDDone (cnt_of_cfg new_cfg) then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) BDDone) (@None (prod BDDvar (prod ad ad))) *) cut (Nleb (Npos 2) (cnt_of_cfg new_cfg) = true). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite <- (Neqb_complete _ _ y). intro. unfold Nleb in H0. simpl in H0. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) discriminate. exact (proj1 (cnt_of_cfg_OK _ new_cfg_OK)). intro y. (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite y. exact (proj1 (proj2 (bs_of_cfg_OK _ new_cfg_OK))). Qed. Lemma BDDalloc_BDD_OK : BDD_OK (fst (fst BDDalloc)) (snd BDDalloc). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. unfold BDD_OK in |- *. cut (MapGet (BDDvar * (ad * ad)) (fst (fst BDDalloc)) (snd BDDalloc) = Some (x, (l, r))). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) intro H. rewrite H. apply BDDbounded_2 with (x := x) (l := l) (r := r). assumption. (* Goal: @eq comparison (BDDcompare x (ad_S x)) Lt *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) l x *) (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) apply BDDlt_compare. rewrite (ad_S_is_S x). unfold lt in |- *. apply le_n. (* Goal: @eq bool (N.eqb l r) false *) (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) l x *) (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) apply not_true_is_false. unfold not in |- *; intro H0. rewrite l_neq_r in H0. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) discriminate. elim (option_sum _ (MapGet _ (bs_of_cfg new_cfg) l)). intro y. (* Goal: forall (x0 : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@Some (prod BDDvar (prod ad ad)) x0)), BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@None (prod BDDvar (prod ad ad))), BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: BDD_OK (bs_of_cfg new_cfg) r *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) elim y; clear y. intro x0. elim x0; clear x0. intros xl y0. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim y0; clear y0. intros ll rl. intro y. (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a (ad_S x1) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))) *) (* Goal: forall (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad)))) (_ : @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) a with | Some a => true | None => false end true), BDD_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a *) apply nodes_preserved_bounded with (bs := bs_of_cfg new_cfg). (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. cut (BDDcompare (ad_S xl) x = Datatypes.Lt \/ ad_S xl = x). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) intro H0. elim H0; intro H1. apply increase_bound with (n := ad_S xl). (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) cut (BDD_OK (bs_of_cfg new_cfg) l). unfold BDD_OK in |- *. rewrite y. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) intro; assumption. exact BDD_OK_l. assumption. rewrite <- H1. (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) cut (BDD_OK (bs_of_cfg new_cfg) l). unfold BDD_OK in |- *. rewrite y. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) intro; assumption. exact BDD_OK_l. apply BDDcompare_1. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply (new_xl_lt_x xl ll rl). assumption. intro y. (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) cut (BDD_OK (bs_of_cfg new_cfg) l). unfold BDD_OK in |- *. rewrite y. intro H0. (* Goal: @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0) *) (* Goal: @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false *) elim H0; intro H1. rewrite H1. apply BDDbounded_0. rewrite H1. (* Goal: BDD_OK (bs_of_cfg new_cfg) l *) (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) apply BDDbounded_1. exact BDD_OK_l. cut (BDD_OK (bs_of_cfg new_cfg) r). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) intro H0. unfold BDD_OK in H0. elim (option_sum _ (MapGet _ (bs_of_cfg new_cfg) r)). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intro y. elim y; clear y. intro x0. elim x0; clear x0. intros xr y0. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim y0; clear y0. intros lr rr. intro y. apply nodes_preserved_bounded with (bs := bs_of_cfg new_cfg). (* Goal: @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) exact BDDalloc_preserves_nodes. rewrite y in H0. (* Goal: BDDbounded (bs_of_cfg new_cfg) r x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) r) (@None (prod BDDvar (prod ad ad))), BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) r x *) (* Goal: BDD_OK (bs_of_cfg new_cfg) r *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) cut (BDDcompare (ad_S xr) x = Datatypes.Lt \/ ad_S xr = x). intro H1. elim H1; intro H2. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply increase_bound with (n := ad_S xr). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) rewrite <- H2; assumption. apply BDDcompare_1. apply (new_xr_lt_x xr lr rr). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. intro y. rewrite y in H0. elim H0; intro. rewrite H1. (* Goal: @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0) *) (* Goal: @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false *) apply BDDbounded_0. rewrite H1. apply BDDbounded_1. exact BDD_OK_r. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite BDDalloc_lemma_1. rewrite (Neqb_correct (snd BDDalloc)). reflexivity. Qed. Lemma BDDalloc_keeps_state_OK : BDDstate_OK (fst (fst BDDalloc)). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. split. apply BDDalloc_zero. split. apply BDDalloc_one. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) unfold in_dom in |- *. intro. rewrite (BDDalloc_lemma_1 a). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb a (snd BDDalloc))). intro y. rewrite y. intro. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite (Neqb_complete _ _ y). apply BDDalloc_BDD_OK. intro y. rewrite y. (* Goal: forall (_ : @eq bool (N.eqb a a0) true) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (N.eqb a a0) false) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) elim (option_sum _ (MapGet _ (bs_of_cfg new_cfg) a)). intro y0. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) elim y0; clear y0; intro. elim x0; clear x0; intros x1 y0. (* Goal: forall (_ : @eq bool (N.eqb a a0) true) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (N.eqb a a0) false) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) elim y0; clear y0; intros l1 r1. intro y0. intro H. unfold BDD_OK in |- *. cut (MapGet (BDDvar * (ad * ad)) (fst (fst BDDalloc)) a = Some (x1, (l1, r1))). (* Goal: BDDbounded (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a (ad_S x1) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))) *) (* Goal: forall (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad)))) (_ : @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) a with | Some a => true | None => false end true), BDD_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a *) intro H0. rewrite H0. apply nodes_preserved_bounded with (bs := bs_of_cfg new_cfg). (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. cut (BDD_OK (bs_of_cfg new_cfg) a). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) unfold BDD_OK in |- *. rewrite y0. intro; assumption. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) a (bs_of_cfg new_cfg)) true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x1 (@pair ad ad l1 r1))) *) (* Goal: forall (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad)))) (_ : @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) a with | Some a => true | None => false end true), BDD_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) a *) apply (proj2 (proj2 (bs_of_cfg_OK _ new_cfg_OK))). unfold in_dom in |- *. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) rewrite y0. reflexivity. apply BDDalloc_preserves_nodes. assumption. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intros y0 H. unfold bs_of_cfg in y0. rewrite y0 in H. discriminate. Qed. Lemma BDDsharing_OK_1 : forall a : ad, MapGet _ (bs_of_cfg new_cfg) a = None -> BDDsharing_OK (MapPut _ (bs_of_cfg new_cfg) a (x, (l, r))) (MapPut3 _ (share_of_cfg new_cfg) l r x a). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. split. rewrite (MapPut3_semantics ad (share_of_cfg new_cfg) l r x l0 r0 x0 a). (* Goal: forall _ : @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) elim (sumbool_of_bool (Neqb l l0 && (Neqb r r0 && Neqb x x0))). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro y. rewrite y. intro H0. injection H0; intro. rewrite <- H1. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) a (x, (l, r)) a) . (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false) (_ : @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite (Neqb_correct a). cut (Neqb l l0 = true /\ Neqb r r0 = true /\ Neqb x x0 = true). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. rewrite (Neqb_complete _ _ (proj1 H2)). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l0 r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: and (@eq bool (N.eqb l l0) true) (and (@eq bool (N.eqb r r0) true) (@eq bool (N.eqb x x0) true)) *) (* Goal: forall (_ : @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false) (_ : @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite (Neqb_complete _ _ (proj1 (proj2 H2))). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (Neqb_complete _ _ (proj2 (proj2 H2))). reflexivity. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply andb3_lemma. assumption. intro y. rewrite y. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) a (x, (l, r)) a0). (* Goal: forall (_ : @eq bool (N.eqb a a0) true) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (N.eqb a a0) false) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) elim (sumbool_of_bool (Neqb a a0)). intro y0. intro H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (N.eqb a a0) false) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite <- (Neqb_complete _ _ y0) in H0. unfold share_of_cfg in H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall (_ : @eq bool (N.eqb a a0) false) (_ : @eq (option ad) (MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0)), @eq (option (prod BDDvar (prod ad ad))) (if N.eqb a a0 then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) unfold bs_of_cfg in H. rewrite (proj1 (proj1 (proj2 new_cfg_OK) x0 l0 r0 a) H0) in H. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) discriminate. intros y0 H0. rewrite y0. unfold bs_of_cfg in |- *. unfold share_of_cfg in H0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))), @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) exact (proj1 (proj1 (proj2 new_cfg_OK) x0 l0 r0 a0) H0). rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) a (x, (l, r)) a0). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intro H0. elim (sumbool_of_bool (Neqb a a0)). intro y. rewrite y in H0. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) injection H0. intros. rewrite <- H1. rewrite <- H2. rewrite <- H3. (* Goal: @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l r x) (@Some ad a0) *) (* Goal: forall _ : @eq bool (N.eqb a a0) false, @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite (MapPut3_semantics ad (share_of_cfg new_cfg) l r x l r x a). (* Goal: @eq (option ad) (if andb (N.eqb l l) (andb (N.eqb r r) (N.eqb x x)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l r x) (@Some ad a0) *) (* Goal: forall _ : @eq bool (N.eqb a a0) false, @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite (Neqb_correct l). rewrite (Neqb_correct r). rewrite (Neqb_correct x). (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) simpl in |- *. rewrite (Neqb_complete _ _ y). reflexivity. intro y. rewrite y in H0. (* Goal: @eq (option ad) (MapGet3 ad (MapPut3 ad (share_of_cfg new_cfg) l r x a) l0 r0 x0) (@Some ad a0) *) rewrite (MapPut3_semantics ad (share_of_cfg new_cfg) l r x l0 r0 x0 a). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (Neqb l l0 && (Neqb r r0 && Neqb x x0) = false). intro. (* Goal: @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)) l0 r0 x0) (@Some ad a0) *) (* Goal: @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false *) rewrite H1. unfold share_of_cfg in |- *. unfold bs_of_cfg in H0. (* Goal: @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)) l0 r0 x0) (@Some ad a0) *) (* Goal: @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false *) exact (proj2 (proj1 (proj2 new_cfg_OK) x0 l0 r0 a0) H0). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) apply andb3_lemma_1. cut ((x, (l, r)) <> (x0, (l0, r0))). intro. unfold not in |- *; intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) apply H1. injection H2; intros. rewrite H3. rewrite H4. rewrite H5. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) reflexivity. apply no_dup with (a := a0). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) a0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) apply (proj2 (proj2 (gc_is_OK _ _ cfg_OK ul_OK))). assumption. Qed. Lemma BDDalloc_keeps_sharing_OK : BDDsharing_OK (fst (fst BDDalloc)) (fst (snd (fst BDDalloc))). Proof. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. rewrite BDDalloc_lemma_4. rewrite BDDalloc_lemma_5. (* Goal: BDDsharing_OK (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (@snd BDDconfig ad BDDalloc) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (MapPut3 ad (share_of_cfg new_cfg) l r x (@snd BDDconfig ad BDDalloc)) *) apply BDDsharing_OK_1. apply BDDalloc_lemma_3. Qed. Lemma BDDalloc_keeps_cnt_OK : cnt_OK (fst (fst BDDalloc)) (fst (snd (snd (snd (fst BDDalloc))))). Proof. (* Goal: @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (let (bs, p) := new_cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, orm) := p2 in match fl with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs cnt (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x cnt) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S cnt) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) cnt | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) cnt (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) a end)))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))))) *) unfold BDDalloc, cnt_OK in |- *. rewrite (cfg_comp new_cfg). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) elim (list_sum _ (fl_of_cfg new_cfg)). intro. rewrite H. simpl in |- *. split. (* Goal: @eq bool (Nleb (ad_S x0) (cnt_of_cfg new_cfg)) true *) (* Goal: @eq bool (Nleb (cnt_of_cfg new_cfg) a) true *) apply Nleb_trans with (b := cnt_of_cfg new_cfg). unfold cnt_of_cfg in |- *. (* Goal: @eq bool (Nleb (Npos (xO xH)) (cnt_of_cfg new_cfg)) true *) (* Goal: forall (a : ad) (_ : @eq bool (Nleb (cnt_of_cfg new_cfg) a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) x0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))) *) exact (proj1 (proj1 (proj2 (proj2 (proj2 new_cfg_OK))))). (* Goal: @eq bool (Nleb (ad_S node) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))))) true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) unfold Nleb in |- *. apply leb_correct. rewrite (ad_S_is_S (cnt_of_cfg new_cfg)). (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) apply le_S. apply le_n. intros. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (x, (l, r)) a). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (if N.eqb (cnt_of_cfg new_cfg) a then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), and (@eq bool (Nleb (Npos (xO xH)) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))))) true) (forall (a : ad) (_ : @eq bool (Nleb (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end))))) a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end)) a) (@None (prod BDDvar (prod ad ad)))) *) replace (Neqb (cnt_of_cfg new_cfg) a) with false. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool false (N.eqb (cnt_of_cfg new_cfg) a) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), and (@eq bool (Nleb (Npos (xO xH)) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))))) true) (forall (a : ad) (_ : @eq bool (Nleb (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end))))) a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end)) a) (@None (prod BDDvar (prod ad ad)))) *) refine (proj2 (proj1 (proj2 (proj2 (proj2 new_cfg_OK)))) a _). (* Goal: @eq bool (Nleb (ad_S node) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))))) true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) apply Nleb_trans with (b := ad_S (cnt_of_cfg new_cfg)). unfold Nleb in |- *. (* Goal: @eq bool (Nat.leb (N.to_nat (ad_S node)) (N.to_nat (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))))) true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) apply leb_correct. rewrite (ad_S_is_S (cnt_of_cfg new_cfg)). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply le_S. apply le_n. assumption. symmetry in |- *. apply ad_S_le_then_neq. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) assumption. intro. elim H; clear H; intros. elim H; clear H; intros. (* Goal: forall _ : @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))), @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite H. simpl in |- *. split. (* Goal: @eq bool (Nleb (Npos (xO xH)) (cnt_of_cfg new_cfg)) true *) (* Goal: forall (a : ad) (_ : @eq bool (Nleb (cnt_of_cfg new_cfg) a) true), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) x0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) a) (@None (prod BDDvar (prod ad ad))) *) exact (proj1 (proj1 (proj2 (proj2 (proj2 new_cfg_OK))))). (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) intros. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) x0 (x, (l, r)) a). (* Goal: @eq (option ad) (if andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0)) then @Some ad a else MapGet3 ad (share_of_cfg new_cfg) l0 r0 x0) (@Some ad a0) *) (* Goal: @eq bool (andb (N.eqb l l0) (andb (N.eqb r r0) (N.eqb x x0))) false *) cut (Neqb x0 a = false). intro; rewrite H1. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a) (@None (prod BDDvar (prod ad ad))) *) (* Goal: @eq bool (N.eqb x0 a) false *) apply (proj2 (proj1 (proj2 (proj2 (proj2 new_cfg_OK))))). (* Goal: @eq bool (Nleb (ad_S x0) a) true *) exact H0. apply ad_S_le_then_neq. apply Nleb_trans with (b := cnt_of_cfg new_cfg). (* Goal: @eq bool (Nleb (ad_S x0) (cnt_of_cfg new_cfg)) true *) (* Goal: @eq bool (Nleb (cnt_of_cfg new_cfg) a) true *) unfold cnt_of_cfg in |- *. refine (proj1 (proj2 (proj1 (proj2 (proj1 (proj2 (proj2 new_cfg_OK))) x0) _))). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) unfold fl_of_cfg in H. rewrite H. simpl in |- *. left; reflexivity. assumption. Qed. Lemma BDDalloc_keeps_free_list_OK : BDDfree_list_OK (fst (fst BDDalloc)) (fst (snd (snd (fst BDDalloc)))) (fst (snd (snd (snd (fst BDDalloc))))). Proof. (* Goal: BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc))))) *) unfold BDDalloc in |- *. rewrite (cfg_comp new_cfg). elim (list_sum _ (fl_of_cfg new_cfg)). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. rewrite H. simpl in |- *. unfold BDDfree_list_OK in |- *. split. apply no_dup_nil. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (x, (l, r)) node). (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) split. simpl in |- *. tauto. intro. elim H0; clear H0; intros. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H1; clear H1; intros. elim (sumbool_of_bool (Neqb (cnt_of_cfg new_cfg) node)). (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) intro y. rewrite y in H2. discriminate. intro y. rewrite y in H2. (* Goal: forall _ : @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))), @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) absurd (In node (fl_of_cfg new_cfg)). rewrite H. simpl in |- *. tauto. (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) apply (proj2 (proj2 (proj1 (proj2 (proj2 new_cfg_OK))) node)). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) split. assumption. split. unfold Nleb in |- *. apply leb_correct. (* Goal: le (N.to_nat (ad_S node)) (N.to_nat (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))))) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) rewrite (ad_S_is_S node). apply lt_le_S. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (nat_of_N node <= nat_of_N (cnt_of_cfg new_cfg)). intro. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) elim (le_lt_or_eq _ _ H3). tauto. intro. unfold cnt_of_cfg in y. (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (node = fst (snd (snd (snd new_cfg)))). intro. rewrite H5 in y. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite (Neqb_correct (fst (snd (snd (snd new_cfg))))) in y. discriminate. (* Goal: @eq ad (N.of_nat (N.to_nat node)) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))) *) (* Goal: le (N.to_nat node) (N.to_nat (cnt_of_cfg new_cfg)) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) rewrite <- (N_of_nat_of_N node). rewrite H4. apply N_of_nat_of_N. (* Goal: le (N.to_nat node) (N.to_nat (cnt_of_cfg new_cfg)) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) apply le_S_n. rewrite <- (ad_S_is_S node). (* Goal: le (N.to_nat (ad_S node)) (S (N.to_nat (cnt_of_cfg new_cfg))) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall _ : @ex ad (fun a : ad => @ex (list ad) (fun l' : list ad => @eq (list ad) (fl_of_cfg new_cfg) (@cons ad a l'))), BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end)))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match fl_of_cfg new_cfg with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (fl_of_cfg new_cfg) (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a end))))) *) rewrite <- (ad_S_is_S (cnt_of_cfg new_cfg)). unfold Nleb in H1. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply leb_complete. assumption. assumption. intro. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H; clear H; intros. elim H; clear H; intros. rewrite H. simpl in |- *. (* Goal: and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) *) unfold BDDfree_list_OK in |- *. split. apply no_dup_cons_no_dup with (a := x0). (* Goal: no_dup_list ad (@cons ad x0 x1) *) (* Goal: forall node : ad, iff (@In ad node x1) (and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) x0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) node) (@None (prod BDDvar (prod ad ad)))))) *) unfold ad in *. (* Goal: no_dup_list ad (@cons ad x0 x1) *) rewrite <- H. unfold fl_of_cfg in |- *. exact (proj1 (proj1 (proj2 (proj2 new_cfg_OK)))). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) cut (~ In x0 x1). intro. intro. rewrite (MapPut_semantics (BDDvar * (ad * ad)) (bs_of_cfg new_cfg) x0 (x, (l, r)) node). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) split. intro. elim (sumbool_of_bool (Neqb x0 node)). intro y. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) absurd (In node x1). rewrite <- (Neqb_complete _ _ y). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. intro y. (* Goal: and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))) *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite y. apply (proj1 (proj2 (proj1 (proj2 (proj2 new_cfg_OK))) node)). (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) unfold fl_of_cfg in H. rewrite H. apply in_cons. assumption. intros. (* Goal: forall _ : @eq bool (N.eqb x0 node) false, @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim (sumbool_of_bool (Neqb x0 node)). intro y. rewrite y in H1. (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) (cnt_of_cfg new_cfg)) true) (@eq (option (prod BDDvar (prod ad ad))) (if N.eqb x0 node then @Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) else MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) node) (@None (prod BDDvar (prod ad ad))))), @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) elim H1; intros. elim H3; intros. discriminate. intro y. (* Goal: @In ad node x1 *) (* Goal: not (@In ad x0 x1) *) rewrite y in H1. unfold bs_of_cfg in H1. cut (In node (fst (snd (snd new_cfg)))). (* Goal: forall _ : @eq ad x0 node, @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) unfold fl_of_cfg in H. rewrite H. intro. elim (in_inv H2). intro. (* Goal: @In ad node x1 *) (* Goal: forall _ : @In ad node x1, @In ad node x1 *) (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) rewrite H3 in y. rewrite (Neqb_correct node) in y. discriminate. tauto. (* Goal: @In ad node (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) (* Goal: not (@In ad x0 x1) *) apply (proj2 (proj2 (proj1 (proj2 (proj2 new_cfg_OK))) node)). (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) assumption. apply no_dup_cons_no_in. rewrite <- H. unfold fl_of_cfg in |- *. (* Goal: no_dup_list ad (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg))) *) exact (proj1 (proj1 (proj2 (proj2 new_cfg_OK)))). Qed. Lemma BDDalloc_orm_same : orm_of_cfg (fst BDDalloc) = orm_of_cfg new_cfg. Proof. (* Goal: @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (let (bs, p) := new_cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, orm) := p2 in match fl with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs cnt (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x cnt) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S cnt) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) cnt | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) cnt (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) a end)))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))))) *) unfold orm_of_cfg, BDDalloc in |- *. rewrite (cfg_comp new_cfg). simpl in |- *. (* Goal: forall (a : ad) (l0 : list ad) (_ : @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match l0 with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end))))))) (um_of_cfg new_cfg)), @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (@pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a)))))))) (um_of_cfg new_cfg) *) elim (fl_of_cfg new_cfg). simpl in |- *. reflexivity. simpl in |- *. reflexivity. Qed. Lemma BDDalloc_negm_same : negm_of_cfg (fst BDDalloc) = negm_of_cfg new_cfg. Proof. (* Goal: @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (let (bs, p) := new_cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, orm) := p2 in match fl with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs cnt (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x cnt) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S cnt) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) cnt | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) cnt (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) a end)))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))))) *) unfold negm_of_cfg, BDDalloc in |- *. rewrite (cfg_comp new_cfg). simpl in |- *. (* Goal: forall (a : ad) (l0 : list ad) (_ : @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match l0 with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end))))))) (um_of_cfg new_cfg)), @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (@pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a)))))))) (um_of_cfg new_cfg) *) elim (fl_of_cfg new_cfg). simpl in |- *. reflexivity. simpl in |- *. reflexivity. Qed. Lemma BDDalloc_um_same : um_of_cfg (fst BDDalloc) = um_of_cfg new_cfg. Proof. (* Goal: @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (let (bs, p) := new_cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, orm) := p2 in match fl with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs cnt (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x cnt) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S cnt) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) cnt | cons a fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) bs a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad share l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) cnt (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) negm orm))))) a end)))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) new_cfg)))))) *) unfold um_of_cfg, BDDalloc in |- *. rewrite (cfg_comp new_cfg). simpl in |- *. (* Goal: forall (a : ad) (l0 : list ad) (_ : @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad match l0 with | nil => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) (cnt_of_cfg new_cfg) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x (cnt_of_cfg new_cfg)) (@pair BDDfree_list (prod N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair N (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (ad_S (cnt_of_cfg new_cfg)) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) (cnt_of_cfg new_cfg) | cons a0 fl' => @pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a0 (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a0) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) fl' (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a0 end))))))) (um_of_cfg new_cfg)), @eq BDDuniv_memo (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (@pair (prod (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))))) ad (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (MapPut (prod BDDvar (prod ad ad)) (bs_of_cfg new_cfg) a (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (MapPut3 ad (share_of_cfg new_cfg) l r x a) (@pair (list ad) (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) l0 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (cnt_of_cfg new_cfg) (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) (negm_of_cfg new_cfg) (@pair BDDor_memo BDDuniv_memo (orm_of_cfg new_cfg) (um_of_cfg new_cfg))))))) a)))))))) (um_of_cfg new_cfg) *) elim (fl_of_cfg new_cfg). simpl in |- *. reflexivity. simpl in |- *. reflexivity. Qed. Lemma BDDalloc_keeps_neg_memo_OK : BDDneg_memo_OK (bs_of_cfg (fst BDDalloc)) (negm_of_cfg (fst BDDalloc)). Proof. (* Goal: BDDneg_memo_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) (negm_of_cfg (@fst BDDconfig ad BDDalloc)) *) rewrite BDDalloc_negm_same. apply nodes_preserved_neg_memo_OK with (bs := bs_of_cfg new_cfg). (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. exact (bs_of_cfg_OK _ new_cfg_OK). (* Goal: BDDstate_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) *) (* Goal: BDDuniv_memo_OK (bs_of_cfg new_cfg) (um_of_cfg new_cfg) *) exact BDDalloc_keeps_state_OK. exact (negm_of_cfg_OK _ new_cfg_OK). Qed. Lemma BDDalloc_keeps_or_memo_OK : BDDor_memo_OK (bs_of_cfg (fst BDDalloc)) (orm_of_cfg (fst BDDalloc)). Proof. (* Goal: BDDor_memo_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) (orm_of_cfg (@fst BDDconfig ad BDDalloc)) *) rewrite BDDalloc_orm_same. apply nodes_preserved_or_memo_OK with (bs := bs_of_cfg new_cfg). (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. exact (bs_of_cfg_OK _ new_cfg_OK). (* Goal: BDDstate_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) *) (* Goal: BDDuniv_memo_OK (bs_of_cfg new_cfg) (um_of_cfg new_cfg) *) exact BDDalloc_keeps_state_OK. exact (orm_of_cfg_OK _ new_cfg_OK). Qed. Lemma BDDalloc_keeps_univ_memo_OK : BDDuniv_memo_OK (bs_of_cfg (fst BDDalloc)) (um_of_cfg (fst BDDalloc)). Proof. (* Goal: BDDuniv_memo_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) (um_of_cfg (@fst BDDconfig ad BDDalloc)) *) rewrite BDDalloc_um_same. apply nodes_preserved_um_OK with (bs := bs_of_cfg new_cfg). (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. exact (bs_of_cfg_OK _ new_cfg_OK). (* Goal: BDDstate_OK (bs_of_cfg (@fst BDDconfig ad BDDalloc)) *) (* Goal: BDDuniv_memo_OK (bs_of_cfg new_cfg) (um_of_cfg new_cfg) *) exact BDDalloc_keeps_state_OK. exact (um_of_cfg_OK _ new_cfg_OK). Qed. (* The following results are used for BDDmake *) Lemma BDDalloc_keeps_config_OK : BDDconfig_OK (fst BDDalloc). Proof. (* Goal: and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) *) unfold BDDconfig_OK in |- *. split. apply BDDalloc_keeps_state_OK. split. (* Goal: and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) *) exact BDDalloc_keeps_sharing_OK. split. exact BDDalloc_keeps_free_list_OK. (* Goal: and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) *) split. exact BDDalloc_keeps_cnt_OK. split. (* Goal: and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)))))))) *) exact BDDalloc_keeps_neg_memo_OK. split. exact BDDalloc_keeps_or_memo_OK. (* Goal: BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc))))))) *) exact BDDalloc_keeps_univ_memo_OK. Qed. Lemma BDDalloc_preserves_used_nodes : used_nodes_preserved cfg (fst BDDalloc) ul. Proof. (* Goal: BDDconfig_OK cfg *) (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) apply used_nodes_preserved_trans with (cfg2 := new_cfg). assumption. (* Goal: used_nodes_preserved cfg new_cfg ul *) (* Goal: used_nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) ul *) exact new_cfg_nodes_preserved. apply nodes_preserved_used_nodes_preserved. (* Goal: nodes_preserved new_cfg (@fst BDDconfig ad BDDalloc) *) exact BDDalloc_preserves_nodes. Qed. Lemma BDDalloc_node_OK : config_node_OK (fst BDDalloc) (snd BDDalloc). Proof. (* Goal: BDD_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc) *) unfold config_node_OK in |- *. apply BDD_OK_node_OK. apply BDDalloc_BDD_OK. Qed. Lemma BDDallocGet : MapGet _ (fst (fst BDDalloc)) (snd BDDalloc) = Some (x, (l, r)). Proof. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad BDDalloc)) (@snd BDDconfig ad BDDalloc)) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (BDDalloc_lemma_1 (snd BDDalloc)). (* Goal: @eq (option (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (Neqb_correct (snd BDDalloc)). reflexivity. Qed. End BDD_alloc.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import op. Section BDDuniv_sec. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Fixpoint BDDuniv_1 (cfg : BDDconfig) (ul : list ad) (node : ad) (y : BDDvar) (bound : nat) {struct bound} : BDDconfig * ad := match bound with | O => (* Error *) (initBDDconfig, BDDzero) | S bound' => match MapGet2 _ (um_of_cfg cfg) node y with | Some node' => (cfg, node') | None => match MapGet _ (fst cfg) node with | None => (cfg, node) | Some (x, (l, r)) => match BDDcompare x y with | Datatypes.Lt => (cfg, node) | Datatypes.Eq => BDDand gc cfg ul l r | Datatypes.Gt => match BDDuniv_1 cfg ul l y bound' with | (cfgl, nodel) => match BDDuniv_1 cfgl (nodel :: ul) r y bound' with | (cfgr, noder) => match BDDmake gc cfgr x nodel noder (noder :: nodel :: ul) with | (cfg', node') => (BDDuniv_memo_put cfg' y node node', node') end end end end end end end. Lemma BDDuniv_1_lemma : forall (bound : nat) (cfg : BDDconfig) (ul : list ad) (u : BDDvar) (node : ad), nat_of_N (node_height cfg node) < bound -> BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> BDDconfig_OK (fst (BDDuniv_1 cfg ul node u bound)) /\ config_node_OK (fst (BDDuniv_1 cfg ul node u bound)) (snd (BDDuniv_1 cfg ul node u bound)) /\ used_nodes_preserved cfg (fst (BDDuniv_1 cfg ul node u bound)) ul /\ Nleb (node_height (fst (BDDuniv_1 cfg ul node u bound)) (snd (BDDuniv_1 cfg ul node u bound))) (node_height cfg node) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDuniv_1 cfg ul node u bound)) (snd (BDDuniv_1 cfg ul node u bound))) (bool_fun_forall u (bool_fun_of_BDD cfg node)). Proof. (* Goal: forall (bound : nat) (cfg : BDDconfig) (ul : list ad) (u : BDDvar) (node : ad) (_ : lt (N.to_nat (node_height cfg node)) bound) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : used_node' cfg ul node), and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv_1 cfg ul node u bound))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv_1 cfg ul node u bound)) (@snd BDDconfig ad (BDDuniv_1 cfg ul node u bound))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv_1 cfg ul node u bound)) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (BDDuniv_1 cfg ul node u bound)) (@snd BDDconfig ad (BDDuniv_1 cfg ul node u bound))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv_1 cfg ul node u bound)) (@snd BDDconfig ad (BDDuniv_1 cfg ul node u bound))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) simple induction bound. intros. absurd (nat_of_N (node_height cfg node) < 0). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply lt_n_O. assumption. simpl in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (and (config_node_OK (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (option_sum _ (MapGet2 ad (um_of_cfg cfg) node u)). intro y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node))) (and (config_node_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim y; clear y; intros node' H4. rewrite H4. simpl in |- *. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (um_of_cfg_OK _ H1 u node node' H4). intros. split. assumption. (* Goal: used_node' cfg ul node *) split. inversion H6. inversion H8. assumption. split. (* Goal: and (@eq bool (Nleb (node_height cfg node) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node))) *) apply used_nodes_preserved_refl. split. exact (proj1 (proj2 H6)). (* Goal: forall _ : @eq (option ad) (MapGet2 ad (um_of_cfg cfg) node u) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (and (config_node_OK (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end) (@snd BDDconfig ad match MapGet2 ad (um_of_cfg cfg) node u with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) exact (proj2 (proj2 H6)). intro y. rewrite y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (fst cfg) node)). intro y0. (* Goal: forall (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim y0; clear y0. (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) x)), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => match BDDcompare x0 u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intro x; elim x; clear x; intros x x0; elim x0; clear x0; intros l r H4. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H4. cut (used_node' cfg ul l). cut (used_node' cfg ul r). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (relation_sum (BDDcompare x u)). intro y0. elim y0; clear y0. (* Goal: used_node' cfg ul node *) intros y0. rewrite y0. split. apply BDDand_config_OK. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. split. (* Goal: used_node' cfg ul node *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. split. apply BDDand_used_nodes_preserved. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. split. apply Nleb_trans with (b := BDDvar_max (node_height cfg l) (node_height cfg r)). (* Goal: used_node' cfg ul node *) apply BDDand_var_le. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. unfold Nleb in |- *. (* Goal: @eq bool (Nat.leb (N.to_nat (BDDvar_max (node_height cfg l) (node_height cfg r))) (N.to_nat (node_height cfg node))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDand gc cfg ul l r)) (@snd BDDconfig ad (BDDand gc cfg ul l r))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (BDDvar_max_max (node_height cfg l) (node_height cfg r)). (* Goal: @eq bool (Nat.leb (S (N.to_nat x)) (N.to_nat u)) true *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply leb_correct. apply lt_le_weak. apply lt_le_trans with (m := max (nat_of_N (node_height cfg node)) (nat_of_N (node_height cfg node))). (* Goal: lt (max (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg r))) (max (N.to_nat (node_height cfg node)) (N.to_nat (node_height cfg node))) *) (* Goal: le (max (N.to_nat (node_height cfg node)) (N.to_nat (node_height cfg node))) (N.to_nat (node_height cfg node)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDand gc cfg ul l r)) (@snd BDDconfig ad (BDDand gc cfg ul l r))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply lt_max_1_2. apply BDDcompare_lt. unfold node_height in |- *. (* Goal: used_node' cfg ul node *) apply bs_node_height_left with (x := x) (r := r). exact (proj1 H1). assumption. (* Goal: lt (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDcompare_lt. unfold node_height in |- *. (* Goal: used_node' cfg ul node *) apply bs_node_height_right with (x := x) (l := l). exact (proj1 H1). assumption. (* Goal: le (max (N.to_nat (node_height cfg node)) (N.to_nat (node_height cfg node))) (N.to_nat (node_height cfg node)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDand gc cfg ul l r)) (@snd BDDconfig ad (BDDand gc cfg ul l r))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (max_x_x_eq_x (nat_of_N (node_height cfg node))). apply le_n. (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall x (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite <- (BDD_EGAL_complete _ _ y0). apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))). apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)). apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg l) (bool_fun_of_BDD cfg r)). (* Goal: used_node' cfg ul node *) apply BDDand_is_and. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_and_comm. apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_and (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall x (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (BDD_EGAL_complete _ _ y0). apply bool_fun_forall_if_egal. (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall x (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold bool_fun_of_BDD in |- *. rewrite <- (BDD_EGAL_complete _ _ y0). (* Goal: bool_fun_independent (bool_fun_of_BDD_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) r) x *) (* Goal: bool_fun_independent (bool_fun_of_BDD cfg l) u *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall x (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDvar_independent_high with (x := x) (l := l) (node := node). (* Goal: used_node' cfg ul node *) exact (proj1 H1). assumption. unfold bool_fun_of_BDD in |- *. (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall x (bool_fun_of_BDD cfg node)) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Lt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite <- (BDD_EGAL_complete _ _ y0). (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDvar_independent_low with (x := x) (r := r) (node := node). exact (proj1 H1). (* Goal: used_node' cfg ul node *) assumption. rewrite <- (BDD_EGAL_complete _ _ y0). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_node' cfg ul node *) apply bool_fun_of_BDD_int. assumption. assumption. intros y0. rewrite y0. (* Goal: used_node' cfg ul node *) split. assumption. split. apply used_node'_OK with (ul := ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. split. apply used_nodes_preserved_refl. split. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node))) (and (config_node_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply Nleb_refl. simpl in |- *. apply bool_fun_eq_sym. (* Goal: bool_fun_independent (bool_fun_of_BDD cfg node) u *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_forall_independent. unfold bool_fun_of_BDD in |- *. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDvar_independent_bs. exact (proj1 H1). (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node *) (* Goal: @eq bool (Nleb (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) u) true *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) fold (node_OK (fst cfg) node) in |- *. fold (config_node_OK cfg node) in |- *. (* Goal: used_node' cfg ul node *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold bs_node_height in |- *. rewrite H4. unfold Nleb in |- *. rewrite (ad_S_is_S x). (* Goal: @eq bool (Nat.leb (S (N.to_nat x)) (N.to_nat u)) true *) (* Goal: forall (_ : @eq comparison (BDDcompare x u) Gt) (_ : used_node' cfg ul r) (_ : used_node' cfg ul l), and (BDDconfig_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (config_node_OK (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end) (@snd BDDconfig ad match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply leb_correct. fold lt in |- *. fold (nat_of_N x < nat_of_N u) in |- *. (* Goal: used_node' cfg ul node *) apply BDDcompare_lt. assumption. intros y0 H5 H6. rewrite y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (prod_sum _ _ (BDDuniv_1 cfg ul l u n)). intros cfgl H7. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim H7; clear H7. intros nodel H7. rewrite H7. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim (prod_sum _ _ (BDDuniv_1 cfgl (nodel :: ul) r u n)). intros cfgr H8. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node'))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim H8; clear H8. intros noder H8. rewrite H8. elim (prod_sum _ _ (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node))) (and (config_node_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair BDDconfig ad cfg node)) (@snd BDDconfig ad (@pair BDDconfig ad cfg node))) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intros cfg' H9. elim H9; clear H9. intros node' H9. rewrite H9. simpl in |- *. cut (BDDconfig_OK cfgl /\ config_node_OK cfgl nodel /\ used_nodes_preserved cfg cfgl ul /\ Nleb (node_height cfgl nodel) (node_height cfg l) = true /\ bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intro. elim H10; clear H10; intros. elim H11; clear H11; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim H12; clear H12; intros. elim H13; clear H13; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (config_node_OK cfg l). cut (config_node_OK cfg r). intros. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (used_list_OK cfgl ul). intro. cut (used_list_OK cfgl (nodel :: ul)). (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) intro. cut (used_node' cfgl ul r). intro. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (used_node' cfgl (nodel :: ul) r). intro. cut (BDDconfig_OK cfgr /\ config_node_OK cfgr noder /\ used_nodes_preserved cfgl cfgr (nodel :: ul) /\ Nleb (node_height cfgr noder) (node_height cfgl r) = true /\ bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intro. elim H21; clear H21; intros. elim H22; clear H22; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) elim H23; clear H23; intros. elim H24; clear H24; intros. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (used_list_OK cfgr (nodel :: ul)). intro. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (used_list_OK cfgr (noder :: nodel :: ul)). intro. (* Goal: and (BDDconfig_OK (BDDuniv_memo_put cfg' u node node')) (and (config_node_OK (BDDuniv_memo_put cfg' u node node') node') (and (used_nodes_preserved cfg (BDDuniv_memo_put cfg' u node node') ul) (and (@eq bool (Nleb (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDuniv_memo_put cfg' u node node') node') (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (used_node' cfgr (noder :: nodel :: ul) nodel). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (used_node' cfgr (noder :: nodel :: ul) noder). intros. cut (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfgr) nodel = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt). cut (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfgr) noder = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intros. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (BDDuniv_memo_put cfg' u node node')) (and (config_node_OK (BDDuniv_memo_put cfg' u node node') node') (and (used_nodes_preserved cfg (BDDuniv_memo_put cfg' u node node') ul) (and (@eq bool (Nleb (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDuniv_memo_put cfg' u node node') node') (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (used_nodes_preserved cfgr cfg' (noder :: nodel :: ul)). (* Goal: forall (_ : used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul))) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (BDDuniv_memo_put cfg' u node node')) (and (config_node_OK (BDDuniv_memo_put cfg' u node node') node') (and (used_nodes_preserved cfg (BDDuniv_memo_put cfg' u node node') ul) (and (@eq bool (Nleb (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDuniv_memo_put cfg' u node node') node') (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (config_node_OK cfg' node'). cut (bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) cut (Nleb (node_height cfg' node') (ad_S x) = true). intros. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (config_node_OK cfg' node). intro. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) cut (nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node')). intro. (* Goal: and (@eq bool (Nleb (node_height cfg node) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node))) *) cut (BDDconfig_OK (BDDuniv_memo_put cfg' u node node')). intro. split. (* Goal: used_node' cfg ul node *) assumption. split. apply nodes_preserved_config_node_OK with (cfg1 := cfg'). (* Goal: used_node' cfg ul node *) assumption. assumption. split. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfg'). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: used_nodes_preserved cfgr cfg' (@cons ad nodel ul) *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := noder). (* Goal: used_node' cfg ul node *) assumption. apply nodes_preserved_used_nodes_preserved. assumption. rewrite (Neqb_complete (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg' node')). (* Goal: used_node' cfg ul node *) split. apply Nleb_trans with (b := ad_S x). assumption. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. unfold bs_node_height in |- *. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H4. apply Nleb_refl. (* Goal: bool_fun_eq (bool_fun_of_BDD (BDDuniv_memo_put cfg' u node node') node') (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: @eq bool (N.eqb (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg' node')) true *) (* Goal: BDDconfig_OK (BDDuniv_memo_put cfg' u node node') *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node'). (* Goal: used_node' cfg ul node *) apply nodes_preserved_bool_fun. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)). (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_of_BDD cfgl r)). (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_forall_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved'_bool_fun with (ul := ul). (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl nodel). (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_bool_fun with (ul := nodel :: ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_sym. apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))). (* Goal: used_node' cfg ul node *) apply bool_fun_forall_preserves_eq. apply bool_fun_of_BDD_int. assumption. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_forall_orthogonal. apply not_true_is_false. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) unfold not in |- *; intro. rewrite (Neqb_complete _ _ H40) in y0. (* Goal: False *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (BDD_EGAL_correct u) in y0. discriminate y0. (* Goal: @eq bool (N.eqb (node_height (BDDuniv_memo_put cfg' u node node') node') (node_height cfg' node')) true *) (* Goal: BDDconfig_OK (BDDuniv_memo_put cfg' u node node') *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply nodes_preserved_node_height_eq. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. apply BDDum_put_OK. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. (* Goal: @eq bool (Nleb (node_height cfg' node') (node_height cfg' node)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete (node_height cfg' node) (node_height cfg node)). (* Goal: used_node' cfg ul node *) unfold node_height at 2 in |- *. unfold bs_node_height in |- *. rewrite H4. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. (* Goal: used_node' cfg ul node *) assumption. apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. (* Goal: used_node' cfg ul node *) assumption. apply used_nodes_preserved_cons with (node := nodel). (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_cons with (node := noder). assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)). (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_of_BDD cfg node)). apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_of_BDD cfgl r)). (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_forall_preserves_eq. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_forall u (bool_fun_of_BDD cfg r)) (bool_fun_forall u (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl nodel). (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_bool_fun with (ul := nodel :: ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: used_node' cfg ul node *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_sym. apply bool_fun_forall_orthogonal. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply not_true_is_false. unfold not in |- *; intro. (* Goal: False *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete _ _ H39) in y0. rewrite (BDD_EGAL_correct u) in y0. (* Goal: False *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: bool_fun_eq (bool_fun_forall u (bool_fun_of_BDD cfg node)) (bool_fun_forall u (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDuniv_memo_put cfg' u node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) discriminate y0. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_node' cfg ul node *) apply bool_fun_of_BDD_int. assumption. assumption. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_cons with (node := noder). assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. apply BDDum_put_nodes_preserved. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_node_OK' with (ul := ul) (cfg := cfg). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. apply used_nodes_preserved_trans with (cfg2 := cfgl). (* Goal: used_node' cfg ul node *) assumption. assumption. apply used_nodes_preserved_trans with (cfg2 := cfgr). (* Goal: used_node' cfg ul node *) assumption. apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (Nleb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_cons with (node := noder). assumption. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: used_node' cfg ul node *) apply BDDmake_node_height_le. assumption. (* Goal: used_node' cfg ul node *) assumption. rewrite H9; reflexivity. rewrite H9; reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: used_node' cfg ul node *) apply BDDmake_bool_fun. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. rewrite H9. reflexivity. rewrite H9. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfgl nodel)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: used_node' cfg ul node *) apply BDDmake_node_OK. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. rewrite H9. reflexivity. rewrite H9. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfgl nodel)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: used_node' cfg ul node *) apply BDDmake_preserves_used_nodes. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H9. reflexivity. rewrite H9. reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: used_node' cfg ul node *) apply BDDmake_keeps_config_OK. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H9. reflexivity. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intros. rewrite (ad_S_compare xr x). (* Goal: @eq comparison (BDDcompare (ad_S xr) (ad_S x)) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace (ad_S xr) with (node_height cfgr noder). (* Goal: @eq comparison (BDDcompare (node_height cfgr nodel) (ad_S x)) Lt *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace (ad_S x) with (node_height cfg node). (* Unfold node_height in H24.*) (* Goal: @eq comparison (BDDcompare (node_height cfgl nodel) (node_height cfg node)) Lt *) (* Goal: @eq bool (N.eqb (node_height cfgr nodel) (node_height cfgl nodel)) true *) (* Goal: @eq N (node_height cfg node) (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDlt_compare. apply le_lt_trans with (m := nat_of_N (node_height cfgl r)). (* Goal: used_node' cfg ul node *) apply leb_complete. assumption. (* Goal: lt (N.to_nat (node_height cfgl r)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfgl *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) noder *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) cfgr *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete (node_height cfgl r) (node_height cfg r)). (* Goal: lt (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDcompare_lt. unfold node_height in |- *. apply bs_node_height_right with (x := x) (l := l). (* Goal: used_node' cfg ul node *) exact (proj1 H1). assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. unfold bs_node_height in |- *. rewrite H4. reflexivity. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. unfold bs_node_height in |- *. rewrite H30. reflexivity. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) intros. rewrite (ad_S_compare xl x). (* Goal: @eq comparison (BDDcompare (ad_S xl) (ad_S x)) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace (ad_S xl) with (node_height cfgr nodel). (* Goal: @eq comparison (BDDcompare (node_height cfgr nodel) (ad_S x)) Lt *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace (ad_S x) with (node_height cfg node). (* Unfold node_height in H24.*) (* Goal: @eq comparison (BDDcompare (node_height cfgr nodel) (node_height cfg node)) Lt *) (* Goal: @eq N (node_height cfg node) (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete (node_height cfgr nodel) (node_height cfgl nodel)). (* Goal: @eq comparison (BDDcompare (node_height cfgl nodel) (node_height cfg node)) Lt *) (* Goal: @eq bool (N.eqb (node_height cfgr nodel) (node_height cfgl nodel)) true *) (* Goal: @eq N (node_height cfg node) (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDlt_compare. apply le_lt_trans with (m := nat_of_N (node_height cfg l)). (* Goal: used_node' cfg ul node *) apply leb_complete. assumption. (* Goal: lt (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDcompare_lt. unfold node_height in |- *. apply bs_node_height_left with (x := x) (r := r). (* Goal: used_node' cfg ul node *) exact (proj1 H1). assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved'_node_height_eq with (ul := nodel :: ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. (* Goal: used_node' cfgr (@cons ad nodel ul) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_node'_cons_node_ul. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (node_height cfgr nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. unfold bs_node_height in |- *. rewrite H4. reflexivity. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. unfold bs_node_height in |- *. rewrite H30. reflexivity. (* Goal: used_node' cfgr (@cons ad nodel ul) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg ul node *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: used_node' cfg ul node *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfgl). assumption. (* Goal: used_node' cfg ul node *) assumption. (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace cfgr with (fst (BDDuniv_1 cfgl (nodel :: ul) r u n)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) noder) (and (used_nodes_preserved cfgl (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) (@cons ad nodel ul)) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) noder) (bool_fun_forall u (bool_fun_of_BDD cfgl r)))))) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) cfgr *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace noder with (snd (BDDuniv_1 cfgl (nodel :: ul) r u n)). apply H. (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). (* Goal: lt (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete (node_height cfgl r) (node_height cfg r)). apply BDDcompare_lt. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. apply bs_node_height_right with (x := x) (l := l). exact (proj1 H1). (* Goal: used_node' cfg ul node *) assumption. apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. rewrite H8. reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfgl (@cons ad nodel ul) r u n)) cfgr *) (* Goal: used_node' cfgl (@cons ad nodel ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H8. reflexivity. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: used_node' cfg ul node *) assumption. apply high_used' with (node := node) (x := x) (l := l). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. apply node_OK_list_OK. assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: used_node' cfg ul node *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (Nleb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace cfgl with (fst (BDDuniv_1 cfg ul l u n)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n))) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n))) (bool_fun_forall u (bool_fun_of_BDD cfg l)))))) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) replace nodel with (snd (BDDuniv_1 cfg ul l u n)). apply H. (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). (* Goal: lt (N.to_nat (node_height cfg l)) (N.to_nat (node_height cfg node)) *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply BDDcompare_lt. unfold node_height in |- *. (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: BDDconfig_OK cfg *) (* Goal: used_list_OK cfg ul *) (* Goal: used_node' cfg ul l *) (* Goal: @eq ad (@snd BDDconfig ad (BDDuniv_1 cfg ul l u n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) apply bs_node_height_left with (x := x) (r := r). exact (proj1 H1). (* Goal: used_node' cfg ul node *) assumption. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv_1 cfg ul l u n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) ul) (and (@eq bool (Nleb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => match BDDcompare x u with | Eq => BDDand gc cfg ul l r | Lt => @pair BDDconfig ad cfg node | Gt => let (cfgl, nodel) := BDDuniv_1 cfg ul l u n in let (cfgr, noder) := BDDuniv_1 cfgl (@cons ad nodel ul) r u n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))))) ad (BDDuniv_memo_put cfg' u node node') node' end | None => @pair BDDconfig ad cfg node end)) (bool_fun_forall u (bool_fun_of_BDD cfg node)))))) *) rewrite H7. reflexivity. rewrite H7. reflexivity. (* Goal: used_node' cfg ul node *) apply high_used' with (node := node) (x := x) (l := l). assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. apply low_used' with (node := node) (x := x) (r := r). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. intro y0. rewrite y0. simpl in |- *. split. assumption. (* Goal: used_node' cfg ul node *) split. apply used_node'_OK with (ul := ul). assumption. assumption. (* Goal: used_node' cfg ul node *) assumption. split. apply used_nodes_preserved_refl. split. (* Goal: @eq bool (Nleb (node_height cfg node) (node_height cfg node)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) apply Nleb_refl. cut (config_node_OK cfg node). intro. (* Goal: forall _ : @eq ad node BDDone, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) unfold config_node_OK in H4. elim H4. intro. rewrite H5. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_forall u (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true), bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_trans with bool_fun_zero. apply bool_fun_of_BDD_zero. (* Goal: used_node' cfg ul node *) assumption. (* Goal: bool_fun_eq bool_fun_zero (bool_fun_forall u (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true), bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_trans with (bf2 := bool_fun_forall u bool_fun_zero). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_sym. apply bool_fun_forall_zero. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_node' cfg ul node *) apply bool_fun_of_BDD_zero. assumption. intro. elim H5. intro. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) rewrite H6. apply bool_fun_eq_trans with bool_fun_one. (* Goal: used_node' cfg ul node *) apply bool_fun_of_BDD_one. assumption. (* Goal: bool_fun_eq bool_fun_one (bool_fun_forall u (bool_fun_of_BDD cfg BDDone)) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_trans with (bf2 := bool_fun_forall u bool_fun_one). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_eq_sym. apply bool_fun_forall_one. (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_forall u (bool_fun_of_BDD cfg node)) *) (* Goal: config_node_OK cfg node *) apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_node' cfg ul node *) apply bool_fun_of_BDD_one. assumption. unfold in_dom in |- *. rewrite y0. (* Goal: used_node' cfg ul node *) intro; discriminate. apply used_node'_OK with (ul := ul). assumption. (* Goal: used_node' cfg ul node *) assumption. assumption. Qed. End BDDuniv_sec.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import config. Require Import myMap. Section BDDgc. Definition set_closed (bs : BDDstate) (marked : Map unit) := forall node node' : ad, in_dom _ node marked = true -> nodes_reachable bs node node' -> in_dom _ node' bs = true -> in_dom _ node' marked = true. Fixpoint add_used_nodes_1 (bs : BDDstate) (node : ad) (marked : Map unit) (bound : nat) {struct bound} : Map unit := match bound with | O => (* Error *) M0 unit | S bound' => match MapGet _ marked node with | None => match MapGet _ bs node with | None => marked | Some (x, (l, r)) => MapPut _ (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked bound') bound') node tt end | Some tt => marked end end. Definition add_used_nodes (bs : BDDstate) (node : ad) (marked : Map unit) := add_used_nodes_1 bs node marked (S (nat_of_N (bs_node_height bs node))). Definition mark (bs : BDDstate) (used : list ad) := fold_right (add_used_nodes bs) (M0 unit) used. Definition new_bs (bs : BDDstate) (used : list ad) := MapDomRestrTo _ _ bs (mark bs used). Definition new_fl (bs : BDDstate) (used : list ad) (fl : BDDfree_list) := MapDomRestrByApp1 _ _ (fun a0 : ad => a0) fl bs (mark bs used). Definition used_node_bs_1 (marked : Map unit) (node : ad) := match MapGet _ marked node with | Some _ => true | None => Neqb node BDDzero || Neqb node BDDone end. Fixpoint clean'1_1 (pf : ad -> ad) (m' : Map unit) (m : Map ad) {struct m} : Map ad := match m with | M0 => m | M1 a a' => if used_node_bs_1 m' (pf a) && used_node_bs_1 m' a' then m else M0 _ | M2 m1 m2 => makeM2 _ (clean'1_1 (fun a0 : ad => pf (Ndouble a0)) m' m1) (clean'1_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m2) end. Definition clean'1 (m : Map ad) (m' : Map unit) := clean'1_1 (fun a : ad => a) m' m. (* Cleans memoization table for negation *) Fixpoint clean'2_1 (pf : ad -> ad) (m' : Map unit) (m : Map (Map ad)) {struct m} : Map (Map ad) := match m with | M0 => m | M1 a y => if used_node_bs_1 m' (pf a) then M1 _ a (clean'1 y m') else M0 _ | M2 m1 m2 => makeM2 _ (clean'2_1 (fun a0 : ad => pf (Ndouble a0)) m' m1) (clean'2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m2) end. Definition clean'2 (m : Map (Map ad)) (m' : Map unit) := clean'2_1 (fun a : ad => a) m' m. (* Cleans memoization table for disjunction *) Fixpoint clean1 (m' : Map unit) (m : Map ad) {struct m} : Map ad := match m with | M0 => m | M1 a a' => if used_node_bs_1 m' a' then m else M0 _ | M2 m1 m2 => makeM2 _ (clean1 m' m1) (clean1 m' m2) end. Fixpoint clean2_1 (pf : ad -> ad) (m' : Map unit) (m : Map (Map ad)) {struct m} : Map (Map ad) := match m with | M0 => m | M1 a y => if used_node_bs_1 m' (pf a) then M1 _ a (clean1 m' y) else M0 _ | M2 m1 m2 => makeM2 _ (clean2_1 (fun a0 : ad => pf (Ndouble a0)) m' m1) (clean2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m2) end. Definition clean2 (m : Map (Map ad)) (m' : Map unit) := clean2_1 (fun a : ad => a) m' m. Fixpoint clean3_1 (pf : ad -> ad) (m' : Map unit) (m : Map (Map (Map ad))) {struct m} : Map (Map (Map ad)) := match m with | M0 => m | M1 a y => if used_node_bs_1 m' (pf a) then M1 _ a (clean2 y m') else M0 _ | M2 m1 m2 => makeM2 _ (clean3_1 (fun a0 : ad => pf (Ndouble a0)) m' m1) (clean3_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m2) end. Definition clean3 (m : Map (Map (Map ad))) (m' : Map unit) := clean3_1 (fun a : ad => a) m' m. (* Cleans sharing map *) Inductive dummy_mark : Set := DM : Map unit -> dummy_mark. Definition gc_0 (cfg : BDDconfig) (used : list ad) := match cfg with | (bs, (share, (fl, (cnt, (negm, (orm, um)))))) => match DM (mark bs used) with | DM marked => let bs' := MapDomRestrTo _ _ bs marked in let fl' := MapDomRestrByApp1 _ _ (fun a0 : ad => a0) fl bs marked in let share' := clean3 share marked in let negm' := clean'1 negm marked in let orm' := clean'2 orm marked in let um' := clean2 um marked in (bs', (share', (fl', (cnt, (negm', (orm', um')))))) end end. Definition gc_inf (cfg : BDDconfig) (used : list ad) := cfg. (* Temporary *) Definition is_nil (A : Set) (l : list A) := match l with | nil => true | _ => false end. (* inefficient because Nleb works by converting from ad to nat *) Definition gc_x (x : ad) (cfg : BDDconfig) := if is_nil _ (fst (snd (snd cfg))) && Nleb x (fst (snd (snd (snd cfg)))) then gc_0 cfg else gc_inf cfg. (* efficient version of gc_x *) Definition gc_x_opt (x : ad) (cfg : BDDconfig) := match fl_of_cfg cfg with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Datatypes.Lt => gc_0 cfg | _ => gc_inf cfg end | _ => gc_inf cfg end. Lemma add_used_nodes_1_lemma_1 : forall (bound : nat) (bs : BDDstate) (node : ad) (marked : Map unit), BDDstate_OK bs -> nat_of_N (bs_node_height bs node) < bound -> forall node' : ad, in_dom _ node' marked = true -> in_dom _ node' (add_used_nodes_1 bs node marked bound) = true. Proof. (* Goal: forall (bound : nat) (bs : BDDstate) (node : ad) (marked : Map unit) (_ : BDDstate_OK bs) (_ : lt (N.to_nat (bs_node_height bs node)) bound) (_ : set_closed bs marked), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked bound)) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked bound)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (add_used_nodes_1 bs node marked bound))) *) simple induction bound. intros bs node marked H00. intros. (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked O)) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked O)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (add_used_nodes_1 bs node marked O))) *) (* Goal: forall (n : nat) (_ : forall (bs : BDDstate) (node : ad) (marked : Map unit) (_ : BDDstate_OK bs) (_ : lt (N.to_nat (bs_node_height bs node)) n) (_ : set_closed bs marked), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked n)) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked n)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (add_used_nodes_1 bs node marked n)))) (bs : BDDstate) (node : ad) (marked : Map unit) (_ : BDDstate_OK bs) (_ : lt (N.to_nat (bs_node_height bs node)) (S n)) (_ : set_closed bs marked), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked (S n))) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked (S n))) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (add_used_nodes_1 bs node marked (S n)))) *) absurd (nat_of_N (bs_node_height bs node) < 0). apply lt_n_O. assumption. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros n H bs node marked H00. intros. simpl in |- *. elim (option_sum _ (MapGet _ marked node)). (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) intro y. elim y; clear y. intros u H2. rewrite H2. simpl in |- *. elim u. (* Goal: used_list_OK cfg ul *) assumption. intro y. rewrite y. elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y0. elim y0; clear y0. intro x. elim x; clear x. intros x y0. (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) elim y0; clear y0; intros l r. intro y0. rewrite y0. unfold in_dom in |- *. rewrite (MapPut_semantics unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt node'). (* Goal: @eq bool match (if N.eqb node node' then @Some unit tt else MapGet unit markedr node') with | Some a => true | None => false end true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) elim (sumbool_of_bool (Neqb node node')). intro y1. rewrite y1. reflexivity. (* Goal: forall (a : BDDsharing_map) (b : prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b))) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) ul), and (BDDconfig_OK (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y1. rewrite y1. cut (in_dom _ node' (add_used_nodes_1 bs l marked n) = true). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. cut (in_dom _ node' (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) = true). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. unfold in_dom in H3. elim (option_sum _ (MapGet unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node')). (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) intro y2. elim y2; intros x0 y3. rewrite y3. reflexivity. intro y2. rewrite y2 in H3. (* Goal: used_list_OK cfg ul *) discriminate. apply H. assumption. apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). (* Goal: lt (N.to_nat x0) (N.to_nat x) *) (* Goal: BDDstate_OK bs *) (* Goal: @eq nat (N.to_nat x0) (N.to_nat x0) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l (new_bs bs used)) true *) (* Goal: BDDbounded bs l x0 *) (* Goal: node_OK bs l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) apply BDDcompare_lt. apply bs_node_height_right with (bs := bs) (x := x) (l := l) (r := r). (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. assumption. apply H. assumption. (* Goal: lt (N.to_nat (bs_node_height bs l)) n *) (* Goal: set_closed bs marked *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). apply BDDcompare_lt. (* Goal: used_list_OK cfg ul *) apply bs_node_height_left with (bs := bs) (x := x) (l := l) (r := r). assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. intro y0. rewrite y0. assumption. Qed. Lemma add_used_nodes_1_lemma_2 : forall (bound : nat) (bs : BDDstate) (node : ad) (marked : Map unit), BDDstate_OK bs -> nat_of_N (bs_node_height bs node) < bound -> set_closed bs marked -> (forall node' : ad, nodes_reachable bs node node' /\ in_dom _ node' bs = true -> in_dom _ node' (add_used_nodes_1 bs node marked bound) = true) /\ (forall node' : ad, in_dom _ node' (add_used_nodes_1 bs node marked bound) = true -> in_dom _ node' marked = true \/ in_dom _ node' bs = true /\ nodes_reachable bs node node') /\ set_closed bs (add_used_nodes_1 bs node marked bound). Proof. (* Goal: forall (bound : nat) (bs : BDDstate) (node : ad) (marked : Map unit) (_ : BDDstate_OK bs) (_ : lt (N.to_nat (bs_node_height bs node)) bound) (_ : set_closed bs marked), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked bound)) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (add_used_nodes_1 bs node marked bound)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (add_used_nodes_1 bs node marked bound))) *) simple induction bound. intros. absurd (nat_of_N (bs_node_height bs node) < 0). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) apply lt_n_O. assumption. intros n H bs node marked H00. intros. simpl in |- *. (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet unit marked node with | Some (tt as u) => marked | None => match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet unit marked node with | Some (tt as u) => marked | None => match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet unit marked node with | Some (tt as u) => marked | None => match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end end)) *) elim (option_sum _ (MapGet _ marked node)). (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) intro y. elim y; clear y. intros u H2. rewrite H2. simpl in |- *. elim u. split. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold set_closed in H1. apply H1 with (node := node). unfold in_dom in |- *. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite H2. reflexivity. exact (proj1 H3). exact (proj2 H3). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) split. intros. left; assumption. assumption. intro y. rewrite y. (* Goal: @In ad node (new_fl bs used fl) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y0. elim y0; clear y0. (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x)), @In ad node (new_fl bs used fl) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @In ad node (new_fl bs used fl) *) intro x. elim x; clear x. intros x y0. elim y0; clear y0; intros l r. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (used_node_bs_1 m' (pf a)) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M1 (Map (Map ad)) a a0) a1 b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 b c) (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) intros y0. rewrite y0. cut (exists markedl : Map unit, markedl = add_used_nodes_1 bs l marked n). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro. elim H2; clear H2. intro markedl. intros. rewrite <- H2. (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (MapPut unit (add_used_nodes_1 bs r markedl n) node tt)) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' (MapPut unit (add_used_nodes_1 bs r markedl n) node tt)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs (MapPut unit (add_used_nodes_1 bs r markedl n) node tt))) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) cut (exists markedr : Map unit, markedr = add_used_nodes_1 bs r markedl n). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. elim H3; clear H3. intros markedr H3. rewrite <- H3. cut ((forall node' : ad, nodes_reachable bs l node' /\ in_dom _ node' bs = true -> in_dom _ node' markedl = true) /\ (forall node' : ad, in_dom _ node' markedl = true -> in_dom _ node' marked = true \/ in_dom _ node' bs = true /\ nodes_reachable bs l node') /\ set_closed bs markedl). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro. elim H4; clear H4; intros. elim H5; clear H5; intros. cut ((forall node' : ad, nodes_reachable bs r node' /\ in_dom _ node' bs = true -> in_dom _ node' markedr = true) /\ (forall node' : ad, in_dom _ node' markedr = true -> in_dom _ node' markedl = true \/ in_dom _ node' bs = true /\ nodes_reachable bs r node') /\ set_closed bs markedr). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. elim H7; clear H7; intros. elim H8; clear H8; intros. cut (forall node' : ad, nodes_reachable bs node node' /\ in_dom (BDDvar * (ad * ad)) node' bs = true -> in_dom unit node' (MapPut unit markedr node tt) = true). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. cut (forall node' : ad, in_dom unit node' (MapPut unit markedr node tt) = true -> in_dom unit node' marked = true \/ in_dom (BDDvar * (ad * ad)) node' bs = true /\ nodes_reachable bs node node'). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. split. assumption. split. assumption. unfold set_closed in |- *. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold in_dom in H12. rewrite (MapPut_semantics unit markedr node tt node0) in H12. (* Goal: forall (a : BDDsharing_map) (b : prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b))) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) ul), and (BDDconfig_OK (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) elim (sumbool_of_bool (Neqb node node0)). intro y1. rewrite <- (Neqb_complete _ _ y1) in H13. (* Goal: used_list_OK cfg ul *) apply H10. split. assumption. assumption. intro y1. rewrite y1 in H12. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold set_closed in H9. unfold in_dom in |- *. rewrite (MapPut_semantics unit markedr node tt node'). (* Goal: @eq bool match (if N.eqb node node' then @Some unit tt else MapGet unit markedr node') with | Some a => true | None => false end true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) elim (sumbool_of_bool (Neqb node node')). intro y2. rewrite y2. reflexivity. (* Goal: forall (b : prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 b))) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 b)) ul), and (BDDconfig_OK (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y2. rewrite y2. fold (in_dom _ node' markedr) in |- *. apply H9 with (node := node0). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. assumption. assumption. intros. unfold in_dom in H11. (* Goal: or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node')) *) (* Goal: forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (MapPut unit markedr node tt)) true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) rewrite (MapPut_semantics unit markedr node tt node') in H11. (* Goal: @eq bool match (if N.eqb node node' then @Some unit tt else MapGet unit markedr node') with | Some a => true | None => false end true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) elim (sumbool_of_bool (Neqb node node')). intro y1. rewrite y1 in H11. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) rewrite <- (Neqb_complete _ _ y1). right. split. unfold in_dom in |- *. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (used_node_bs_1 m' (pf a)) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M1 (Map (Map ad)) a a0) a1 b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 b c) (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite y0. reflexivity. apply nodes_reachable_0. intro y1. rewrite y1 in H11. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) fold (in_dom _ node' markedr) in H11. elim (H8 node' H11). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (H5 node' H12). intro. left; assumption. intro. elim H13; clear H13; intros. (* Goal: used_list_OK cfg ul *) right. split. assumption. apply nodes_reachable_1 with (x := x) (l := l) (r := r). (* Goal: used_list_OK cfg ul *) assumption. assumption. intro. right. split. exact (proj1 H12). (* Goal: used_list_OK cfg ul *) apply nodes_reachable_2 with (x := x) (l := l) (r := r). assumption. exact (proj2 H12). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold in_dom in |- *. rewrite (MapPut_semantics unit markedr node tt node'). (* Goal: @eq bool match (if N.eqb node node' then @Some unit tt else MapGet unit markedr node') with | Some a => true | None => false end true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) elim (sumbool_of_bool (Neqb node node')). intro y1. rewrite y1. reflexivity. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro y1. rewrite y1. fold (in_dom _ node' markedr) in |- *. elim H10; clear H10; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim (nodes_reachable_lemma_1 bs node node' H10). intro. rewrite H12 in y1. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) rewrite (Neqb_correct node') in y1. discriminate. intro. inversion H12. (* Goal: @eq bool (in_dom unit node' markedr) true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) inversion H13. inversion H14. clear H12 H13 H14. inversion H15. clear H15. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H13; clear H13; intro. rewrite y0 in H12. injection H12. clear H12; intros. (* Goal: used_list_OK cfg ul *) rewrite <- H14 in H13. rewrite H3. apply add_used_nodes_1_lemma_1. assumption. (* Goal: lt (N.to_nat (bs_node_height bs l)) n *) (* Goal: set_closed bs marked *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). apply BDDcompare_lt. (* Goal: used_list_OK cfg ul *) apply bs_node_height_right with (bs := bs) (x := x) (l := l) (r := r). assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply H4. split. assumption. assumption. apply H7. split. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite y0 in H12. injection H12; intros. rewrite H14. assumption. (* Goal: used_list_OK cfg ul *) assumption. rewrite H3. apply H. assumption. (* Goal: lt (N.to_nat (bs_node_height bs l)) n *) (* Goal: set_closed bs marked *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). (* Goal: lt (N.to_nat x0) (N.to_nat x) *) (* Goal: BDDstate_OK bs *) (* Goal: @eq nat (N.to_nat x0) (N.to_nat x0) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l (new_bs bs used)) true *) (* Goal: BDDbounded bs l x0 *) (* Goal: node_OK bs l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) apply BDDcompare_lt. apply bs_node_height_right with (bs := bs) (x := x) (l := l) (r := r). (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. assumption. rewrite H2. apply H. (* Goal: used_list_OK cfg ul *) assumption. apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). (* Goal: lt (N.to_nat x0) (N.to_nat x) *) (* Goal: BDDstate_OK bs *) (* Goal: @eq nat (N.to_nat x0) (N.to_nat x0) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l (new_bs bs used)) true *) (* Goal: BDDbounded bs l x0 *) (* Goal: node_OK bs l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) apply BDDcompare_lt. apply bs_node_height_left with (bs := bs) (x := x) (l := l) (r := r). (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. assumption. split with (add_used_nodes_1 bs r markedl n). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) reflexivity. split with (add_used_nodes_1 bs l marked n). intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) reflexivity. intro y0. rewrite y0. split. intros. elim H2; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim (nodes_reachable_lemma_1 bs node node' H3). intro. rewrite <- H5 in H4. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold in_dom in H4. rewrite y0 in H4. discriminate. intro. inversion H5. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) inversion H6. inversion H7. inversion H8. rewrite y0 in H9. discriminate. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) split. intros. left; assumption. assumption. Qed. Lemma add_used_nodes_lemma_1 : forall (bs : BDDstate) (node : ad) (marked : Map unit), BDDstate_OK bs -> forall node' : ad, in_dom _ node' marked = true -> in_dom _ node' (add_used_nodes bs node marked) = true. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold add_used_nodes in |- *. apply add_used_nodes_1_lemma_1. assumption. (* Goal: used_list_OK cfg ul *) unfold lt in |- *. apply le_n. assumption. Qed. Lemma add_used_nodes_lemma_2 : forall (bs : BDDstate) (node : ad) (marked : Map unit), BDDstate_OK bs -> set_closed bs marked -> (forall node' : ad, nodes_reachable bs node node' /\ in_dom _ node' bs = true -> in_dom _ node' (add_used_nodes bs node marked) = true) /\ (forall node' : ad, in_dom _ node' (add_used_nodes bs node marked) = true -> in_dom _ node' marked = true \/ in_dom _ node' bs = true /\ nodes_reachable bs node node') /\ set_closed bs (add_used_nodes bs node marked). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold add_used_nodes in |- *. apply add_used_nodes_1_lemma_2. assumption. (* Goal: used_list_OK cfg ul *) unfold lt in |- *. apply le_n. assumption. Qed. Lemma mark_lemma_1 : forall (used : list ad) (bs : BDDstate), BDDstate_OK bs -> set_closed bs (fold_right (add_used_nodes bs) (M0 unit) used) /\ (forall node : ad, in_dom _ node (fold_right (add_used_nodes bs) (M0 unit) used) = true <-> (exists node' : ad, In node' used /\ nodes_reachable bs node' node /\ in_dom _ node bs = true)). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) simple induction used. intros. simpl in |- *. split. unfold set_closed in |- *. unfold in_dom in |- *. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. intros; discriminate. unfold in_dom in |- *. simpl in |- *. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro; discriminate. intro. inversion H0. absurd False. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold not in |- *; trivial. exact (proj1 H1). intros. simpl in |- *. split. refine (proj2 (proj2 (add_used_nodes_lemma_2 bs a (fold_right (add_used_nodes bs) (M0 unit) l) _ _))). (* Goal: used_list_OK cfg ul *) assumption. exact (proj1 (H bs H0)). split. intro. elim (add_used_nodes_lemma_2 bs a (fold_right (add_used_nodes bs) (M0 unit) l) H0). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. elim H3; clear H3; intros. elim (H3 node H1). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (proj1 (proj2 (H bs H0) node)). intros. split with x. split. (* Goal: used_list_OK cfg ul *) right. exact (proj1 H6). exact (proj2 H6). assumption. intro. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) split with a. split. left; reflexivity. split. exact (proj2 H5). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) exact (proj1 H5). exact (proj1 (H bs H0)). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H1; clear H1. intros. elim H1; clear H1; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H1; clear H1. intros. rewrite <- H1 in H2. apply (proj1 (add_used_nodes_lemma_2 bs a (fold_right (add_used_nodes bs) (M0 unit) l) H0 (proj1 (H bs H0)))). (* Goal: used_list_OK cfg ul *) assumption. intro. lapply (proj2 (proj2 (H bs H0) node)). intro. (* Goal: used_list_OK cfg ul *) refine (add_used_nodes_lemma_1 _ _ _ _ _ _). assumption. assumption. (* Goal: used_list_OK cfg ul *) split with x. split. assumption. assumption. Qed. Lemma mark_lemma_2 : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> forall node : ad, in_dom _ node (mark bs used) = true <-> (exists node' : ad, In node' used /\ nodes_reachable bs node' node /\ in_dom _ node bs = true). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold mark in |- *. apply (proj2 (mark_lemma_1 used bs H)). Qed. Lemma mark_lemma_3 : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> forall node : ad, in_dom _ node (mark bs used) = true <-> used_node_bs bs used node /\ in_dom _ node bs = true. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) split. intro. elim (proj1 (mark_lemma_2 _ _ H _) H0). intros. (* Goal: and (used_nodes_preserved cfg cfg ul) (no_new_node cfg cfg) *) split. unfold used_node_bs in |- *. split with x. split. exact (proj1 H1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) exact (proj1 (proj2 H1)). exact (proj2 (proj2 H1)). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) apply (proj2 (mark_lemma_2 bs used H node)). elim H0; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H1; intros. split with x. split. exact (proj1 H3). split. (* Goal: used_list_OK cfg ul *) exact (proj2 H3). assumption. Qed. Lemma new_bs_lemma_1 : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> forall node : ad, used_node_bs bs used node -> MapGet _ bs node = MapGet _ (new_bs bs used) node. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold new_bs in |- *. rewrite (MapDomRestrTo_semantics _ _ bs (mark bs used) node). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet unit (mark bs used) node)). intro y. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim y; clear y; intros x y. rewrite y. reflexivity. intro y. rewrite y. (* Goal: @In ad node (new_fl bs used fl) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y0. (* Goal: forall (a : BDDvar) (b : prod ad ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) a b))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) elim y0; clear y0; intros x y0. cut (in_dom _ node (mark bs used) = true). (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) unfold in_dom in |- *. rewrite y. intro. discriminate. (* Goal: used_list_OK cfg ul *) apply (proj2 (mark_lemma_3 bs used H node)). split. assumption. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (used_node_bs_1 m' (pf a)) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M1 (Map (Map ad)) a a0) a1 b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 b c) (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) unfold in_dom in |- *. rewrite y0. reflexivity. tauto. Qed. Lemma new_bs_lemma_2 : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> forall node : ad, in_dom _ node (new_bs bs used) = true -> used_node_bs bs used node. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold new_bs in H0. unfold in_dom in H0. rewrite (MapDomRestrTo_semantics (BDDvar * (ad * ad)) unit bs (mark bs used) node) in H0. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet unit (mark bs used) node)). intro y. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim y; clear y; intros x y. cut (in_dom _ node (mark bs used) = true). intro. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) elim (proj1 (mark_lemma_3 bs used H node) H1). tauto. unfold in_dom in |- *. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) rewrite y. reflexivity. intro y. rewrite y in H0. discriminate. Qed. Lemma no_new_node_new_bs : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> no_new_node_bs bs (new_bs bs used). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold no_new_node_bs in |- *. intros. cut (used_node_bs bs used node). (* Goal: used_list_OK cfg ul *) intro. rewrite (new_bs_lemma_1 bs used H node H1). assumption. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite H0. reflexivity. Qed. Lemma new_bs_zero : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> in_dom _ BDDzero (new_bs bs used) = false. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. apply not_true_is_false. unfold not in |- *; intro. (* Goal: False *) cut (MapGet _ bs BDDzero = MapGet _ (new_bs bs used) BDDzero). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) rewrite (proj1 H). intro. unfold in_dom in H0. rewrite <- H1 in H0. (* Goal: used_list_OK cfg ul *) discriminate. apply new_bs_lemma_1. assumption. apply new_bs_lemma_2. (* Goal: used_list_OK cfg ul *) assumption. assumption. Qed. Lemma new_bs_one : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> in_dom _ BDDone (new_bs bs used) = false. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. apply not_true_is_false. unfold not in |- *; intro. (* Goal: False *) cut (MapGet _ bs BDDone = MapGet _ (new_bs bs used) BDDone). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) rewrite (proj1 (proj2 H)). intro. unfold in_dom in H0. (* Goal: used_list_OK cfg ul *) rewrite <- H1 in H0. discriminate. apply new_bs_lemma_1. assumption. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. assumption. Qed. Lemma new_bs_BDDhigh : forall (bs : BDDstate) (used : list ad) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ (new_bs bs used) node = Some (x, (l, r)) -> in_dom _ r (new_bs bs used) = in_dom _ r bs. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. cut (MapGet _ (new_bs bs used) r = MapGet _ bs r). intro. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold in_dom in |- *. rewrite H1. reflexivity. symmetry in |- *. apply new_bs_lemma_1. (* Goal: used_list_OK cfg ul *) assumption. unfold used_node_bs in |- *. cut (used_node_bs bs used node). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H1. intros. split with x0. split. exact (proj1 H2). (* Goal: nodes_reachable bs x0 node' *) apply nodes_reachable_trans with (node2 := node). exact (proj2 H2). (* Goal: nodes_reachable bs node r *) (* Goal: used_node_bs bs used node *) apply nodes_reachable_2 with (x := x) (l := l) (r := r). rewrite <- H0. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_1. assumption. assumption. apply nodes_reachable_0. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite H0. reflexivity. Qed. Lemma new_bs_BDDlow : forall (bs : BDDstate) (used : list ad) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ (new_bs bs used) node = Some (x, (l, r)) -> in_dom _ l (new_bs bs used) = in_dom _ l bs. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. cut (MapGet _ (new_bs bs used) l = MapGet _ bs l). intro. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold in_dom in |- *. rewrite H1. reflexivity. symmetry in |- *. apply new_bs_lemma_1. (* Goal: used_list_OK cfg ul *) assumption. unfold used_node_bs in |- *. cut (used_node_bs bs used node). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H1. intros. split with x0. split. exact (proj1 H2). (* Goal: nodes_reachable bs x0 node' *) apply nodes_reachable_trans with (node2 := node). exact (proj2 H2). (* Goal: nodes_reachable bs node l *) (* Goal: used_node_bs bs used node *) apply nodes_reachable_1 with (x := x) (l := l) (r := r). rewrite <- H0. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_1. assumption. assumption. apply nodes_reachable_0. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite H0. reflexivity. Qed. Lemma new_bs_used_nodes_preserved : forall (bs : BDDstate) (used : list ad) (node : ad), BDDstate_OK bs -> used_node_bs bs used node -> node_preserved_bs bs (new_bs bs used) node. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold node_preserved_bs in |- *. intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite <- (new_bs_lemma_1 _ used H node'). assumption. elim H0. intros. (* Goal: and (used_nodes_preserved cfg cfg ul) (no_new_node cfg cfg) *) split with x0. split. exact (proj1 H3). (* Goal: nodes_reachable bs x0 node *) (* Goal: nodes_reachable bs node node' *) apply nodes_reachable_trans with (node2 := node). exact (proj2 H3). (* Goal: used_list_OK cfg ul *) assumption. Qed. Lemma new_bsBDDbounded_1 : forall (n : nat) (bs : BDDstate) (used : list ad) (node : ad) (x : BDDvar), BDDstate_OK bs -> n = nat_of_N x -> in_dom _ node (new_bs bs used) = true -> BDDbounded bs node x -> BDDbounded (new_bs bs used) node x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. apply lt_wf_ind with (P := fun n : nat => forall (bs : BDDstate) (used : list ad) (node : ad) (x : BDDvar), BDDstate_OK bs -> n = nat_of_N x -> in_dom (BDDvar * (ad * ad)) node (new_bs bs used) = true -> BDDbounded bs node x -> BDDbounded (new_bs bs used) node x). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) clear n. intro. intro H00. intros. elim (BDDbounded_lemma bs node x H2). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. rewrite H3. apply BDDbounded_0. intro. elim H3; clear H3; intro. (* Goal: BDDbounded (new_bs bs used) node x *) rewrite H3. apply BDDbounded_1. elim H3; clear H3. intros x0 H3. (* Goal: BDDbounded (new_bs bs used) node x *) elim H3; clear H3. intros l H3. elim H3; clear H3. intros r H3. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H3; clear H3; intros. elim H4; clear H4; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H5; clear H5; intros. elim H6; clear H6; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) cut (MapGet _ (new_bs bs used) node = Some (x0, (l, r))). intro. (* Goal: BDDbounded (new_bs bs used) node x *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) cut (BDDbounded (new_bs bs used) l x0). cut (BDDbounded (new_bs bs used) r x0). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. apply BDDbounded_2 with (x := x0) (l := l) (r := r). assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. cut (node_OK bs r). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold node_OK in H9. elim H9; intro. rewrite H10. apply BDDbounded_0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim H10; intro. rewrite H11. apply BDDbounded_1. (* Goal: lt (N.to_nat x0) (N.to_nat x) *) (* Goal: BDDstate_OK bs *) (* Goal: @eq nat (N.to_nat x0) (N.to_nat x0) *) (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) l (new_bs bs used)) true *) (* Goal: BDDbounded bs l x0 *) (* Goal: node_OK bs l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) apply H00 with (m := nat_of_N x0). rewrite H0. apply BDDcompare_lt. (* Goal: used_list_OK cfg ul *) assumption. assumption. reflexivity. rewrite <- H11. (* Goal: used_list_OK cfg ul *) apply new_bs_BDDhigh with (x := x0) (l := l) (node := node). assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply BDDbounded_node_OK with (n := x0). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) cut (node_OK bs l). intro. unfold node_OK in H9. elim H9; intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) rewrite H10. apply BDDbounded_0. elim H10; intro. rewrite H11. (* Goal: @eq (option ad) (MapGet ad (if used_node_bs_1 m' a' then M1 ad a a' else M0 ad) a1) (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) apply BDDbounded_1. apply H00 with (m := nat_of_N x0). rewrite H0. (* Goal: used_list_OK cfg ul *) apply BDDcompare_lt. assumption. assumption. reflexivity. rewrite <- H11. (* Goal: used_list_OK cfg ul *) apply new_bs_BDDlow with (x := x0) (r := r) (node := node). assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply BDDbounded_node_OK with (n := x0). assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (new_bs bs used) node)). intro y. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim y; clear y; intro x1. elim x1; clear x1. intro y. intro y0. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@None (prod BDDvar (prod ad ad))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x0 (@pair BDDvar BDDvar l r))) *) elim y0; intros y1 y2 y3. rewrite <- H3. symmetry in |- *. apply new_bs_lemma_1. (* Goal: used_list_OK cfg ul *) assumption. apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite y3. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) unfold in_dom in |- *. reflexivity. intro y. unfold in_dom in H1. rewrite y in H1. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) discriminate. Qed. Lemma new_bs_OK : forall (bs : BDDstate) (used : list ad), BDDstate_OK bs -> BDDstate_OK (new_bs bs used). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold BDDstate_OK in |- *. unfold BDDstate_OK in H. split. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) lapply (new_bs_zero bs used). unfold in_dom in |- *. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (MapGet (BDDvar * (ad * ad)) (new_bs bs used) BDDzero). Focus 2. reflexivity. intros. (* Goal: used_list_OK cfg ul *) discriminate. assumption. split. lapply (new_bs_one bs used). (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold in_dom in |- *. elim (MapGet (BDDvar * (ad * ad)) (new_bs bs used) BDDone). Focus 2. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) reflexivity. intros. discriminate. assumption. intros a H0. unfold BDD_OK in |- *. cut (BDD_OK bs a). unfold BDD_OK in |- *. cut (MapGet (BDDvar * (ad * ad)) (new_bs bs used) a = MapGet (BDDvar * (ad * ad)) bs a). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. rewrite H1. elim (MapGet (BDDvar * (ad * ad)) bs a). Focus 2. tauto. intro a0. elim a0. intros y y0 H2. apply new_bsBDDbounded_1 with (n := nat_of_N (ad_S y)). (* Goal: used_list_OK cfg ul *) assumption. reflexivity. assumption. assumption. symmetry in |- *. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_1. assumption. apply new_bs_lemma_2. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply (proj2 (proj2 H)). (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) cut (MapGet _ bs a = MapGet _ (new_bs bs used) a). intro. unfold in_dom in |- *. (* Goal: used_list_OK cfg ul *) rewrite H1. assumption. apply new_bs_lemma_1. assumption. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. assumption. Qed. Lemma new_cnt_OK : forall (bs : BDDstate) (used : list ad) (cnt : ad), BDDstate_OK bs -> cnt_OK bs cnt -> cnt_OK (new_bs bs used) cnt. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold cnt_OK in |- *. unfold cnt_OK in H0. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H0; clear H0; intros. split. assumption. intros. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (new_bs bs used) a)). intro y. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim y; clear y; intros x y. cut (used_node_bs bs used a). intro. (* Goal: used_list_OK cfg ul *) rewrite <- (new_bs_lemma_1 bs used H a H3). apply H1. assumption. (* Goal: used_list_OK cfg ul *) apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite y. reflexivity. (* Goal: forall (x : BDDvar) (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) tauto. Qed. Lemma new_fl_OK : forall (bs : BDDstate) (used : list ad) (fl : BDDfree_list) (cnt : ad), BDDstate_OK bs -> BDDfree_list_OK bs fl cnt -> cnt_OK bs cnt -> BDDfree_list_OK (new_bs bs used) (new_fl bs used fl) cnt. Proof. (* Goal: forall (bs : BDDstate) (used : list ad) (fl : BDDfree_list) (cnt : ad) (_ : BDDstate_OK bs) (_ : BDDfree_list_OK bs fl cnt) (_ : cnt_OK bs cnt), BDDfree_list_OK (new_bs bs used) (new_fl bs used fl) cnt *) unfold BDDfree_list_OK in |- *. intros bs used fl cnt H H0 H00. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H0; clear H0; intros. split. unfold new_fl in |- *. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) apply MapDomRestrByApp1_lemma_4 with (fp := fun a0 : ad => a0). reflexivity. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold not in |- *. intro. unfold in_dom in H2. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite (proj2 (proj2 (proj1 (H1 a) H4))) in H2. discriminate. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. split. intros. unfold new_fl in H2. unfold BDDfree_list in fl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold BDDstate in bs. cut (forall a : ad, (fun a0 : ad => a0) ((fun a0 : ad => a0) a) = a). intro. elim (MapDomRestrByApp1_lemma_3 (BDDvar * (ad * ad)) unit bs (mark bs used) fl (fun a : ad => a) (fun a : ad => a) H3 node H2). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro. elim (proj1 (H1 node) H4). intros. elim H6; clear H6; intros. (* Goal: used_list_OK cfg ul *) split. assumption. split. assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (new_bs bs used) node)). intro y. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim y; clear y; intro x. elim x. intro y. intro y0. elim y0. intros y1 y2 y3. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite (no_new_node_new_bs bs used H y y1 y2 node) in H7. discriminate. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. tauto. intro. elim H4; clear H4; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H5; clear H5; intros. clear H6. unfold cnt_OK in H00. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) apply ad_gt_1_lemma. unfold not in |- *; intro. unfold BDDstate_OK in H. (* Goal: False *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@None (prod BDDvar (prod ad ad))) *) (* Goal: forall a : ad, @eq ad ((fun a0 : ad => a0) ((fun a0 : ad => a0) a)) a *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) cnt) true) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@None (prod BDDvar (prod ad ad))))), @In ad node (new_fl bs used fl) *) unfold BDDzero in H. rewrite <- H6 in H. unfold in_dom in H4. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) rewrite (proj1 H) in H4. discriminate. unfold not in |- *; intro. (* Goal: False *) (* Goal: and (@eq bool (Nleb (ad_S node) cnt) true) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@None (prod BDDvar (prod ad ad)))) *) (* Goal: forall a : ad, @eq ad ((fun a0 : ad => a0) ((fun a0 : ad => a0) a)) a *) (* Goal: forall _ : and (@eq bool (Nleb (Npos (xO xH)) node) true) (and (@eq bool (Nleb (ad_S node) cnt) true) (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (new_bs bs used) node) (@None (prod BDDvar (prod ad ad))))), @In ad node (new_fl bs used fl) *) unfold BDDstate_OK in H. unfold BDDone in H. rewrite <- H6 in H. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) unfold in_dom in H4. rewrite (proj1 (proj2 H)) in H4. discriminate. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) split. apply Nltb_lebmma. apply not_true_is_false. unfold not in |- *; intro. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) unfold in_dom in H4. rewrite (proj2 H00 _ H6) in H4. discriminate. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (new_bs bs used) node)). intro y. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim y; clear y; intros x y. cut (used_node_bs bs used node). intro. elim H6. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. cut (in_dom unit node (mark bs used) = true). intro. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite H8 in H5. discriminate. apply (proj2 (mark_lemma_2 bs used H node)). (* Goal: and (used_nodes_preserved cfg cfg ul) (no_new_node cfg cfg) *) split with x0. split. exact (proj1 H7). split. exact (proj2 H7). (* Goal: used_list_OK cfg ul *) assumption. apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite y. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) reflexivity. tauto. reflexivity. intro. (* Decompose Record H2. *) (* Goal: @In ad node (new_fl bs used fl) *) elim H2; intros H3 H4; elim H4; intros H5 H6; clear H4. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y. elim y; clear y. (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x)), @In ad node (new_fl bs used fl) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @In ad node (new_fl bs used fl) *) intro x. elim x; clear x. intros x y. elim y; clear y; intros l r H7. (* Goal: @In ad node (new_fl bs used fl) *) unfold new_fl in |- *. apply MapDomRestrByApp1_lemma_2 with (pf := fun a0 : ad => a0). (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold in_dom in |- *. rewrite H7. reflexivity. apply not_true_is_false. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold not in |- *. intro. cut (used_node_bs bs used node). intro. (* Goal: False *) (* Goal: used_node_bs bs used node *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @In ad node (new_fl bs used fl) *) rewrite (new_bs_lemma_1 bs used H node H8) in H7. rewrite H6 in H7. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) discriminate. exact (proj1 (proj1 (mark_lemma_3 bs used H node) H4)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. unfold new_fl in |- *. apply MapDomRestrByApp1_lemma_1. (* Goal: used_list_OK cfg ul *) apply (proj2 (H1 node)). split. assumption. split. assumption. (* Goal: used_list_OK cfg ul *) assumption. Qed. Lemma used_node_bs_1_preserved : forall (bs : BDDstate) (used : list ad) (node : ad), BDDstate_OK bs -> used_node_bs_1 (mark bs used) node = true -> node_preserved_bs bs (new_bs bs used) node. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold used_node_bs_1 in H0. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (option_sum _ (MapGet unit (mark bs used) node)). intro y. inversion y. (* Goal: used_list_OK cfg ul *) apply new_bs_used_nodes_preserved. assumption. (* Goal: used_node_bs bs used node *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) refine (proj1 (proj1 (mark_lemma_3 bs used H node) _)). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) unfold in_dom in |- *. rewrite H1. reflexivity. intro y. rewrite y in H0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim (orb_prop _ _ H0). intro. rewrite (Neqb_complete _ _ H1). (* Goal: used_list_OK cfg ul *) apply BDDzero_preserved. assumption. intro. (* Goal: used_list_OK cfg ul *) rewrite (Neqb_complete _ _ H1). apply BDDone_preserved. assumption. Qed. Lemma clean'1_1_lemma : forall (m : Map ad) (m' : Map unit) (pf : ad -> ad) (a a' : ad), MapGet _ (clean'1_1 pf m' m) a = Some a' <-> used_node_bs_1 m' (pf a) && used_node_bs_1 m' a' = true /\ MapGet _ m a = Some a'. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) simple induction m. simpl in |- *. intros. split. intro. discriminate. tauto. intros. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. split. intro. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (used_node_bs_1 m' a')) true) (@eq (option ad) (if N.eqb a a1 then @Some ad a0 else @None ad) (@Some ad a')) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (used_node_bs_1 m' a')) true) (@eq (option ad) (if N.eqb a a1 then @Some ad a0 else @None ad) (@Some ad a')), @eq (option ad) (MapGet ad (if andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' a0) then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall (m' : Map unit) (pf : forall _ : ad, ad) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean'1_1 pf m' m) a) (@Some ad a')) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' a')) true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall (m' : Map unit) (pf : forall _ : ad, ad) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean'1_1 pf m' m0) a) (@Some ad a')) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' a')) true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (m' : Map unit) (pf : forall _ : ad, ad) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean'1_1 pf m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' a')) true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) elim (sumbool_of_bool (used_node_bs_1 m' (pf a) && used_node_bs_1 m' a0)). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y. rewrite y in H. simpl in H. elim (sumbool_of_bool (Neqb a a1)). (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y0. rewrite y0 in H. injection H. intro. split. rewrite H0 in y. (* Goal: used_list_OK cfg ul *) rewrite (Neqb_complete _ _ y0) in y. assumption. rewrite y0. assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y0. rewrite y0 in H. discriminate. intro y. rewrite y in H. simpl in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) discriminate. intro. elim H; clear H; intros. elim (sumbool_of_bool (Neqb a a1)). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y. rewrite y in H0. injection H0. intro. rewrite H1. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite (Neqb_complete _ _ y). rewrite H. simpl in |- *. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) rewrite (Neqb_correct a1). reflexivity. intro y. rewrite y in H0. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) discriminate. intros. split. intro. simpl in H1. rewrite (makeM2_M2 _ (clean'1_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'1_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. rewrite (MapGet_M2_bit_0_if _ (clean'1_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'1_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y in H1. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a). rewrite y. lapply (proj1 (H0 m' (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) a')). (* Goal: used_list_OK cfg ul *) intro. rewrite (Ndiv2_double_plus_one a) in H2. assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. intro y. rewrite y in H1. rewrite (MapGet_M2_bit_0_if _ m0 m1 a). (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite y. lapply (proj1 (H m' (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) a')). (* Goal: used_list_OK cfg ul *) intro. rewrite (Ndiv2_double a) in H2. assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. intro. simpl in |- *. rewrite (makeM2_M2 _ (clean'1_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'1_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . rewrite (MapGet_M2_bit_0_if _ (clean'1_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'1_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. rewrite y in H1. apply (proj2 (H0 m' (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) a')). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double_plus_one _ y). assumption. intro y. rewrite y. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. rewrite y in H1. (* Goal: @eq (option ad) (MapGet ad (clean'1_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) (@Some ad a') *) apply (proj2 (H m' (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) a')). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double _ y). assumption. Qed. Lemma clean'1_lemma : forall (m : Map ad) (m' : Map unit) (a a' : ad), MapGet _ (clean'1 m m') a = Some a' <-> used_node_bs_1 m' a && used_node_bs_1 m' a' = true /\ MapGet _ m a = Some a'. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold clean'1 in |- *. apply clean'1_1_lemma with (pf := fun a : ad => a). Qed. Lemma clean'2_1_lemma : forall (m : Map (Map ad)) (m' : Map unit) (pf : ad -> ad) (a b c : ad), MapGet2 _ (clean'2_1 pf m' m) a b = Some c <-> used_node_bs_1 m' (pf a) && (used_node_bs_1 m' b && used_node_bs_1 m' c) = true /\ MapGet2 _ m a b = Some c. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) simple induction m. simpl in |- *. intros. split. intro. unfold MapGet2 in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) simpl in H. discriminate. tauto. intros. unfold MapGet2 in |- *. simpl in |- *. split. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro. elim (sumbool_of_bool (used_node_bs_1 m' (pf a))). intro y. (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) rewrite y in H. simpl in H. elim (sumbool_of_bool (Neqb a a1)). intro y0. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (used_node_bs_1 m' (pf a)) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M1 (Map (Map ad)) a a0) a1 b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 b c) (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) rewrite y0 in H. rewrite y0. rewrite <- (Neqb_complete _ _ y0). (* Goal: used_list_OK cfg ul *) rewrite y. simpl in |- *. apply (proj1 (clean'1_lemma a0 m' b c)). assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y0. rewrite y0 in H. discriminate. intro y. rewrite y in H. simpl in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) discriminate. intro. elim H; clear H; intros. elim (andb_prop _ _ H). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) clear H; intros. elim (sumbool_of_bool (Neqb a a1)). intro y. (* Goal: @eq (option ad) match MapGet (Map ad) (if used_node_bs_1 m' (pf a) then M1 (Map ad) a (clean'1 a0 m') else M0 (Map ad)) a1 with | Some m' => MapGet ad m' b | None => @None ad end (@Some ad c) *) (* Goal: forall (m : Map (Map ad)) (_ : forall (m' : Map unit) (pf : forall _ : ad, ad) (a b c : ad), iff (@eq (option ad) (MapGet2 ad (clean'2_1 pf m' m) a b) (@Some ad c)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' c))) true) (@eq (option ad) (MapGet2 ad m a b) (@Some ad c)))) (m0 : Map (Map ad)) (_ : forall (m' : Map unit) (pf : forall _ : ad, ad) (a b c : ad), iff (@eq (option ad) (MapGet2 ad (clean'2_1 pf m' m0) a b) (@Some ad c)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' c))) true) (@eq (option ad) (MapGet2 ad m0 a b) (@Some ad c)))) (m' : Map unit) (pf : forall _ : ad, ad) (a b c : ad), iff (@eq (option ad) (MapGet2 ad (clean'2_1 pf m' (M2 (Map ad) m m0)) a b) (@Some ad c)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' c))) true) (@eq (option ad) (MapGet2 ad (M2 (Map ad) m m0) a b) (@Some ad c))) *) rewrite y in H0. rewrite <- (Neqb_complete _ _ y) in H. rewrite H. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. rewrite y. apply (proj2 (clean'1_lemma a0 m' b c)). split. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. assumption. intro y. rewrite y in H0. discriminate. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) split. intro. unfold MapGet2 in H1. simpl in H1. rewrite (makeM2_M2 _ (clean'2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. rewrite (MapGet_M2_bit_0_if _ (clean'2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match MapGet (Map (Map ad)) (M2 (Map (Map ad)) m0 m1) a with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m0 m1) a b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m0 m1)) a b c) (@Some ad d) *) unfold MapGet2 in |- *. rewrite (MapGet_M2_bit_0_if _ m0 m1 a). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. lapply (proj1 (H0 m' (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c)). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro. elim H2; intros. unfold MapGet2 in H4. split. (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double_plus_one a y) in H3. assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. intro y. rewrite y in H1. rewrite y. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) lapply (proj1 (H m' (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c)). intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite (Ndiv2_double a y) in H2. assumption. assumption. intros. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. unfold MapGet2 in |- *. rewrite (makeM2_M2 _ (clean'2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . rewrite (MapGet_M2_bit_0_if _ (clean'2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean'2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) unfold MapGet2 in H1. rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. lapply (proj2 (H0 m' (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) intro. assumption. rewrite (Ndiv2_double_plus_one _ y). assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y. rewrite y in H1. rewrite y. (* Goal: @eq (option ad) match MapGet (Map ad) (clean'2_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a) with | Some m' => MapGet ad m' b | None => @None ad end (@Some ad c) *) apply (proj2 (H m' (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double _ y). assumption. Qed. Lemma clean'2_lemma : forall (m : Map (Map ad)) (m' : Map unit) (a b c : ad), MapGet2 _ (clean'2 m m') a b = Some c <-> used_node_bs_1 m' a && (used_node_bs_1 m' b && used_node_bs_1 m' c) = true /\ MapGet2 _ m a b = Some c. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold clean'2 in |- *. intros. apply clean'2_1_lemma with (pf := fun a : ad => a). Qed. Lemma clean1_lemma : forall (m' : Map unit) (m : Map ad) (a a' : ad), MapGet _ (clean1 m' m) a = Some a' <-> used_node_bs_1 m' a' = true /\ MapGet _ m a = Some a'. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) simple induction m. simpl in |- *. split. intro. discriminate. intro. elim H. intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) discriminate. simpl in |- *. split. intros. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (used_node_bs_1 m' a0)). intro y. rewrite y in H. (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) simpl in H. elim (sumbool_of_bool (Neqb a a1)). intro y0. rewrite y0 in H. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : @eq bool (used_node_bs_1 m' (pf a)) false, and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match (if N.eqb a a1 then @Some (Map (Map ad)) a0 else @None (Map (Map ad))) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a1)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M1 (Map (Map ad)) a a0) a1 b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (if used_node_bs_1 m' (pf a) then M1 (Map (Map ad)) a (clean2 a0 m') else M0 (Map (Map ad))) a1 b c) (@Some ad d) *) (* Goal: forall (m : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m a b c) (@Some ad d)))) (m0 : Map (Map (Map ad))) (_ : forall (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' m0) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad m0 a b c) (@Some ad d)))) (pf : forall _ : ad, ad) (a b c d : ad), iff (@eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m m0)) a b c) (@Some ad d)) (and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m m0) a b c) (@Some ad d))) *) injection H. intro. rewrite y0. rewrite H0. rewrite H0 in y. split. (* Goal: used_list_OK cfg ul *) assumption. reflexivity. intro y0. rewrite y0 in H. discriminate. intro y. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite y in H. simpl in H. discriminate. intro. elim H; intros. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H1. injection H1. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) intro. rewrite H2. rewrite H0. simpl in |- *. rewrite y. reflexivity. intro y. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite y in H1. discriminate. intros. split. intro. simpl in H1. (* Goal: and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m0 m1) a) (@Some ad a')) *) (* Goal: forall _ : and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m0 m1) a) (@Some ad a')), @eq (option ad) (MapGet ad (clean1 m' (M2 ad m0 m1)) a) (@Some ad a') *) rewrite (makeM2_M2 _ (clean1 m' m0) (clean1 m' m1) a) in H1. (* Goal: and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m0 m1) a) (@Some ad a')) *) (* Goal: forall _ : and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m0 m1) a) (@Some ad a')), @eq (option ad) (MapGet ad (clean1 m' (M2 ad m0 m1)) a) (@Some ad a') *) rewrite (MapGet_M2_bit_0_if _ (clean1 m' m0) (clean1 m' m1) a) in H1. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a). elim (sumbool_of_bool (Nbit0 a)). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y. rewrite y. apply (proj1 (H0 (Ndiv2 a) a')). rewrite y in H1. (* Goal: used_list_OK cfg ul *) assumption. intro y. rewrite y. rewrite y in H1. (* Goal: used_list_OK cfg ul *) apply (proj1 (H (Ndiv2 a) a')). assumption. intro. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. simpl in |- *. (* Goal: @eq (option ad) (MapGet ad (makeM2 ad (clean1 m' m0) (clean1 m' m1)) a) (@Some ad a') *) rewrite (makeM2_M2 _ (clean1 m' m0) (clean1 m' m1) a). (* Goal: @eq (option ad) (MapGet ad (M2 ad (clean1 m' m0) (clean1 m' m1)) a) (@Some ad a') *) rewrite (MapGet_M2_bit_0_if _ (clean1 m' m0) (clean1 m' m1) a). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. (* Goal: used_list_OK cfg ul *) apply (proj2 (H0 (Ndiv2 a) a')). assumption. intro y. rewrite y in H1. (* Goal: used_list_OK cfg ul *) rewrite y. apply (proj2 (H (Ndiv2 a) a')). assumption. Qed. Lemma clean2_1_lemma : forall (m' : Map unit) (m : Map (Map ad)) (pf : ad -> ad) (a b c : ad), MapGet2 _ (clean2_1 pf m' m) a b = Some c <-> used_node_bs_1 m' (pf a) && used_node_bs_1 m' c = true /\ MapGet2 _ m a b = Some c. Proof. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simple induction m. unfold MapGet2 in |- *. simpl in |- *. split. intro. discriminate. tauto. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. split. intro. unfold MapGet2 in |- *. simpl in |- *. unfold MapGet2 in H. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (used_node_bs_1 m' (pf a))). intro y. rewrite y in H. (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) simpl in H. elim (sumbool_of_bool (Neqb a a1)). intro y0. rewrite y0 in H. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite y0. rewrite <- (Neqb_complete _ _ y0). rewrite y. simpl in |- *. (* Goal: used_list_OK cfg ul *) apply (proj1 (clean1_lemma m' a0 b c)). assumption. intro y0. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) rewrite y0 in H. discriminate. intro y. rewrite y in H. simpl in H. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) discriminate. intro. unfold MapGet2 in |- *. unfold MapGet2 in H. simpl in H. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H; intros. rewrite <- (Neqb_complete _ _ y). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite <- (Neqb_complete _ _ y) in H0. elim (andb_prop _ _ H0). intros. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite H2. simpl in |- *. rewrite (Neqb_correct a). (* Goal: used_list_OK cfg ul *) apply (proj2 (clean1_lemma m' a0 b c)). split. assumption. assumption. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro y. rewrite y in H. elim H; intros. discriminate. intros. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. simpl in H1. unfold MapGet2 in H1. rewrite (makeM2_M2 (Map ad) (clean2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. rewrite (MapGet_M2_bit_0_if _ (clean2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match MapGet (Map (Map ad)) (M2 (Map (Map ad)) m0 m1) a with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m0 m1) a b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m0 m1)) a b c) (@Some ad d) *) unfold MapGet2 in |- *. rewrite (MapGet_M2_bit_0_if _ m0 m1 a). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. lapply (proj1 (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) intro. rewrite (Ndiv2_double_plus_one a y) in H2. assumption. (* Goal: used_list_OK cfg ul *) assumption. intro y. rewrite y. rewrite y in H1. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' c)) true) (@eq (option ad) match MapGet (Map ad) m0 (N.div2 a) with | Some m' => MapGet ad m' b | None => @None ad end (@Some ad c)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a)) (used_node_bs_1 m' c)) true) (@eq (option ad) (MapGet2 ad (M2 (Map ad) m0 m1) a b) (@Some ad c)), @eq (option ad) (MapGet2 ad (clean2_1 pf m' (M2 (Map ad) m0 m1)) a b) (@Some ad c) *) lapply (proj1 (H (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double a y). tauto. assumption. intro. simpl in |- *. (* Goal: @eq (option ad) (MapGet2 ad (makeM2 (Map ad) (clean2_1 (fun a0 : ad => pf (N.double a0)) m' m0) (clean2_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1)) a b) (@Some ad c) *) unfold MapGet2 in |- *. unfold MapGet2 in H1. rewrite (makeM2_M2 _ (clean2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . rewrite (MapGet_M2_bit_0_if _ (clean2_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean2_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. apply (proj2 (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double_plus_one _ y). assumption. intro y. rewrite y in H1. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite y. apply (proj2 (H (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double _ y). assumption. Qed. Lemma clean2_lemma : forall (m : Map (Map ad)) (m' : Map unit) (a b c : ad), MapGet2 _ (clean2 m m') a b = Some c <-> used_node_bs_1 m' a && used_node_bs_1 m' c = true /\ MapGet2 _ m a b = Some c. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold clean2 in |- *. apply clean2_1_lemma with (pf := fun a : ad => a). Qed. Lemma clean3_1_lemma : forall (m' : Map unit) (m : Map (Map (Map ad))) (pf : ad -> ad) (a b c d : ad), MapGet3 _ (clean3_1 pf m' m) a b c = Some d <-> used_node_bs_1 m' (pf a) && (used_node_bs_1 m' b && used_node_bs_1 m' d) = true /\ MapGet3 _ m a b c = Some d. Proof. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simple induction m. unfold MapGet3 in |- *. simpl in |- *. split. intro. discriminate. tauto. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. split. intro. unfold MapGet3 in |- *. simpl in |- *. unfold MapGet3 in H. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (used_node_bs_1 m' (pf a))). intro y. rewrite y in H. (* Goal: forall (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) simpl in H. elim (sumbool_of_bool (Neqb a a1)). intro y0. rewrite y0 in H. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite y0. rewrite <- (Neqb_complete _ _ y0). rewrite y. simpl in |- *. (* Goal: used_list_OK cfg ul *) apply (proj1 (clean2_lemma a0 m' b c d)). assumption. intro y0. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) rewrite y0 in H. discriminate. intro y. rewrite y in H. simpl in H. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) discriminate. intro. unfold MapGet3 in |- *. unfold MapGet3 in H. simpl in H. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H; intros. rewrite <- (Neqb_complete _ _ y). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) rewrite <- (Neqb_complete _ _ y) in H0. elim (andb_prop _ _ H0). intros. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) rewrite H2. simpl in |- *. rewrite (Neqb_correct a). (* Goal: used_list_OK cfg ul *) apply (proj2 (clean2_lemma a0 m' b c d)). split. assumption. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. intro y. rewrite y in H. elim H; intros. discriminate. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. split. intro. simpl in H1. unfold MapGet3 in H1. rewrite (makeM2_M2 _ (clean3_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean3_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. rewrite (MapGet_M2_bit_0_if _ (clean3_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean3_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) in H1. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match MapGet (Map (Map ad)) (M2 (Map (Map ad)) m0 m1) a with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m0 m1) a b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m0 m1)) a b c) (@Some ad d) *) unfold MapGet3 in |- *. rewrite (MapGet_M2_bit_0_if _ m0 m1 a). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. lapply (proj1 (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c d)). (* Goal: used_list_OK cfg ul *) intro. rewrite (Ndiv2_double_plus_one a y) in H2. assumption. assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) intro y. rewrite y. rewrite y in H1. (* Goal: and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) match MapGet (Map (Map ad)) m0 (N.div2 a) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d)) *) (* Goal: forall _ : and (@eq bool (andb (used_node_bs_1 m' (pf a)) (andb (used_node_bs_1 m' b) (used_node_bs_1 m' d))) true) (@eq (option ad) (MapGet3 ad (M2 (Map (Map ad)) m0 m1) a b c) (@Some ad d)), @eq (option ad) (MapGet3 ad (clean3_1 pf m' (M2 (Map (Map ad)) m0 m1)) a b c) (@Some ad d) *) lapply (proj1 (H (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c d)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double a y). tauto. assumption. intro. simpl in |- *. (* Goal: @eq (option ad) (MapGet3 ad (makeM2 (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1)) a b c) (@Some ad d) *) unfold MapGet3 in |- *. unfold MapGet3 in H1. rewrite (makeM2_M2 _ (clean3_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean3_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . rewrite (MapGet_M2_bit_0_if _ (clean3_1 (fun a0 : ad => pf (Ndouble a0)) m' m0) (clean3_1 (fun a0 : ad => pf (Ndouble_plus_one a0)) m' m1) a) . (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite (MapGet_M2_bit_0_if _ m0 m1 a) in H1. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (Nbit0 a)). intro y. rewrite y. rewrite y in H1. apply (proj2 (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a) b c d)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double_plus_one _ y). assumption. intro y. rewrite y in H1. (* Goal: @eq (option ad) match (if N.odd a then MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.succ_double a0)) m' m1) (N.div2 a) else MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a)) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) rewrite y. (* Goal: @eq (option ad) match MapGet (Map (Map ad)) (clean3_1 (fun a0 : ad => pf (N.double a0)) m' m0) (N.div2 a) with | Some m' => MapGet2 ad m' b c | None => @None ad end (@Some ad d) *) apply (proj2 (H (fun a0 : ad => pf (Ndouble a0)) (Ndiv2 a) b c d)). (* Goal: used_list_OK cfg ul *) rewrite (Ndiv2_double _ y). assumption. Qed. Lemma clean3_lemma : forall (m : Map (Map (Map ad))) (m' : Map unit) (a b c d : ad), MapGet3 _ (clean3 m m') a b c = Some d <-> used_node_bs_1 m' a && (used_node_bs_1 m' b && used_node_bs_1 m' d) = true /\ MapGet3 _ m a b c = Some d. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold clean3 in |- *. apply clean3_1_lemma with (pf := fun a : ad => a). Qed. Lemma new_negm_OK : forall (bs : BDDstate) (used : list ad) (negm : BDDneg_memo), BDDstate_OK bs -> BDDneg_memo_OK bs negm -> BDDneg_memo_OK (new_bs bs used) (clean'1 negm (mark bs used)). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold BDDneg_memo_OK in |- *. intros. elim (proj1 (clean'1_lemma _ _ _ _) H1). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. elim (H0 node node' H3). clear H0. intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (andb_prop _ _ H2). intros. (* Goal: and (node_OK (new_bs bs used) node) (and (node_OK (new_bs bs used) node') (and (@eq bool (Nleb (bs_node_height (new_bs bs used) node') (bs_node_height (new_bs bs used) node)) true) (bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node') (bool_fun_forall x (bool_fun_of_BDD_bs (new_bs bs used) node))))) *) (* Goal: @eq (option ad) (MapGet2 ad (clean2 univm (mark bs used)) node x) (@Some ad node') *) cut (node_preserved_bs bs (new_bs bs used) node). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) cut (node_preserved_bs bs (new_bs bs used) node'). intros. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. rewrite (Neqb_complete (bs_node_height (new_bs bs used) node) (bs_node_height bs node)). rewrite (Neqb_complete (bs_node_height (new_bs bs used) node') (bs_node_height bs node')). (* Goal: used_list_OK cfg ul *) assumption. apply node_preserved_bs_node_height_eq. assumption. apply new_bs_OK. (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. apply node_preserved_bs_node_height_eq. (* Goal: used_list_OK cfg ul *) assumption. apply new_bs_OK. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node') (bool_fun_forall x (bool_fun_of_BDD_bs (new_bs bs used) node)) *) (* Goal: node_preserved_bs bs (new_bs bs used) node' *) (* Goal: node_preserved_bs bs (new_bs bs used) node *) (* Goal: @eq (option ad) (MapGet2 ad (clean2 univm (mark bs used)) node x) (@Some ad node') *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node'). (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD_bs bs node)). (* Goal: used_list_OK cfg ul *) assumption. apply bool_fun_neg_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply used_node_bs_1_preserved. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply used_node_bs_1_preserved. assumption. assumption. Qed. Lemma new_orm_OK : forall (bs : BDDstate) (used : list ad) (orm : BDDor_memo), BDDstate_OK bs -> BDDor_memo_OK bs orm -> BDDor_memo_OK (new_bs bs used) (clean'2 orm (mark bs used)). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold BDDor_memo_OK in |- *. intros. elim (proj1 (clean'2_lemma _ _ _ _ _) H1). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. elim (H0 node1 node2 node H3). intros. elim H5; clear H5; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H6; clear H6; intros. elim H7; clear H7; intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (andb_prop _ _ H2). intros. (* Goal: and (node_OK (new_bs bs used) node) (and (node_OK (new_bs bs used) node') (and (@eq bool (Nleb (bs_node_height (new_bs bs used) node') (bs_node_height (new_bs bs used) node)) true) (bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node') (bool_fun_forall x (bool_fun_of_BDD_bs (new_bs bs used) node))))) *) (* Goal: @eq (option ad) (MapGet2 ad (clean2 univm (mark bs used)) node x) (@Some ad node') *) cut (node_preserved_bs bs (new_bs bs used) node). (* Goal: forall _ : node_preserved_bs bs (new_bs bs used) node, and (node_OK (new_bs bs used) node1) (and (node_OK (new_bs bs used) node2) (and (node_OK (new_bs bs used) node) (and (@eq bool (Nleb (bs_node_height (new_bs bs used) node) (BDDvar_max (bs_node_height (new_bs bs used) node1) (bs_node_height (new_bs bs used) node2))) true) (bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node) (bool_fun_or (bool_fun_of_BDD_bs (new_bs bs used) node1) (bool_fun_of_BDD_bs (new_bs bs used) node2)))))) *) (* Goal: node_preserved_bs bs (new_bs bs used) node *) cut (node_preserved_bs bs (new_bs bs used) node1). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) cut (node_preserved_bs bs (new_bs bs used) node2). intros. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. rewrite (Neqb_complete (bs_node_height (new_bs bs used) node) (bs_node_height bs node)). rewrite (Neqb_complete (bs_node_height (new_bs bs used) node1) (bs_node_height bs node1)). rewrite (Neqb_complete (bs_node_height (new_bs bs used) node2) (bs_node_height bs node2)). (* Goal: used_list_OK cfg ul *) assumption. apply node_preserved_bs_node_height_eq. assumption. apply new_bs_OK. (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. apply node_preserved_bs_node_height_eq. (* Goal: used_list_OK cfg ul *) assumption. apply new_bs_OK. assumption. assumption. assumption. (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_node_height_eq. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node) (bool_fun_or (bool_fun_of_BDD_bs (new_bs bs used) node1) (bool_fun_of_BDD_bs (new_bs bs used) node2)) *) (* Goal: node_preserved_bs bs (new_bs bs used) node2 *) (* Goal: node_preserved_bs bs (new_bs bs used) node1 *) (* Goal: node_preserved_bs bs (new_bs bs used) node *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node). (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)). (* Goal: used_list_OK cfg ul *) assumption. apply bool_fun_eq_sym. apply bool_fun_or_preserves_eq. (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply node_preserved_bs_bool_fun. assumption. (* Goal: used_list_OK cfg ul *) apply new_bs_OK. assumption. assumption. assumption. (* Goal: used_list_OK cfg ul *) apply used_node_bs_1_preserved. assumption. elim (andb_prop _ _ H10). tauto. (* Goal: used_list_OK cfg ul *) apply used_node_bs_1_preserved. assumption. assumption. (* Goal: used_list_OK cfg ul *) apply used_node_bs_1_preserved. assumption. elim (andb_prop _ _ H10). tauto. Qed. Lemma new_univm_OK : forall (bs : BDDstate) (used : list ad) (univm : BDDuniv_memo), BDDstate_OK bs -> BDDuniv_memo_OK bs univm -> BDDuniv_memo_OK (new_bs bs used) (clean2 univm (mark bs used)). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold BDDuniv_memo_OK in |- *. intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (clean2_lemma univm (mark bs used) node x node'). intros. elim H2. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. elim (andb_prop _ _ H4). intros. (* Goal: and (node_OK (new_bs bs used) node) (and (node_OK (new_bs bs used) node') (and (@eq bool (Nleb (bs_node_height (new_bs bs used) node') (bs_node_height (new_bs bs used) node)) true) (bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node') (bool_fun_forall x (bool_fun_of_BDD_bs (new_bs bs used) node))))) *) (* Goal: @eq (option ad) (MapGet2 ad (clean2 univm (mark bs used)) node x) (@Some ad node') *) cut (node_preserved_bs bs (new_bs bs used) node). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) cut (node_preserved_bs bs (new_bs bs used) node'). intros. (* Goal: and (used_nodes_preserved cfg cfg ul) (no_new_node cfg cfg) *) decompose [and] (H0 x node node' H5). split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. (* Goal: used_list_OK cfg ul *) apply node_preserved_OK_bs with (bs := bs). assumption. assumption. split. rewrite (Neqb_complete (bs_node_height (new_bs bs used) node) (bs_node_height bs node)). rewrite (Neqb_complete (bs_node_height (new_bs bs used) node') (bs_node_height bs node')). (* Goal: used_list_OK cfg ul *) assumption. apply node_preserved_bs_node_height_eq. assumption. apply new_bs_OK. (* Goal: used_list_OK cfg ul *) assumption. assumption. assumption. apply node_preserved_bs_node_height_eq. (* Goal: used_list_OK cfg ul *) assumption. apply new_bs_OK. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs (new_bs bs used) node') (bool_fun_forall x (bool_fun_of_BDD_bs (new_bs bs used) node)) *) (* Goal: node_preserved_bs bs (new_bs bs used) node' *) (* Goal: node_preserved_bs bs (new_bs bs used) node *) (* Goal: @eq (option ad) (MapGet2 ad (clean2 univm (mark bs used)) node x) (@Some ad node') *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node'). (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_forall x (bool_fun_of_BDD_bs bs node)). (* Goal: used_list_OK cfg ul *) assumption. apply bool_fun_forall_preserves_eq. apply bool_fun_eq_sym. (* Goal: used_list_OK cfg ul *) apply node_preserved_bs_bool_fun. assumption. apply new_bs_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. assumption. apply used_node_bs_1_preserved. assumption. tauto. (* Goal: used_list_OK cfg ul *) apply used_node_bs_1_preserved. assumption. assumption. assumption. Qed. Lemma new_share_OK : forall (bs : BDDstate) (used : list ad) (share : BDDsharing_map), BDDstate_OK bs -> BDDsharing_OK bs share -> BDDsharing_OK (new_bs bs used) (clean3 share (mark bs used)). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold BDDsharing_OK in |- *. intros. elim (H0 x l r a). intros. split. intro. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (proj1 (clean3_lemma share (mark bs used) l r x a) H3). intros. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (andb_prop _ _ H4). intros. elim (andb_prop _ _ H7). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) cut (node_preserved_bs bs (new_bs bs used) a). intro. (* Goal: @eq bool (in_dom unit node' (MapPut unit markedr node tt)) true *) (* Goal: forall _ : @eq bool (N.eqb node node0) false, @eq bool (in_dom unit node' (MapPut unit markedr node tt)) true *) (* Goal: forall (node' : ad) (_ : @eq bool (in_dom unit node' (MapPut unit markedr node tt)) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node')) *) (* Goal: forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' (MapPut unit markedr node tt)) true *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs r node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedr) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedr) true), or (@eq bool (in_dom unit node' markedl) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs r node'))) (set_closed bs markedr)) *) (* Goal: and (forall (node' : ad) (_ : and (nodes_reachable bs l node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' markedl) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' markedl) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs l node'))) (set_closed bs markedl)) *) (* Goal: @ex (Map unit) (fun markedr : Map unit => @eq (Map unit) markedr (add_used_nodes_1 bs r markedl n)) *) (* Goal: @ex (Map unit) (fun markedl : Map unit => @eq (Map unit) markedl (add_used_nodes_1 bs l marked n)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), and (forall (node' : ad) (_ : and (nodes_reachable bs node node') (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true)), @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true) (and (forall (node' : ad) (_ : @eq bool (in_dom unit node' match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end) true), or (@eq bool (in_dom unit node' marked) true) (and (@eq bool (in_dom (prod BDDvar (prod ad ad)) node' bs) true) (nodes_reachable bs node node'))) (set_closed bs match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => MapPut unit (add_used_nodes_1 bs r (add_used_nodes_1 bs l marked n) n) node tt | None => marked end)) *) unfold node_preserved_bs in H10. apply H10. apply nodes_reachable_0. (* Goal: used_list_OK cfg ul *) apply H1. assumption. apply used_node_bs_1_preserved. assumption. (* Goal: used_list_OK cfg ul *) assumption. intro. apply (proj2 (clean3_lemma share (mark bs used) l r x a)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) cut (MapGet _ bs a = Some (x, (l, r))). intro. cut (node_OK bs l). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) cut (node_OK bs r). intros. split. apply andb_true_intro. cut (forall a : ad, MapGet _ bs a = None -> MapGet _ (mark bs used) a = None). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. split. elim H6. intro. rewrite H8. unfold used_node_bs_1 in |- *. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) rewrite (H7 BDDzero). apply orb_true_intro. left. reflexivity. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) exact (proj1 H). intro. elim H8. intro. rewrite H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold used_node_bs_1 in |- *. rewrite (H7 BDDone). apply orb_true_intro. right. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) reflexivity. exact (proj1 (proj2 H)). intro. unfold used_node_bs_1 in |- *. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) lapply (proj2 (mark_lemma_3 bs used H l)). unfold in_dom in |- *. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) elim (MapGet unit (mark bs used) l). Focus 2. intro. discriminate. reflexivity. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) split. unfold used_node_bs in |- *. cut (used_node_bs bs used a). intro. elim H10. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. split with x0. split. exact (proj1 H11). apply nodes_reachable_trans with (node2 := a). exact (proj2 H11). (* Goal: used_list_OK cfg ul *) apply nodes_reachable_1 with (x := x) (l := l) (r := r). assumption. (* Goal: used_list_OK cfg ul *) apply nodes_reachable_0. apply new_bs_lemma_2. assumption. unfold in_dom in |- *. (* Goal: used_list_OK cfg ul *) rewrite H3. reflexivity. assumption. apply andb_true_intro. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim H5. intro. rewrite H8. unfold used_node_bs_1 in |- *. rewrite (H7 BDDzero). (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) apply orb_true_intro. left. reflexivity. exact (proj1 H). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) elim H8. intro. rewrite H9. unfold used_node_bs_1 in |- *. rewrite (H7 BDDone). (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) apply orb_true_intro. right. reflexivity. exact (proj1 (proj2 H)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) intro. unfold used_node_bs_1 in |- *. lapply (proj2 (mark_lemma_3 bs used H r)). (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) unfold in_dom in |- *. elim (MapGet unit (mark bs used) r). Focus 2. intro. discriminate. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) reflexivity. split. unfold used_node_bs in |- *. cut (used_node_bs bs used a). (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intro. elim H10. intros. split with x0. split. exact (proj1 H11). apply nodes_reachable_trans with (node2 := a). exact (proj2 H11). (* Goal: used_list_OK cfg ul *) apply nodes_reachable_2 with (x := x) (l := l) (r := r). assumption. (* Goal: used_list_OK cfg ul *) apply nodes_reachable_0. apply new_bs_lemma_2. assumption. unfold in_dom in |- *. (* Goal: used_list_OK cfg ul *) rewrite H3. reflexivity. assumption. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) cut (in_dom unit a (mark bs used) = true). unfold in_dom in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul))))))))) (and (used_nodes_preserved cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))) ul) (no_new_node cfg (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit bs (mark bs ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark bs ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl bs (mark bs ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark bs ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark bs ul)) (clean2 um (mark bs ul)))))))))) *) unfold used_node_bs_1 in |- *. elim (MapGet unit (mark bs used) a). Focus 2. intro. (* Goal: @eq (option ad) (@Some ad a') (@Some ad a') *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option ad) (MapGet ad (if used_node_bs_1 m' a0 then M1 ad a a0 else M0 ad) a1) (@Some ad a') *) (* Goal: forall (m : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m a) (@Some ad a')))) (m0 : Map ad) (_ : forall a a' : ad, iff (@eq (option ad) (MapGet ad (clean1 m' m0) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad m0 a) (@Some ad a')))) (a a' : ad), iff (@eq (option ad) (MapGet ad (clean1 m' (M2 ad m m0)) a) (@Some ad a')) (and (@eq bool (used_node_bs_1 m' a') true) (@eq (option ad) (MapGet ad (M2 ad m m0) a) (@Some ad a'))) *) discriminate. reflexivity. apply (proj2 (mark_lemma_3 bs used H a)). (* Goal: used_list_OK cfg ul *) split. apply new_bs_lemma_2. assumption. unfold in_dom in |- *. rewrite H3. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) reflexivity. unfold in_dom in |- *. rewrite H4. reflexivity. intros. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) elim (sumbool_of_bool (in_dom _ a0 (mark bs used))). intro y. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (proj1 (mark_lemma_3 bs used H a0) y). intros. unfold in_dom in H9. (* Goal: @eq bool (in_dom unit node (mark bs used)) true *) (* Goal: forall _ : @eq (option unit) (MapGet unit (mark bs used) node) (@None unit), node_preserved_bs bs (new_bs bs used) node *) rewrite H7 in H9. discriminate. unfold in_dom in |- *. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim (MapGet unit (mark bs used) a0). Focus 2. reflexivity. intros. discriminate. (* Goal: used_list_OK cfg ul *) apply H2. assumption. apply high_OK with (node := a) (x := x) (l := l). assumption. (* Goal: used_list_OK cfg ul *) assumption. apply low_OK with (node := a) (x := x) (r := r). assumption. assumption. (* Goal: used_list_OK cfg ul *) rewrite (new_bs_lemma_1 bs used H a). assumption. apply new_bs_lemma_2. (* Goal: used_list_OK cfg ul *) assumption. unfold in_dom in |- *. rewrite H3. reflexivity. Qed. Lemma new_cfg_OK : forall (bs : BDDstate) (share : BDDsharing_map) (fl : BDDfree_list) (cnt : ad) (negm : BDDneg_memo) (orm : BDDor_memo) (um : BDDuniv_memo) (used : list ad), BDDconfig_OK (bs, (share, (fl, (cnt, (negm, (orm, um)))))) -> BDDconfig_OK (new_bs bs used, (clean3 share (mark bs used), (new_fl bs used fl, (cnt, (clean'1 negm (mark bs used), (clean'2 orm (mark bs used), clean2 um (mark bs used))))))). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold BDDconfig_OK in |- *. simpl in |- *. unfold BDDconfig_OK in H. simpl in H. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) elim H; intros. elim H1; intros. elim H3; intros. elim H5; intros. (* Goal: used_list_OK cfg ul *) split. apply new_bs_OK. assumption. split. apply new_share_OK. (* Goal: used_list_OK cfg ul *) assumption. assumption. split. apply new_fl_OK. assumption. assumption. (* Goal: used_list_OK cfg ul *) assumption. split. apply new_cnt_OK. assumption. assumption. split. (* Goal: used_list_OK cfg ul *) apply new_negm_OK. assumption. exact (proj1 H7). split. (* Goal: used_list_OK cfg ul *) apply new_orm_OK. assumption. exact (proj1 (proj2 H7)). (* Goal: used_list_OK cfg ul *) apply new_univm_OK. assumption. exact (proj2 (proj2 H7)). Qed. Lemma gc_0_OK : gc_OK gc_0. Proof. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) ul), and (BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit a (mark a ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 share (mark a ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl a (mark a ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark a ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark a ul)) (clean2 um (mark a ul)))))))))) *) unfold gc_0 in |- *. unfold gc_OK in |- *. intro. elim cfg. intro y. intro y0. elim y0. (* Goal: forall (a : BDDsharing_map) (b : prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b))) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) ul), and (BDDconfig_OK (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b)) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 a (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) fl y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) cnt (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 negm (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y1. intro y2. elim y2. intro y3. intro y4. elim y4. intro y5. intro y6. elim y6. (* Goal: forall (a : BDDneg_memo) (b : prod BDDor_memo BDDuniv_memo) (ul : list ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) a b)))))) (_ : used_list_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) a b))))) ul), and (BDDconfig_OK (let (orm, um) := b in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 a (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul))))))))) (and (used_nodes_preserved (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) a b))))) (let (orm, um) := b in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 a (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))) ul) (no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) a b))))) (let (orm, um) := b in @pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 a (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 orm (mark y ul)) (clean2 um (mark y ul)))))))))) *) intro y7. intro y8. elim y8. (* Goal: and (used_nodes_preserved cfg cfg ul) (no_new_node cfg cfg) *) intros y9 y10 ul H H0. split. fold (new_bs y ul) in |- *. fold (new_fl y ul y3) in |- *. (* Goal: used_list_OK cfg ul *) apply new_cfg_OK with (um := y10). assumption. unfold used_nodes_preserved in |- *. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) simpl in |- *. split. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold used_nodes_preserved_bs in |- *. intros. fold (new_bs y ul) in |- *. (* Goal: used_node_bs y ul node *) (* Goal: no_new_node (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10)))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul)))))))) *) apply new_bs_used_nodes_preserved. exact (proj1 H). unfold used_node_bs in |- *. (* Goal: used_list_OK cfg ul *) split with node. split. assumption. apply nodes_reachable_0. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 (@pair BDDor_memo BDDuniv_memo y9 y10))))))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair (Map (prod BDDvar (prod ad ad))) (prod (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))))) (MapDomRestrTo (prod BDDvar (prod ad ad)) unit y (mark y ul)) (@pair (Map (Map (Map ad))) (prod (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))))) (clean3 y1 (mark y ul)) (@pair (list ad) (prod ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad))))) (MapDomRestrByApp1 (prod BDDvar (prod ad ad)) unit (fun a0 : ad => a0) y3 y (mark y ul)) (@pair ad (prod (Map ad) (prod (Map (Map ad)) (Map (Map ad)))) y5 (@pair (Map ad) (prod (Map (Map ad)) (Map (Map ad))) (clean'1 y7 (mark y ul)) (@pair (Map (Map ad)) (Map (Map ad)) (clean'2 y9 (mark y ul)) (clean2 y10 (mark y ul))))))))) *) unfold no_new_node in |- *. simpl in |- *. fold (new_bs y ul) in |- *. apply no_new_node_new_bs. (* Goal: BDDstate_OK y *) exact (proj1 H). Qed. Lemma gc_inf_OK : gc_OK gc_inf. Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) unfold gc_inf in |- *. unfold gc_OK in |- *. intros. split. assumption. split. (* Goal: no_new_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) *) apply used_nodes_preserved_refl. unfold no_new_node in |- *. unfold no_new_node_bs in |- *. (* Goal: forall (x : BDDvar) (l r node : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) tauto. Qed. Lemma gc_x_OK : forall x : ad, gc_OK (gc_x x). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold gc_x in |- *. unfold gc_OK in |- *. intros. elim (is_nil ad (fst (snd (snd cfg))) && Nleb x (fst (snd (snd (snd cfg))))). (* Goal: used_list_OK cfg ul *) apply gc_0_OK. assumption. assumption. apply gc_inf_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. Qed. Lemma gc_x_opt_OK : forall x : ad, gc_OK (gc_x_opt x). Proof. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) intros. unfold gc_x_opt in |- *. unfold gc_OK in |- *. intros. elim (fl_of_cfg cfg). (* Goal: used_list_OK cfg ul *) elim (BDDcompare x (cnt_of_cfg cfg)). apply gc_inf_OK. assumption. (* Goal: used_list_OK cfg ul *) assumption. apply gc_0_OK. assumption. assumption. apply gc_inf_OK. (* Goal: forall (_ : ad) (l : list ad) (_ : and (BDDconfig_OK (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)) (and (used_nodes_preserved cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul) ul) (no_new_node cfg (match l with | nil => match BDDcompare x (cnt_of_cfg cfg) with | Eq => gc_inf cfg | Lt => gc_0 cfg | Gt => gc_inf cfg end | cons a0 l0 => gc_inf cfg end ul)))), and (BDDconfig_OK (gc_inf cfg ul)) (and (used_nodes_preserved cfg (gc_inf cfg ul) ul) (no_new_node cfg (gc_inf cfg ul))) *) assumption. assumption. intros. apply gc_inf_OK. assumption. assumption. Qed. End BDDgc.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import EqNat. Require Import Peano_dec. Require Import Ensembles. Require Import Finite_sets. Require Import Finite_sets_facts. Require Import Image. Require Import List. Require Import Compare. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import neg. Require Import or. Require Import univ. Require Import op. Require Import tauto. Require Import quant. Require Import gc. Require Import mu. Section New. Variable N : nat. Definition var_env'_dash (ve : var_env') (n : nat) := if leb N n then ve (n - N) else false. Definition var_env''_dash (ve : var_env'') := var_env'_to_env'' N (2 * N) (var_env'_dash (var_env''_to_env' ve)). Fixpoint be_dash (be : bool_expr) : bool_expr := match be with | Zero => Zero | One => One | Var x => Var (N_of_nat (N + nat_of_N x)) | Neg be' => Neg (be_dash be') | Or be1 be2 => Or (be_dash be1) (be_dash be2) | ANd be1 be2 => ANd (be_dash be1) (be_dash be2) | Impl be1 be2 => Impl (be_dash be1) (be_dash be2) | Iff be1 be2 => Iff (be_dash be1) (be_dash be2) end. Fixpoint renamef (f : ad -> ad) (be : bool_expr) {struct be} : bool_expr := match be with | Zero => Zero | One => One | Var x => Var (f x) | Neg be' => Neg (renamef f be') | Or be1 be2 => Or (renamef f be1) (renamef f be2) | ANd be1 be2 => ANd (renamef f be1) (renamef f be2) | Impl be1 be2 => Impl (renamef f be1) (renamef f be2) | Iff be1 be2 => Iff (renamef f be1) (renamef f be2) end. Definition renfnat (n m : nat) := if leb n m then m else m + N. Definition renfnad (n : nat) (x : ad) := N_of_nat (renfnat n (nat_of_N x)). Lemma dash_renf : forall be : bool_expr, be_ok (var_lu 0 N) be -> be_dash be = renamef (renfnad N) be. Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. reflexivity. reflexivity. unfold renamef in |- *. simpl in |- *. (* Goal: forall (be : bool_expr) (_ : le O N), @eq bool_expr be (renamef (renfnad O) be) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : le n N), @eq bool_expr (replacel be (lx_1 n) (lx'_1 N n)) (renamef (renfnad n) be)) (be : bool_expr) (_ : le (S n) N), @eq bool_expr (replacel be (lx_1 (S n)) (lx'_1 N (S n))) (renamef (renfnad (S n)) be) *) unfold renfnad in |- *. unfold renfnat in |- *. intros. elim (var_ok_inv _ _ H). (* Goal: @eq bool_expr (Var (N.of_nat (Init.Nat.add N (N.to_nat b)))) (Var (N.of_nat (if Nat.leb N (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N))) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (_ : be_ok (var_lu O N) (Neg b)), @eq bool_expr (be_dash (Neg b)) (renamef (renfnad N) (Neg b)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Or b b0)), @eq bool_expr (be_dash (Or b b0)) (renamef (renfnad N) (Or b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (ANd b b0)), @eq bool_expr (be_dash (ANd b b0)) (renamef (renfnad N) (ANd b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Impl b b0)), @eq bool_expr (be_dash (Impl b b0)) (renamef (renfnad N) (Impl b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Iff b b0)), @eq bool_expr (be_dash (Iff b b0)) (renamef (renfnad N) (Iff b b0)) *) cut (var_lu 0 N b = true). intro. unfold var_lu in H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H0). intros. (* Goal: @eq bool_expr (Var (N.of_nat (Init.Nat.add N (N.to_nat b)))) (Var (N.of_nat (if Nat.leb N (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N))) *) (* Goal: @eq bool (var_lu O N b) true *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (_ : be_ok (var_lu O N) (Neg b)), @eq bool_expr (be_dash (Neg b)) (renamef (renfnad N) (Neg b)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Or b b0)), @eq bool_expr (be_dash (Or b b0)) (renamef (renfnad N) (Or b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (ANd b b0)), @eq bool_expr (be_dash (ANd b b0)) (renamef (renfnad N) (ANd b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Impl b b0)), @eq bool_expr (be_dash (Impl b b0)) (renamef (renfnad N) (Impl b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, @eq bool_expr (be_dash b) (renamef (renfnad N) b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, @eq bool_expr (be_dash b0) (renamef (renfnad N) b0)) (_ : be_ok (var_lu O N) (Iff b b0)), @eq bool_expr (be_dash (Iff b b0)) (renamef (renfnad N) (Iff b b0)) *) replace (leb N (nat_of_N b)) with false. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (plus_comm N (nat_of_N b)). reflexivity. symmetry in |- *. (* Goal: @eq bool (Nat.leb (S n) n) false *) (* Goal: forall _ : @eq bool (N.eqb (N.of_nat n) b) false, @eq bool_expr (Var (renfnad (S n) b)) (if N.eqb (N.of_nat n) b then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall _ : @eq bool (Nat.leb n (N.to_nat b)) false, @eq bool_expr (Var (renfnad (S n) b)) (if N.eqb (ap n) (N.of_nat (if Nat.leb n (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) apply leb_correct_conv. unfold lt in |- *. apply leb_complete. assumption. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply var_ok_inv. assumption. intros. simpl in |- *. rewrite H. reflexivity. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply neg_ok_inv. assumption. intros. simpl in |- *. rewrite H. rewrite H0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. exact (proj2 (or_ok_inv _ _ _ H1)). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) exact (proj1 (or_ok_inv _ _ _ H1)). intros. simpl in |- *. rewrite H. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite H0. reflexivity. exact (proj2 (and_ok_inv _ _ _ H1)). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) exact (proj1 (and_ok_inv _ _ _ H1)). intros. simpl in |- *. rewrite H. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite H0. reflexivity. exact (proj2 (impl_ok_inv _ _ _ H1)). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) exact (proj1 (impl_ok_inv _ _ _ H1)). intros. simpl in |- *. rewrite H. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite H0. reflexivity. exact (proj2 (iff_ok_inv _ _ _ H1)). (* Goal: be_ok (var_lu O N) b *) exact (proj1 (iff_ok_inv _ _ _ H1)). Qed. Lemma dash_be_ok : forall be : bool_expr, be_ok (var_lu 0 N) be -> be_ok (var_lu N (2 * N)) (be_dash be). Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. intro. apply zero_ok. intro. apply one_ok. intros. simpl in |- *. (* Goal: be_ok (var_lu N (Init.Nat.add N (Init.Nat.add N O))) (Var (N.of_nat (Init.Nat.add N (N.to_nat b)))) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (_ : be_ok (var_lu O N) (Neg b)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Neg b)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Or b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Or b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (ANd b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (ANd b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Impl b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Impl b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Iff b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Iff b b0)) *) apply var_ok. inversion H. unfold var_lu in H1. elim (andb_prop _ _ H1). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. unfold var_lu in |- *. apply andb_true_intro. split. (* Goal: @eq bool (ve (N.to_nat b)) (if Nat.leb N (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) then ve (Init.Nat.sub (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) N) else false) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Neg b) ve) (eval_be' (be_dash (Neg b)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Or b b0) ve) (eval_be' (be_dash (Or b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (be_dash (ANd b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (be_dash (Impl b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (be_dash (Iff b b0)) (var_env'_dash ve)) *) rewrite (nat_of_N_of_nat (N + nat_of_N b)). apply leb_correct. (* Goal: @eq bool (ve (N.to_nat b)) (if Nat.leb N (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) then ve (Init.Nat.sub (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) N) else false) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Neg b) ve) (eval_be' (be_dash (Neg b)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Or b b0) ve) (eval_be' (be_dash (Or b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (be_dash (ANd b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (be_dash (Impl b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (be_dash (Iff b b0)) (var_env'_dash ve)) *) apply le_plus_l. rewrite (nat_of_N_of_nat (N + nat_of_N b)). (* Goal: @eq bool (Nat.leb (S (Init.Nat.add N (N.to_nat b))) (Init.Nat.add N (Init.Nat.add N O))) true *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (_ : be_ok (var_lu O N) (Neg b)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Neg b)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Or b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Or b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (ANd b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (ANd b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Impl b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Impl b b0)) *) (* Goal: forall (b : bool_expr) (_ : forall _ : be_ok (var_lu O N) b, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b)) (b0 : bool_expr) (_ : forall _ : be_ok (var_lu O N) b0, be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash b0)) (_ : be_ok (var_lu O N) (Iff b b0)), be_ok (var_lu N (Init.Nat.mul (S (S O)) N)) (be_dash (Iff b b0)) *) replace (S (N + nat_of_N b)) with (S N + nat_of_N b). (* Goal: @eq bool (Nat.leb (S n) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (plus_Snm_nSm N (nat_of_N b)). apply leb_correct. (* Goal: le (Init.Nat.add (S (Init.Nat.sub n N)) N) (Init.Nat.add N N) *) (* Goal: @eq nat (Init.Nat.add (S (Init.Nat.sub n N)) N) (S (Init.Nat.add (Init.Nat.sub n N) N)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub n N) N) n *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply plus_le_compat. apply le_n. rewrite <- (plus_n_O N). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete. assumption. simpl in |- *. reflexivity. simpl in |- *. intros. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) inversion H0. apply neg_ok. apply H. assumption. simpl in |- *. intros. (* Goal: @eq bool (eval_be' (exl (ANd t (be_dash be)) (lx' N)) ve) true *) inversion H1. apply or_ok; [ apply H; assumption | apply H0; assumption ]. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. intros. inversion H1. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply and_ok; [ apply H; assumption | apply H0; assumption ]. simpl in |- *. intros. (* Goal: @eq bool (eval_be' (exl (ANd t (be_dash be)) (lx' N)) ve) true *) inversion H1. apply impl_ok; [ apply H; assumption | apply H0; assumption ]. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. intros. inversion H1. (* Goal: be_ok (var_lu N (Init.Nat.add N (Init.Nat.add N O))) (Iff (be_dash b) (be_dash b0)) *) apply iff_ok; [ apply H; assumption | apply H0; assumption ]. Qed. Lemma eval_dash_lemma1 : forall (be : bool_expr) (ve : var_env'), eval_be' be ve = eval_be' (be_dash be) (var_env'_dash ve). Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_zero in |- *. reflexivity. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_one in |- *. reflexivity. simpl in |- *. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_var in |- *. unfold var_env'_dash in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env in |- *. intros. (* Goal: @eq bool (ve (N.to_nat b)) (if Nat.leb N (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) then ve (Init.Nat.sub (N.to_nat (N.of_nat (Init.Nat.add N (N.to_nat b)))) N) else false) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Neg b) ve) (eval_be' (be_dash (Neg b)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Or b b0) ve) (eval_be' (be_dash (Or b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (be_dash (ANd b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (be_dash (Impl b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (be_dash (Iff b b0)) (var_env'_dash ve)) *) rewrite (nat_of_N_of_nat (N + nat_of_N b)). (* Goal: @eq bool (ve (N.to_nat b)) (if Nat.leb N (Init.Nat.add N (N.to_nat b)) then ve (Init.Nat.sub (Init.Nat.add N (N.to_nat b)) N) else false) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Neg b) ve) (eval_be' (be_dash (Neg b)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Or b b0) ve) (eval_be' (be_dash (Or b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (be_dash (ANd b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (be_dash (Impl b b0)) (var_env'_dash ve)) *) (* Goal: forall (b : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b ve) (eval_be' (be_dash b) (var_env'_dash ve))) (b0 : bool_expr) (_ : forall ve : var_env', @eq bool (eval_be' b0 ve) (eval_be' (be_dash b0) (var_env'_dash ve))) (ve : var_env'), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (be_dash (Iff b b0)) (var_env'_dash ve)) *) elim (sumbool_of_bool (leb N (N + nat_of_N b))). intro y. rewrite y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (minus_plus N (nat_of_N b)). reflexivity. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) replace (leb N (N + nat_of_N b)) with true. intro. discriminate. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. apply leb_correct. apply le_plus_l. intros. simpl in |- *. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. unfold eval_be' in H. simpl in |- *. unfold bool_fun_neg in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H ve). reflexivity. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_or in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intros. rewrite (H ve). rewrite (H0 ve). reflexivity. unfold eval_be' in |- *. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. unfold bool_fun_and in |- *. intros. rewrite (H ve). rewrite (H0 ve). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_impl in |- *. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H ve). rewrite (H0 ve). reflexivity. unfold eval_be' in |- *. simpl in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_iff in |- *. intros. rewrite (H ve). rewrite (H0 ve). reflexivity. Qed. Definition var_env_or (ve1 ve2 : var_env) (x : ad) := ve1 x || ve2 x. Definition var_env'_or (ve1 ve2 : var_env') (x : nat) := ve1 x || ve2 x. Lemma forall_lemma1 : forall (be : bool_expr) (ve : var_env) (a : ad), bool_fun_of_bool_expr (forall_ a be) ve = true -> bool_fun_of_bool_expr be ve = true. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. rewrite (forall_OK a be ve) in H. unfold bool_fun_forall in H. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_and in H. elim (andb_prop _ _ H). intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (ve a)). intro y. rewrite <- H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_restrict in |- *. apply (bool_fun_of_be_ext be). intros. (* Goal: @eq bool (if N.eqb x a then true else ve (N.to_nat x)) (augment (fun x : BDDvar => ve (N.to_nat x)) a true x) *) (* Goal: forall (n : nat) (_ : @eq bool (if N.eqb (N.of_nat n) a then true else ve n) true), not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) (* Goal: @eq bool (bool_fun_restrict (bool_fun_of_bool_expr (univl be l)) a false (var_env'_to_env ve)) true *) unfold augment in |- *. elim (sumbool_of_bool (Neqb a x)). intro y0. rewrite y0. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y0) in y. assumption. intro y0. rewrite y0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intro y. rewrite <- H1. unfold bool_fun_restrict in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext be). intros. unfold augment in |- *. (* Goal: @eq bool (ve (N.to_nat x)) (if N.eqb a x then false else ve (N.to_nat x)) *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) elim (sumbool_of_bool (Neqb a x)). intro y0. rewrite y0. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y0) in y. assumption. intro y0. rewrite y0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. Qed. Lemma renamef_ext : forall (be : bool_expr) (f g : ad -> ad), (forall x : ad, f x = g x) -> renamef f be = renamef g be. Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. reflexivity. reflexivity. simpl in |- *. intros. rewrite (H b). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite (H _ _ H0). reflexivity. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. rewrite (H _ _ H1). rewrite (H0 _ _ H1). reflexivity. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. rewrite (H _ _ H1). rewrite (H0 _ _ H1). reflexivity. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. rewrite (H _ _ H1). rewrite (H0 _ _ H1). reflexivity. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. rewrite (H _ _ H1). rewrite (H0 _ _ H1). reflexivity. Qed. Lemma renamef_id : forall be : bool_expr, renamef (fun x => x) be = be. Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. reflexivity. reflexivity. reflexivity. intros. simpl in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite H. reflexivity. intros. simpl in |- *. rewrite H. rewrite H0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite H. rewrite H0. reflexivity. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simpl in |- *. rewrite H. rewrite H0. reflexivity. intros. simpl in |- *. rewrite H. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite H0. reflexivity. Qed. Lemma renamefS : forall (be : bool_expr) (n : nat), n < N -> renamef (renfnad (S n)) be = subst (ap n) (Var (ap' N n)) (renamef (renfnad n) be). Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. simpl in |- *. reflexivity. reflexivity. intros. simpl in |- *. (* Goal: forall (be : bool_expr) (_ : le O N), @eq bool_expr be (renamef (fun x : ad => N.of_nat (renfnat O (N.to_nat x))) be) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : le n N), @eq bool_expr (replacel be (lx_1 n) (lx'_1 N n)) (renamef (renfnad n) be)) (be : bool_expr) (_ : le (S n) N), @eq bool_expr (replacel be (lx_1 (S n)) (lx'_1 N (S n))) (renamef (renfnad (S n)) be) *) unfold renfnad at 2 in |- *. unfold renfnat in |- *. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (leb n (nat_of_N b))). intro y. rewrite y. (* Goal: @eq bool_expr (Var (N.of_nat (N.to_nat b))) (Var b) *) (* Goal: @eq bool true (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall _ : @eq bool (Nat.leb n (N.to_nat b)) false, @eq bool_expr (Var (renfnad (S n) b)) (if N.eqb (ap n) (N.of_nat (if Nat.leb n (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) rewrite (N_of_nat_of_N b). unfold ap in |- *. (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb (N_of_nat n) b)). intro y0. rewrite y0. (* Goal: forall (be : bool_expr) (_ : le O N), @eq bool_expr be (renamef (fun x : ad => N.of_nat (renfnat O (N.to_nat x))) be) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : le n N), @eq bool_expr (replacel be (lx_1 n) (lx'_1 N n)) (renamef (renfnad n) be)) (be : bool_expr) (_ : le (S n) N), @eq bool_expr (replacel be (lx_1 (S n)) (lx'_1 N (S n))) (renamef (renfnad (S n)) be) *) unfold renfnad, ap' in |- *. unfold renfnat in |- *. rewrite <- (Neqb_complete _ _ y0). (* Goal: @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat n). replace (leb (S n) n) with false. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (plus_comm n N). reflexivity. symmetry in |- *. apply leb_correct_conv. (* Goal: forall (be : bool_expr) (_ : le O N), @eq bool_expr be (renamef (renfnad O) be) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : le n N), @eq bool_expr (replacel be (lx_1 n) (lx'_1 N n)) (renamef (renfnad n) be)) (be : bool_expr) (_ : le (S n) N), @eq bool_expr (replacel be (lx_1 (S n)) (lx'_1 N (S n))) (renamef (renfnad (S n)) be) *) auto. intro y0. rewrite y0. unfold renfnad in |- *. unfold renfnat in |- *. rewrite y. (* Goal: @eq bool_expr (Var (N.of_nat (N.to_nat b))) (Var b) *) (* Goal: @eq bool true (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall _ : @eq bool (Nat.leb n (N.to_nat b)) false, @eq bool_expr (Var (renfnad (S n) b)) (if N.eqb (ap n) (N.of_nat (if Nat.leb n (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) rewrite (N_of_nat_of_N b). replace (leb (S n) (nat_of_N b)) with true. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (N_of_nat_of_N b). reflexivity. symmetry in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) elim (le_le_S_eq _ _ (leb_complete _ _ y)). intro. apply leb_correct. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. intro. rewrite H0 in y0. rewrite (N_of_nat_of_N b) in y0. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_correct b) in y0. discriminate. intro y. rewrite y. (* Goal: @eq bool_expr (Var (renfnad (S n) b)) (if N.eqb (ap n) (N.of_nat (Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) unfold renfnad at 1 in |- *. unfold renfnat at 1 in |- *. (* Goal: @eq bool_expr (Var (N.of_nat (if Nat.leb (S n) (N.to_nat b) then N.to_nat b else Init.Nat.add (N.to_nat b) N))) (if N.eqb (ap n) (N.of_nat (Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) replace (leb (S n) (nat_of_N b)) with false. (* Goal: @eq bool_expr (Var (N.of_nat (Init.Nat.add (N.to_nat b) N))) (if N.eqb (ap n) (N.of_nat (Init.Nat.add (N.to_nat b) N)) then Var (ap' N n) else Var (renfnad n b)) *) (* Goal: @eq bool false (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) replace (Neqb (ap n) (N_of_nat (nat_of_N b + N))) with false. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold renfnad in |- *. unfold renfnat in |- *. rewrite y. reflexivity. symmetry in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply not_true_is_false. unfold not in |- *; intro. unfold ap in H0. (* Goal: False *) (* Goal: @eq bool false (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) rewrite <- (nat_of_N_of_nat n) in H. (* Goal: False *) (* Goal: @eq bool false (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) rewrite (Neqb_complete _ _ H0) in H. (* Goal: False *) (* Goal: @eq bool false (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) rewrite (nat_of_N_of_nat (nat_of_N b + N)) in H. apply (lt_irrefl N). (* Goal: lt N N *) (* Goal: @eq bool false (Nat.leb (S n) (N.to_nat b)) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Neg b)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Neg b))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Or b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Or b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (ANd b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (ANd b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Impl b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Impl b b0))) *) (* Goal: forall (b : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b))) (b0 : bool_expr) (_ : forall (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) b0) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) b0))) (n : nat) (_ : lt n N), @eq bool_expr (renamef (renfnad (S n)) (Iff b b0)) (subst (ap n) (Var (ap' N n)) (renamef (renfnad n) (Iff b b0))) *) apply le_lt_trans with (m := nat_of_N b + N). apply le_plus_r. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. symmetry in |- *. apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) cut (leb n (nat_of_N b) = true). intro. rewrite H1 in y. discriminate. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_correct. apply le_trans with (m := S n). apply le_S. apply le_n. apply leb_complete. assumption. intros. simpl in |- *. rewrite (H n H0). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite (H n H1). rewrite (H0 n H1). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite (H n H1). rewrite (H0 n H1). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite (H n H1). rewrite (H0 n H1). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. simpl in |- *. rewrite (H n H1). rewrite (H0 n H1). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. Qed. Lemma replacel_lemma : forall (n : nat) (be : bool_expr), n <= N -> replacel be (lx_1 n) (lx'_1 N n) = renamef (renfnad n) be. Proof. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simple induction n. simpl in |- *. unfold renfnad in |- *. unfold renfnat in |- *. intro. intro. replace (renamef (fun x : ad => N_of_nat match leb 0 (nat_of_N x) with | true => nat_of_N x | false => nat_of_N x + N end) be) with (renamef (fun x => x) be). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. apply renamef_id. apply renamef_ext. intro. (* Goal: @eq ad x (N.of_nat (if Nat.leb O (N.to_nat x) then N.to_nat x else Init.Nat.add (N.to_nat x) N)) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : le n N), @eq bool_expr (replacel be (lx_1 n) (lx'_1 N n)) (renamef (renfnad n) be)) (be : bool_expr) (_ : le (S n) N), @eq bool_expr (replacel be (lx_1 (S n)) (lx'_1 N (S n))) (renamef (renfnad (S n)) be) *) rewrite (leb_correct 0 (nat_of_N x) (le_O_n _)). symmetry in |- *. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply N_of_nat_of_N. simpl in |- *. intros. rewrite (H be). unfold replace in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. unfold replace in |- *. apply renamefS. assumption. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_trans with (m := S n0). apply le_S. apply le_n. assumption. Qed. Lemma replacel_lemma2 : forall be : bool_expr, be_ok (var_lu 0 N) be -> replacel be (lx N) (lx' N) = be_dash be. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. unfold lx, lx' in |- *. rewrite (replacel_lemma N be (le_n _)). symmetry in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply dash_renf. assumption. Qed. Lemma exl_semantics : forall (lx : list ad) (be : bool_expr) (ve : var_env'), (forall n : nat, ve n = true -> ~ In (N_of_nat n) lx) -> no_dup_list _ lx -> (eval_be' (exl be lx) ve = true <-> (exists ve' : var_env', (forall n : nat, ve' n = true -> In (N_of_nat n) lx) /\ eval_be' be (var_env'_or ve ve') = true)). Proof. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simple induction lx. simpl in |- *. intros be ve H H00. split. intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) split with (fun n : nat => false). split. intros. discriminate. unfold var_env'_or in |- *. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- H0. unfold eval_be' in |- *. apply (bool_fun_of_be_ext be). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env in |- *. intro. elim (ve (nat_of_N x)); reflexivity. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. elim H0; clear H0. intros ve' H0. inversion H0. clear H0. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- H2. unfold eval_be' in |- *. apply (bool_fun_of_be_ext be). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env in |- *. unfold var_env'_or in |- *. intro. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (ve' (nat_of_N x)) with false. elim (ve (nat_of_N x)); reflexivity. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. apply not_true_is_false. unfold not in |- *; intro. exact (H1 _ H0). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros a l H be ve H0 H00. split. intros. simpl in H1. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve'))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in H1. (* Goal: @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @In BinNums.N (N.of_nat n) (@cons ad a l)) (@eq bool (eval_be' be (var_env'_or ve ve')) true)) *) (* Goal: forall _ : @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @In BinNums.N (N.of_nat n) (@cons ad a l)) (@eq bool (eval_be' be (var_env'_or ve ve')) true)), @eq bool (eval_be' (exl be (@cons ad a l)) ve) true *) rewrite (ex_OK a (exl be l) (var_env'_to_env ve)) in H1. (* Goal: @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @In BinNums.N (N.of_nat n) (@cons ad a l)) (@eq bool (eval_be' be (var_env'_or ve ve')) true)) *) (* Goal: forall _ : @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @In BinNums.N (N.of_nat n) (@cons ad a l)) (@eq bool (eval_be' be (var_env'_or ve ve')) true)), @eq bool (eval_be' (exl be (@cons ad a l)) ve) true *) unfold bool_fun_ex in H1. unfold bool_fun_or in H1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_restrict in H1. elim (orb_prop _ _ H1); clear H1; intros. elim (H be (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H3. elim H2. intros ve' H3. inversion H3. clear H3. split with (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve' n end). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) split. intros. elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (Neqb_complete _ _ y). left. reflexivity. intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite y in H3. right. apply H4; assumption. replace (eval_be' be (var_env'_or ve (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve' n end))) with (eval_be' be (var_env'_or (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end) ve')). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) assumption. unfold eval_be', var_env'_or in |- *. apply (bool_fun_of_be_ext be). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (Neqb x a). auto with bool. auto with bool. unfold eval_be' in |- *. replace (bool_fun_of_bool_expr (exl be l) (var_env'_to_env (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end))) with (bool_fun_of_bool_expr (exl be l) (augment (var_env'_to_env ve) a true)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) assumption. apply (bool_fun_of_be_ext (exl be l)). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold augment, var_env'_to_env in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_comm a x). reflexivity. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y). apply no_dup_cons_no_in. assumption. intro y. (* Goal: not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) (* Goal: @eq bool (bool_fun_restrict (bool_fun_of_bool_expr (univl be l)) a false (var_env'_to_env ve)) true *) rewrite y in H2. simpl in H0. exact (fun x => H0 _ H2 (or_intror _ x)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. elim (H be (fun n : nat => match Neqb (N_of_nat n) a with | true => false | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H3 H. elim H2. intros ve' H. inversion H. clear H. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) clear H2. split with ve'. split. intros. right. apply H3. assumption. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- H4. unfold eval_be' in |- *. apply (bool_fun_of_be_ext be). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env, var_env'_or in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb x a)). intro y. rewrite y. simpl in |- *. (* Goal: no_dup_list BinNums.N (@cons BinNums.N (N.of_nat n) l) *) (* Goal: forall _ : @eq bool (N.eqb (N.of_nat n) a) false, not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) (* Goal: @eq bool (bool_fun_restrict (bool_fun_of_bool_expr (univl be l)) a false (var_env'_to_env ve)) true *) rewrite (Neqb_complete _ _ y). elim (sumbool_of_bool (ve (nat_of_N a))). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y0. elim (H0 _ y0). rewrite (N_of_nat_of_N a). left. reflexivity. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y0. rewrite y0. reflexivity. intro y. rewrite y. reflexivity. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- H1. unfold eval_be' in |- *. apply (bool_fun_of_be_ext (exl be l)). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env, augment in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_comm a x). reflexivity. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y). apply no_dup_cons_no_in. assumption. intro y. (* Goal: not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) (* Goal: @eq bool (bool_fun_restrict (bool_fun_of_bool_expr (univl be l)) a false (var_env'_to_env ve)) true *) rewrite y in H2. exact (fun x => H0 _ H2 (or_intror _ x)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. intros. elim H1; clear H1. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intros ve' H1. inversion H1. clear H1. simpl in |- *. unfold eval_be' in |- *. (* Goal: @eq bool (bool_fun_of_bool_expr (be_ex a (exl be l)) (var_env'_to_env ve)) true *) rewrite (ex_OK a (exl be l) (var_env'_to_env ve)). unfold bool_fun_ex in |- *. (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (bool_fun_of_bool_expr b (var_env'_to_env ve)) (bool_fun_of_bool_expr b (var_env'_to_env ve'))) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (bool_fun_of_bool_expr b0 (var_env'_to_env ve)) (bool_fun_of_bool_expr b0 (var_env'_to_env ve'))) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (bool_fun_or (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0) (var_env'_to_env ve)) (bool_fun_or (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0) (var_env'_to_env ve')) *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (ANd b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (Impl b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (Iff b b0) ve') *) unfold bool_fun_or in |- *. unfold bool_fun_restrict in |- *. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (ve' (nat_of_N a))). intro y. elim (H be (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H1 H. apply orb_true_intro. left. replace (bool_fun_of_bool_expr (exl be l) (augment (var_env'_to_env ve) a true)) with (eval_be' (exl be l) (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply H4. split with (fun n : nat => match Neqb (N_of_nat n) a with | true => false | false => ve' n end). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) split. intros. elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y0. (* Goal: @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y0 in H. discriminate. intro y0. rewrite y0 in H. elim (H2 _ H). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) intro. rewrite <- H1 in y0. rewrite (Neqb_correct a) in y0. discriminate. (* Goal: or (@eq BinNums.N a (N.of_nat n)) (@In BinNums.N (N.of_nat n) l) *) (* Goal: @eq bool (eval_be' (univl be l) ve) (bool_fun_of_bool_expr (univl be l) (augment (var_env'_to_env ve) a false)) *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) auto. replace (eval_be' be (var_env'_or (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end) (fun n : nat => match Neqb (N_of_nat n) a with | true => false | false => ve' n end))) with (eval_be' be (var_env'_or ve ve')). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) assumption. unfold eval_be' in |- *. apply (bool_fun_of_be_ext be). intro x. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat (N.to_nat x)))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat (N.to_nat x)))) N) true), False *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env, var_env'_or in |- *. rewrite (N_of_nat_of_N x). (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb x a)). intro y0. rewrite y0. (* Goal: @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y0). rewrite y. auto with bool. intro y0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y0. reflexivity. unfold eval_be' in |- *. (* Goal: @eq bool (bool_fun_of_bool_expr (exl be l) (augment (var_env'_to_env ve) a false)) (bool_fun_of_bool_expr (exl be l) (var_env'_to_env ve)) *) (* Goal: @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @In BinNums.N (N.of_nat n) l) (@eq bool (eval_be' be (var_env'_or ve ve')) true)) *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) apply (bool_fun_of_be_ext (exl be l)). unfold var_env'_to_env, augment in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intros. rewrite (N_of_nat_of_N x). rewrite (Neqb_comm a x). reflexivity. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y0. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_complete _ _ y0). apply no_dup_cons_no_in. assumption. (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y0. rewrite y0 in H1. exact (fun x => H0 _ H1 (or_intror _ x)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. intro y. elim (H be ve). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H H1. apply orb_true_intro. right. rewrite <- H4. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. apply (bool_fun_of_be_ext (exl be l)). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold augment, var_env'_to_env in |- *. intro. elim (sumbool_of_bool (Neqb a x)). (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y0. rewrite y0. symmetry in |- *. rewrite <- (Neqb_complete _ _ y0). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply not_true_is_false. unfold not in |- *; intro. apply (H0 _ H). left. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. apply N_of_nat_of_N. intro y0. rewrite y0. reflexivity. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) split with ve'. split. intros. elim (H2 _ H). intro. rewrite H1 in y. (* Goal: @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat n) in y. rewrite H in y. discriminate. auto. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. intros. exact (fun x => H0 _ H1 (or_intror _ x)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. Qed. Lemma univl_semantics : forall (lx : list ad) (be : bool_expr) (ve : var_env'), (forall n : nat, ve n = true -> ~ In (N_of_nat n) lx) -> no_dup_list _ lx -> (eval_be' (univl be lx) ve = true <-> (forall ve' : var_env', (forall n : nat, ve' n = true -> In (N_of_nat n) lx) -> eval_be' be (var_env'_or ve ve') = true)). Proof. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simple induction lx. simpl in |- *. intros be ve H H00. intros. split. intro. intros. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. replace (bool_fun_of_bool_expr be (var_env'_to_env (var_env'_or ve ve'))) with (bool_fun_of_bool_expr be (var_env'_to_env ve)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. apply (bool_fun_of_be_ext be). intros. unfold var_env'_or in |- *. (* Goal: @eq bool (var_env'_to_env ve b) (var_env'_to_env ve' b) *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Neg b) ve) (eval_be' (Neg b) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Or b b0) ve) (eval_be' (Or b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (ANd b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (Impl b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (Iff b b0) ve') *) unfold var_env'_to_env in |- *. replace (ve' (nat_of_N x)) with false. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (ve (nat_of_N x)); reflexivity. symmetry in |- *. apply not_true_is_false. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *; intro. exact (H1 _ H2). intros. replace (eval_be' be ve) with (eval_be' be (var_env'_or ve (fun n => false))). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply H0. intros. discriminate. unfold eval_be' in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext be). intro. unfold var_env'_to_env in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_or in |- *. elim (ve (nat_of_N x)); reflexivity. simpl in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros a l H be ve H0 H00. intros. split. intros. unfold eval_be' in H1. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (ve' (nat_of_N a))). intro y. (* Goal: @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : @eq bool (ve' (N.to_nat a)) false, @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : forall (ve' : var_env') (_ : forall (n : nat) (_ : @eq bool (ve' n) true), or (@eq BinNums.N a (N.of_nat n)) (@In BinNums.N (N.of_nat n) l)), @eq bool (eval_be' be (var_env'_or ve ve')) true, @eq bool (eval_be' (forall_ a (univl be l)) ve) true *) rewrite (forall_OK a (univl be l) (var_env'_to_env ve)) in H1. (* Goal: @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : @eq bool (ve' (N.to_nat a)) false, @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : forall (ve' : var_env') (_ : forall (n : nat) (_ : @eq bool (ve' n) true), or (@eq BinNums.N a (N.of_nat n)) (@In BinNums.N (N.of_nat n) l)), @eq bool (eval_be' be (var_env'_or ve ve')) true, @eq bool (eval_be' (forall_ a (univl be l)) ve) true *) unfold bool_fun_forall in H1. unfold bool_fun_and in H1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H1). intros. clear H1. clear H4. (* Goal: @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : @eq bool (ve' (N.to_nat a)) false, @eq bool (eval_be' be (var_env'_or ve ve')) true *) (* Goal: forall _ : forall (ve' : var_env') (_ : forall (n : nat) (_ : @eq bool (ve' n) true), or (@eq BinNums.N a (N.of_nat n)) (@In BinNums.N (N.of_nat n) l)), @eq bool (eval_be' be (var_env'_or ve ve')) true, @eq bool (eval_be' (forall_ a (univl be l)) ve) true *) unfold bool_fun_restrict in H3. replace (eval_be' be (var_env'_or ve ve')) with (eval_be' be (var_env'_or (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end) (fun n : nat => match Neqb (N_of_nat n) a with | true => false | false => ve' n end))). elim (H be (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H4. apply H1. unfold augment in H3. unfold eval_be' in |- *. replace (bool_fun_of_bool_expr (univl be l) (var_env'_to_env (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end))) with (bool_fun_of_bool_expr (univl be l) (fun y : BDDvar => match Neqb a y with | true => true | false => var_env'_to_env ve y end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. apply (bool_fun_of_be_ext (univl be l)). intros. (* Goal: @eq bool (var_env'_to_env ve b) (var_env'_to_env ve' b) *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Neg b) ve) (eval_be' (Neg b) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Or b b0) ve) (eval_be' (Or b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (ANd b b0) ve) (eval_be' (ANd b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Impl b b0) ve) (eval_be' (Impl b b0) ve') *) (* Goal: forall (b : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b ve) (eval_be' b ve')) (b0 : bool_expr) (_ : forall (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x b0) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' b0 ve) (eval_be' b0 ve')) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' (Iff b b0) ve) (eval_be' (Iff b b0) ve') *) unfold var_env'_to_env in |- *. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Neqb_comm a x). reflexivity. intros. (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y0. rewrite y0 in H4. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) discriminate. intro y0. rewrite y0 in H4. elim (H2 _ H4). intro. (* Goal: @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- H5 in y0. rewrite (Neqb_correct a) in y0. discriminate. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) trivial. intros. elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y0. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_in. rewrite (Neqb_complete _ _ y0). assumption. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) intro y0. rewrite y0 in H1. unfold not in |- *; intro. apply (H0 _ H1). auto. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. unfold eval_be' in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext be). intros. unfold var_env'_to_env, var_env'_or in |- *. (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (N_of_nat_of_N x). elim (sumbool_of_bool (Neqb x a)). intro y0. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y0. simpl in |- *. rewrite (Neqb_complete _ _ y0). rewrite y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) auto with bool. intro y0. rewrite y0. reflexivity. intro y. elim (H be ve). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H4. apply H3. unfold eval_be' in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply forall_lemma1 with (a := a). assumption. intros. elim (H2 _ H4). intro. (* Goal: @In BinNums.N (N.of_nat n) l *) (* Goal: forall _ : @In BinNums.N (N.of_nat n) l, @In BinNums.N (N.of_nat n) l *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) l) *) (* Goal: no_dup_list ad l *) (* Goal: forall _ : forall (ve' : var_env') (_ : forall (n : nat) (_ : @eq bool (ve' n) true), or (@eq BinNums.N a (N.of_nat n)) (@In BinNums.N (N.of_nat n) l)), @eq bool (eval_be' be (var_env'_or ve ve')) true, @eq bool (eval_be' (forall_ a (univl be l)) ve) true *) rewrite H5 in y. rewrite (nat_of_N_of_nat n) in y. rewrite y in H4. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) discriminate. auto. intros. unfold not in |- *; intro. apply (H0 _ H3). auto. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. intros. unfold eval_be' in |- *. (* Goal: @eq bool (bool_fun_of_bool_expr (forall_ a (univl be l)) (var_env'_to_env ve)) true *) rewrite (forall_OK a (univl be l) (var_env'_to_env ve)). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_forall in |- *. unfold bool_fun_and in |- *. apply andb_true_intro. split. (* Goal: @eq bool (bool_fun_restrict (bool_fun_of_bool_expr (univl be l)) a false (var_env'_to_env ve)) true *) unfold bool_fun_restrict in |- *. elim (H be (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. clear H2. replace (bool_fun_of_bool_expr (univl be l) (augment (var_env'_to_env ve) a true)) with (eval_be' (univl be l) (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply H3. intros. replace (eval_be' be (var_env'_or (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve n end) ve')) with (eval_be' be (var_env'_or ve (fun n : nat => match Neqb (N_of_nat n) a with | true => true | false => ve' n end))). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply H1. intros. elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) left. rewrite (Neqb_complete _ _ y). reflexivity. intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite y in H4. right. apply H2. assumption. unfold eval_be' in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext be). intros. unfold var_env'_to_env, var_env'_or in |- *. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (N_of_nat_of_N x). elim (sumbool_of_bool (Neqb x a)). intro y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y. auto with bool. intro y. rewrite y. reflexivity. (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve ve')) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. unfold var_env'_to_env in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext (univl be l)). intro. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold augment in |- *. rewrite (Neqb_comm a x). reflexivity. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (Neqb (N_of_nat n) a)). intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_in. rewrite (Neqb_complete _ _ y). assumption. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y. rewrite y in H2. exact (fun x => H0 _ H2 (or_intror _ x)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. unfold bool_fun_restrict in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (H be ve). intros. clear H2. replace (bool_fun_of_bool_expr (univl be l) (augment (var_env'_to_env ve) a false)) with (eval_be' (univl be l) ve). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply H3. intros. apply H1. intros. auto. unfold eval_be' in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext (univl be l)). intro. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env, augment in |- *. elim (sumbool_of_bool (Neqb a x)). intro y. (* Goal: @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y. rewrite <- (Neqb_complete _ _ y). apply not_true_is_false. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *. intro. elim (H0 (nat_of_N a)). assumption. left. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (N_of_nat_of_N a). reflexivity. intro y. rewrite y. reflexivity. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. exact (fun x => H0 _ H2 (or_intror _ x)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply no_dup_cons_no_dup with (a := a). assumption. Qed. Lemma bool_fun_of_be_ext1 : forall (be : bool_expr) (ve ve' : var_env'), (forall x : ad, be_x_free x be = true -> ve (nat_of_N x) = ve' (nat_of_N x)) -> eval_be' be ve = eval_be' be ve'. Proof. (* Goal: forall (be : bool_expr) (ve ve' : var_env') (_ : forall (x : ad) (_ : @eq bool (be_x_free x be) true), @eq bool (ve (N.to_nat x)) (ve' (N.to_nat x))), @eq bool (eval_be' be ve) (eval_be' be ve') *) simple induction be. reflexivity. reflexivity. intros. simpl in H. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_var in |- *. unfold var_env'_to_env in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H b). reflexivity. apply Neqb_correct. simpl in |- *. intros. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold eval_be' in H. unfold bool_fun_neg in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H ve ve' H0). reflexivity. unfold eval_be' in |- *. simpl in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_or in |- *. intros. rewrite (H ve ve'). rewrite (H0 ve ve'). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. apply H1. rewrite H2. auto with bool. intros. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply H1. rewrite H2. auto with bool. unfold eval_be' in |- *. simpl in |- *. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_and in |- *. simpl in |- *. intros. rewrite (H ve ve'). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H0 ve ve'). reflexivity. intros. apply H1. rewrite H2. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) auto with bool. intros. apply H1. rewrite H2. auto with bool. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_impl in |- *. intros. rewrite (H ve ve'). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H0 ve ve'). reflexivity. intros. apply H1. rewrite H2. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) auto with bool. intros. apply H1. rewrite H2. auto with bool. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_iff in |- *. intros. rewrite (H ve ve'). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (H0 ve ve'). reflexivity. intros. apply H1. rewrite H2. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) auto with bool. intros. apply H1. rewrite H2. auto with bool. Qed. Lemma no_dup_lx'_1 : forall n : nat, no_dup_list _ (lx'_1 N n). Proof. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) simple induction n. simpl in |- *. apply no_dup_nil. simpl in |- *. intros. apply no_dup_cons. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *; intro. elim (in_lx'_1_conv _ _ _ H0). intros. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) elim (lt_irrefl _ H2). assumption. Qed. Lemma mu_all_eval_semantics1 : forall t be : bool_expr, be_ok (var_lu 0 N) be -> forall ve : var_env', (forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) -> eval_be' (mu_all_eval N t be) ve = true -> forall ve' : var_env', (forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) -> eval_be' t (var_env'_or ve (var_env'_dash ve')) = true -> eval_be' be ve' = true. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. unfold mu_all_eval in H1. rewrite (replacel_lemma2 be H) in H1. (* Goal: @eq bool (eval_be' be ve') true *) rewrite (eval_dash_lemma1 be ve'). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (univl_semantics (lx' N) (Impl t (be_dash be)) ve). intros. clear H5. cut (eval_be' (Impl t (be_dash be)) (var_env'_or ve (var_env'_dash ve')) = true). (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) intro. cut (eval_be' (be_dash be) (var_env'_or ve (var_env'_dash ve')) = true). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intro. rewrite <- H6. apply bool_fun_of_be_ext1. intros. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_or in |- *. replace (ve (nat_of_N x)) with false. reflexivity. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) symmetry in |- *. apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) cut (var_lu 0 N x = true). cut (var_lu N (2 * N) x = true). intros. (* Goal: False *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: @eq bool (var_lu O N x) true *) (* Goal: @eq bool (eval_be' (be_dash be) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_lu in H9, H10. elim (andb_prop _ _ H9). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H10). intros. apply (lt_irrefl N). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_lt_trans with (m := nat_of_N x). apply leb_complete; assumption. (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) unfold lt in |- *. apply leb_complete; assumption. (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: @eq bool (var_lu O N x) true *) (* Goal: @eq bool (eval_be' (be_dash be) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply (be_ok_be_x_free (var_lu N (2 * N)) (be_dash be)). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply dash_be_ok. assumption. assumption. rewrite <- (N_of_nat_of_N x). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply H0. assumption. unfold eval_be' in |- *. unfold eval_be' in H5. simpl in H5. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve (var_env'_dash ve')))) true *) (* Goal: @eq bool (eval_be' (Impl t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_impl in H5. unfold eval_be' in H3. rewrite H3 in H5. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) simpl in H5. assumption. apply H4. assumption. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_dash in H5. elim (sumbool_of_bool (leb N n)). intro y. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite y in H5. apply in_lx'. apply leb_complete; assumption. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) cut (var_lu 0 N (N_of_nat (n - N)) = true). unfold var_lu in |- *. intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H6). intros. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat (n - N)) in H8. simpl in |- *. (* Goal: le (S n) (Init.Nat.add N (Init.Nat.add N O)) *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (plus_n_O N). replace n with (n - N + N). (* Goal: le (S (Init.Nat.add (Init.Nat.sub n N) N)) (Init.Nat.add N N) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub n N) N) n *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (S (n - N + N)) with (S (n - N) + N). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply plus_le_compat. apply leb_complete; assumption. apply le_n. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. rewrite (plus_comm (n - N) N). symmetry in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_plus_minus. apply leb_complete; assumption. apply H2. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. intro y. rewrite y in H5. discriminate. intros. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *; intro. unfold lx' in H5. elim (in_lx'_1_conv N N n H5). intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intro. unfold var_lu in H0. elim (andb_prop _ _ (H0 n H4)). intros. (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply (lt_irrefl N). apply le_lt_trans with (m := n). assumption. unfold lt in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat n) in H9. apply leb_complete; assumption. (* Goal: no_dup_list ad (lx' N) *) unfold lx' in |- *. apply no_dup_lx'_1. Qed. Lemma mu_ex_eval_semantics1 : forall t be : bool_expr, be_ok (var_lu 0 N) be -> forall ve : var_env', (forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) -> eval_be' (mu_ex_eval N t be) ve = true -> exists ve' : var_env', (forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) /\ eval_be' t (var_env'_or ve (var_env'_dash ve')) = true /\ eval_be' be ve' = true. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. unfold mu_ex_eval in H1. rewrite (replacel_lemma2 be H) in H1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (exl_semantics (lx' N) (ANd t (be_dash be)) ve). intros. clear H3. (* Goal: forall (x : var_env') (_ : and (forall (n : nat) (_ : @eq bool (x n) true), @In BinNums.N (N.of_nat n) (lx' N)) (@eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve x)) true)), @ex var_env' (fun ve' : var_env' => and (forall (n : nat) (_ : @eq bool (ve' n) true), @eq bool (var_lu O N (N.of_nat n)) true) (and (@eq bool (eval_be' t (var_env'_or ve (var_env'_dash ve'))) true) (@eq bool (eval_be' be ve') true))) *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (H2 H1). intros ve' H3. inversion H3. clear H2 H3. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) split with (fun n : nat => ve' (N + n)). split. intros. unfold var_lu in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply andb_true_intro. rewrite (nat_of_N_of_nat n). split. (* Goal: @eq bool (Nat.leb (S n) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_correct. apply le_O_n. elim (in_lx'_1_conv _ _ _ (H4 _ H2)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. apply leb_correct. unfold lt in H6. (* Goal: le (S n) N *) (* Goal: and (@eq bool (eval_be' t (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n))))) true) (@eq bool (eval_be' be (fun n : nat => ve' (Init.Nat.add N n))) true) *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (Splus_nm N n) in H6. rewrite (plus_Snm_nSm N n) in H6. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply (fun p n m : nat => plus_le_reg_l n m p) with (p := N). assumption. unfold eval_be' in H5. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) simpl in H5. unfold bool_fun_and in H5. elim (andb_prop _ _ H5). intros. (* Goal: and (@eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (@eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true) *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) split. rewrite <- H2. unfold eval_be' in |- *. apply (bool_fun_of_be_ext t). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_to_env, var_env'_or, var_env'_dash in |- *. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (leb N (nat_of_N x))). intro y. rewrite y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (le_plus_minus N (nat_of_N x)). reflexivity. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete; assumption. intro y. rewrite y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (ve' (nat_of_N x)) with false. reflexivity. symmetry in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply not_true_is_false. unfold not in |- *; intro. unfold lx' in H4. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (in_lx'_1_conv _ _ _ (H4 _ H6)). intros. (* Goal: @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (leb_correct _ _ H7) in y; discriminate. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve'))) (eval_be' be (fun n : nat => ve' (Init.Nat.add N n))) *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (eval_dash_lemma1 be (fun n : nat => ve' (N + n))). rewrite <- H3. (* Goal: @eq bool (eval_be' t (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n))))) (eval_be' t (var_env'_or ve ve')) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) fold (eval_be' (be_dash be) (var_env'_or ve ve')) in |- *. apply bool_fun_of_be_ext1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. unfold var_env'_or in |- *. unfold var_env'_dash in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) cut (var_lu N (2 * N) x = true). unfold var_lu in |- *. intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H7). intros. rewrite H8. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (ve (nat_of_N x)) with false. simpl in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (le_plus_minus N (nat_of_N x)). reflexivity. (* Goal: le N (N.to_nat x) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete. assumption. symmetry in |- *. apply not_true_is_false. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *; intro. unfold var_lu in H0. elim (andb_prop _ _ (H0 _ H10)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. rewrite (N_of_nat_of_N x) in H12. apply (lt_irrefl N). (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_lt_trans with (m := nat_of_N x). apply leb_complete; assumption. unfold lt in |- *. apply leb_complete; assumption. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply be_ok_be_x_free with (be := be_dash be). apply dash_be_ok. assumption. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. intros. unfold lx' in |- *. unfold not in |- *; intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (in_lx'_1_conv _ _ _ H3). intros. unfold var_lu in H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ (H0 _ H2)). rewrite (nat_of_N_of_nat n). intros. (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply (lt_irrefl N). apply le_lt_trans with (m := n). assumption. unfold lt in |- *. (* Goal: le N (N.to_nat x) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete. assumption. unfold lx' in |- *. apply no_dup_lx'_1. Qed. Lemma mu_ex_eval_semantics2 : forall t be : bool_expr, be_ok (var_lu 0 N) be -> forall ve : var_env', (forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) -> (exists ve' : var_env', (forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) /\ eval_be' t (var_env'_or ve (var_env'_dash ve')) = true /\ eval_be' be ve' = true) -> eval_be' (mu_ex_eval N t be) ve = true. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold mu_ex_eval in |- *. intros. rewrite (replacel_lemma2 be H). elim H1. (* Goal: @eq bool (eval_be' (exl (ANd t (be_dash be)) (lx' N)) ve) true *) clear H1. intros ve' H1. inversion H1. inversion H3. clear H3 H1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (exl_semantics (lx' N) (ANd t (be_dash be)) ve). intros. clear H1. (* Goal: and (@eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (@eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true) *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply H3. clear H3. split with (var_env'_dash ve'). split. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_dash in |- *. intros. elim (sumbool_of_bool (leb N n)). intros y. (* Goal: le N (N.to_nat x) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply in_lx'. apply leb_complete. assumption. rewrite y in H1. (* Goal: le (S n) (Init.Nat.mul (S (S O)) N) *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_lu in H2. elim (andb_prop _ _ (H2 _ H1)). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat (n - N)). intros. simpl in |- *. (* Goal: le (S n) (Init.Nat.add N (Init.Nat.add N O)) *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (plus_n_O N). replace n with (n - N + N). (* Goal: le (S (Init.Nat.add (Init.Nat.sub n N) N)) (Init.Nat.add N N) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub n N) N) n *) (* Goal: forall _ : @eq bool (Nat.leb N n) false, @In BinNums.N (N.of_nat n) (lx' N) *) (* Goal: @eq bool (eval_be' (ANd t (be_dash be)) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (S (n - N + N)) with (S (n - N) + N). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply plus_le_compat. apply leb_complete; assumption. apply le_n. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. rewrite (plus_comm (n - N) N). symmetry in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_plus_minus. apply leb_complete; assumption. intro y. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite y in H1. discriminate. unfold eval_be' in |- *. simpl in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold bool_fun_and in |- *. apply andb_true_intro. split. exact H4. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve (var_env'_dash ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) fold (eval_be' (be_dash be) (var_env'_or ve (var_env'_dash ve'))) in |- *. (* Goal: @eq bool (eval_be' (be_dash be) (var_env'_or ve (var_env'_dash ve'))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (eval_dash_lemma1 be ve') in H5. rewrite <- H5. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply (bool_fun_of_be_ext1 (be_dash be)). intros. unfold var_env'_or in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (ve (nat_of_N x)) with false. reflexivity. symmetry in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply not_true_is_false. unfold not in |- *; intro. unfold var_lu in H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ (H0 _ H3)). rewrite (N_of_nat_of_N x). intros. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ (be_ok_be_x_free _ _ (dash_be_ok _ H) _ H1)). intros. (* Goal: False *) (* Goal: no_dup_list ad (lx' N) *) apply (lt_irrefl N). apply le_lt_trans with (m := nat_of_N x). (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete; assumption. unfold lt in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete; assumption. unfold not in |- *; intros. unfold lx' in H3. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (in_lx'_1_conv _ _ _ H3). intros. unfold var_lu in H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ (H0 _ H1)). rewrite (nat_of_N_of_nat n). intros. (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply (lt_irrefl N). apply le_lt_trans with (m := n). assumption. unfold lt in |- *. (* Goal: le N (N.to_nat x) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete. assumption. unfold lx' in |- *. apply no_dup_lx'_1. Qed. Lemma mu_all_eval_semantics2 : forall t be : bool_expr, be_ok (var_lu 0 N) be -> forall ve : var_env', (forall n : nat, ve n = true -> var_lu 0 N (N_of_nat n) = true) -> (forall ve' : var_env', (forall n : nat, ve' n = true -> var_lu 0 N (N_of_nat n) = true) -> eval_be' t (var_env'_or ve (var_env'_dash ve')) = true -> eval_be' be ve' = true) -> eval_be' (mu_all_eval N t be) ve = true. Proof. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold mu_all_eval in |- *. intros. rewrite (replacel_lemma2 be H). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (univl_semantics (lx' N) (Impl t (be_dash be)) ve). intros. clear H2. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply H3. intros. clear H3. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_impl in |- *. elim (sumbool_of_bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve')))). (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) intro y. rewrite y. simpl in |- *. unfold eval_be' in H1. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve'))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (H1 (fun n : nat => ve' (N + n))). (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr be (var_env'_to_env (fun n : nat => ve' (Init.Nat.add N n)))) *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) fold (eval_be' be (fun n : nat => ve' (N + n))) in |- *. (* Goal: @eq bool (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve'))) (eval_be' be (fun n : nat => ve' (Init.Nat.add N n))) *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (eval_dash_lemma1 be (fun n : nat => ve' (N + n))). (* Goal: @eq bool (eval_be' t (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n))))) (eval_be' t (var_env'_or ve ve')) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) fold (eval_be' (be_dash be) (var_env'_or ve ve')) in |- *. apply bool_fun_of_be_ext1. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. intros. unfold var_env'_or in |- *. unfold var_env'_dash in |- *. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) cut (var_lu N (2 * N) x = true). unfold var_lu in |- *. intro. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ H4). intros. rewrite H5. (* Goal: @eq bool (orb false (ve' (N.to_nat x))) (ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N))) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) replace (ve (nat_of_N x)) with false. simpl in |- *. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (le_plus_minus N (nat_of_N x)). reflexivity. (* Goal: le N (N.to_nat x) *) (* Goal: @eq bool false (ve (N.to_nat x)) *) (* Goal: @eq bool (var_lu N (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve' (Init.Nat.add N n)) true), @eq bool (var_lu O N (N.of_nat n)) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete. assumption. symmetry in |- *. apply not_true_is_false. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) unfold not in |- *; intro. unfold var_lu in H0. elim (andb_prop _ _ (H0 _ H7)). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) intros. rewrite (N_of_nat_of_N x) in H9. apply (lt_irrefl N). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_lt_trans with (m := nat_of_N x). apply leb_complete; assumption. (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) unfold lt in |- *. apply leb_complete; assumption. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply be_ok_be_x_free with (be := be_dash be). apply dash_be_ok. assumption. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) assumption. intros. unfold var_lu in |- *. apply andb_true_intro. split. (* Goal: @eq bool (Nat.leb (S n) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_correct. apply le_O_n. rewrite (nat_of_N_of_nat n). (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) unfold lx' in H2. elim (in_lx'_1_conv _ _ _ (H2 _ H3)). intros. (* Goal: @eq bool (Nat.leb (S n) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold lt in H5. rewrite (plus_comm N n) in H5. rewrite (Splus_nm n N) in H5. (* Goal: @eq bool (Nat.leb (S n) N) true *) (* Goal: @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n)))))) true *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) apply leb_correct. apply (fun p n m : nat => plus_le_reg_l n m p) with (p := N). (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (plus_comm N (S n)). assumption. rewrite <- y. fold (eval_be' t (var_env'_or ve (var_env'_dash (fun n : nat => ve' (N + n))))) in |- *. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) fold (eval_be' t (var_env'_or ve ve')) in |- *. apply bool_fun_of_be_ext1. intros. (* Goal: @eq bool (var_env'_or ve (var_env'_dash (fun n : nat => ve' (Init.Nat.add N n))) (N.to_nat x)) (var_env'_or ve ve' (N.to_nat x)) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) unfold var_env'_or in |- *. replace (var_env'_dash (fun n : nat => ve' (N + n)) (nat_of_N x)) with (ve' (nat_of_N x)). (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. unfold var_env'_dash in |- *. (* Goal: forall _ : @eq bool (Nat.leb N (N.to_nat x)) false, @eq bool (ve' (N.to_nat x)) (if Nat.leb N (N.to_nat x) then ve' (Init.Nat.add N (Init.Nat.sub (N.to_nat x) N)) else false) *) (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) elim (sumbool_of_bool (leb N (nat_of_N x))). intro y0. rewrite y0. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite <- (le_plus_minus N (nat_of_N x)). reflexivity. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply leb_complete; assumption. intro y0. rewrite y0. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) apply not_true_is_false. unfold not in |- *; intro. unfold lx' in H2. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (in_lx'_1_conv _ _ _ (H2 _ H4)). intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) false, @eq bool (implb (bool_fun_of_bool_expr t (var_env'_to_env (var_env'_or ve ve'))) (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) rewrite (leb_correct _ _ H5) in y0; discriminate. intro y. rewrite y. (* Goal: @eq bool (implb false (bool_fun_of_bool_expr (be_dash be) (var_env'_to_env (var_env'_or ve ve')))) true *) (* Goal: forall (n : nat) (_ : @eq bool (ve n) true), not (@In BinNums.N (N.of_nat n) (lx' N)) *) (* Goal: no_dup_list ad (lx' N) *) reflexivity. intros. unfold not in |- *; intro. unfold lx' in H3. (* Goal: forall _ : lt n (Init.Nat.add N N), False *) (* Goal: no_dup_list ad (lx' N) *) elim (in_lx'_1_conv N N n H3). intro. intro. unfold var_lu in H0. (* Goal: forall (_ : @eq bool (Nat.leb O (N.to_nat (N.of_nat n))) true) (_ : @eq bool (Nat.leb (S (N.to_nat (N.of_nat n))) N) true), False *) (* Goal: no_dup_list ad (lx' N) *) elim (andb_prop _ _ (H0 n H2)). intros. apply (lt_irrefl N). (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) apply le_lt_trans with (m := n). assumption. unfold lt in |- *. (* Goal: le N n *) (* Goal: lt n N *) (* Goal: no_dup_list ad (lx' N) *) rewrite (nat_of_N_of_nat n) in H7. apply leb_complete; assumption. (* Goal: no_dup_list ad (lx' N) *) unfold lx' in |- *. apply no_dup_lx'_1. Qed. End New.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import Wf_nat. Require Import List. Require Import misc. Require Import bool_fun. Require Import myMap. Section BDD_config_1. Definition BDDzero := N0. Definition BDDone := Npos 1. Definition BDDstate := Map (BDDvar * (ad * ad)). Definition BDDsharing_map := Map (Map (Map ad)). Definition BDDfree_list := list ad. Definition BDDneg_memo := Map ad. Definition BDDor_memo := Map (Map ad). Definition BDDuniv_memo := Map (Map ad). Definition BDDconfig := (BDDstate * (BDDsharing_map * (BDDfree_list * (ad * (BDDneg_memo * (BDDor_memo * BDDuniv_memo))))))%type. Definition initBDDstate := newMap (BDDvar * (ad * ad)). Definition initBDDsharing_map := newMap (Map (Map ad)). Definition initBDDfree_list := nil (A:=ad). Definition initBDDneg_memo := newMap ad. Definition initBDDor_memo := newMap (Map ad). Definition initBDDuniv_memo := newMap (Map ad). Definition initBDDconfig := (initBDDstate, (initBDDsharing_map, (initBDDfree_list, (Npos 2, (initBDDneg_memo, (initBDDor_memo, initBDDuniv_memo)))))). Definition bs_node_height (bs : BDDstate) (node : ad) := match MapGet _ bs node with | None => N0 | Some (x, (l, r)) => ad_S x end. Definition node_height (cfg : BDDconfig) (node : ad) := bs_node_height (fst cfg) node. Fixpoint bool_fun_of_BDD_1 (bs : BDDstate) (node : ad) (bound : nat) {struct bound} : bool_fun := match bound with | O => (* Error *) bool_fun_zero | S bound' => match MapGet _ bs node with | None => if Neqb node BDDzero then bool_fun_zero else bool_fun_one | Some (x, (l, r)) => bool_fun_if x (bool_fun_of_BDD_1 bs r bound') (bool_fun_of_BDD_1 bs l bound') end end. Definition bool_fun_of_BDD_bs (bs : BDDstate) (node : ad) := bool_fun_of_BDD_1 bs node (S (nat_of_N (bs_node_height bs node))). Definition bool_fun_of_BDD (cfg : BDDconfig) := bool_fun_of_BDD_bs (fst cfg). Definition nodes_preserved_bs (bs bs' : BDDstate) := forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> MapGet _ bs' node = Some (x, (l, r)). Definition nodes_preserved (cfg cfg' : BDDconfig) := nodes_preserved_bs (fst cfg) (fst cfg'). Inductive nodes_reachable (bs : BDDstate) : ad -> ad -> Prop := | nodes_reachable_0 : forall node : ad, nodes_reachable bs node node | nodes_reachable_1 : forall (node node' l r : ad) (x : BDDvar), MapGet _ bs node = Some (x, (l, r)) -> nodes_reachable bs l node' -> nodes_reachable bs node node' | nodes_reachable_2 : forall (node node' l r : ad) (x : BDDvar), MapGet _ bs node = Some (x, (l, r)) -> nodes_reachable bs r node' -> nodes_reachable bs node node'. Definition node_preserved_bs (bs bs' : BDDstate) (node : ad) := forall (x : BDDvar) (l r node' : ad), nodes_reachable bs node node' -> MapGet _ bs node' = Some (x, (l, r)) -> MapGet _ bs' node' = Some (x, (l, r)). Definition node_preserved (cfg cfg' : BDDconfig) := node_preserved_bs (fst cfg) (fst cfg'). Definition used_node_bs (bs : BDDstate) (ul : list ad) (node : ad) := exists node' : ad, In node' ul /\ nodes_reachable bs node' node. Definition used_node'_bs (bs : BDDstate) (ul : list ad) (node : ad) := node = BDDzero \/ node = BDDone \/ used_node_bs bs ul node. Definition used_node (cfg : BDDconfig) := used_node_bs (fst cfg). Definition used_node' (cfg : BDDconfig) := used_node'_bs (fst cfg). Definition node_OK (bs : BDDstate) (node : ad) := node = BDDzero \/ node = BDDone \/ in_dom _ node bs = true. Definition config_node_OK (cfg : BDDconfig) := node_OK (fst cfg). Definition no_new_node_bs (bs bs' : BDDstate) := forall (x : BDDvar) (l r node : ad), MapGet _ bs' node = Some (x, (l, r)) -> MapGet _ bs node = Some (x, (l, r)). Definition no_new_node (cfg cfg' : BDDconfig) := no_new_node_bs (fst cfg) (fst cfg'). Inductive BDDbounded (bs : BDDstate) : ad -> BDDvar -> Prop := | BDDbounded_0 : forall n : BDDvar, BDDbounded bs BDDzero n | BDDbounded_1 : forall n : BDDvar, BDDbounded bs BDDone n | BDDbounded_2 : forall (node : ad) (n x : BDDvar) (l r : ad), MapGet _ bs node = Some (x, (l, r)) -> BDDcompare x n = Datatypes.Lt -> Neqb l r = false -> BDDbounded bs l x -> BDDbounded bs r x -> BDDbounded bs node n. Definition BDD_OK (bs : BDDstate) (node : ad) := match MapGet _ bs node with | None => node = BDDzero \/ node = BDDone | Some (n, _) => BDDbounded bs node (ad_S n) end. Definition BDDstate_OK (bs : BDDstate) := MapGet _ bs BDDzero = None /\ MapGet _ bs BDDone = None /\ (forall a : ad, in_dom _ a bs = true -> BDD_OK bs a). Definition BDDsharing_OK (bs : BDDstate) (share : BDDsharing_map) := forall (x : BDDvar) (l r a : ad), MapGet3 _ share l r x = Some a <-> MapGet _ bs a = Some (x, (l, r)). Definition BDDfree_list_OK (bs : BDDstate) (fl : BDDfree_list) (cnt : ad) := no_dup_list _ fl /\ (forall node : ad, In node fl <-> Nleb (Npos 2) node = true /\ Nleb (ad_S node) cnt = true /\ MapGet _ bs node = None). Definition cnt_OK (bs : BDDstate) (cnt : ad) := Nleb (Npos 2) cnt = true /\ (forall a : ad, Nleb cnt a = true -> MapGet _ bs a = None). Definition BDDneg_memo_OK (bs : BDDstate) (negm : BDDneg_memo) := forall node node' : ad, MapGet _ negm node = Some node' -> node_OK bs node /\ node_OK bs node' /\ Neqb (bs_node_height bs node') (bs_node_height bs node) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_neg (bool_fun_of_BDD_bs bs node)). Definition BDDor_memo_OK (bs : BDDstate) (orm : BDDor_memo) := forall node1 node2 node : ad, MapGet2 _ orm node1 node2 = Some node -> node_OK bs node1 /\ node_OK bs node2 /\ node_OK bs node /\ Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2)) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)). Definition BDDuniv_memo_OK (bs : BDDstate) (um : BDDuniv_memo) := forall (x : BDDvar) (node node' : ad), MapGet2 _ um node x = Some node' -> node_OK bs node /\ node_OK bs node' /\ Nleb (bs_node_height bs node') (bs_node_height bs node) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node)). Definition BDDconfig_OK (cfg : BDDconfig) := BDDstate_OK (fst cfg) /\ BDDsharing_OK (fst cfg) (fst (snd cfg)) /\ BDDfree_list_OK (fst cfg) (fst (snd (snd cfg))) (fst (snd (snd (snd cfg)))) /\ cnt_OK (fst cfg) (fst (snd (snd (snd cfg)))) /\ BDDneg_memo_OK (fst cfg) (fst (snd (snd (snd (snd cfg))))) /\ BDDor_memo_OK (fst cfg) (fst (snd (snd (snd (snd (snd cfg)))))) /\ BDDuniv_memo_OK (fst cfg) (snd (snd (snd (snd (snd (snd cfg)))))). Definition used_list_OK_bs (bs : BDDstate) (ul : list ad) := forall node : ad, In node ul -> node_OK bs node. Definition used_list_OK (cfg : BDDconfig) := used_list_OK_bs (fst cfg). Definition used_nodes_preserved_bs (bs bs' : BDDstate) (ul : list ad) := forall node : ad, In node ul -> node_preserved_bs bs bs' node. Definition used_nodes_preserved (cfg cfg' : BDDconfig) := used_nodes_preserved_bs (fst cfg) (fst cfg'). Definition gc_OK (gc : BDDconfig -> list ad -> BDDconfig) := forall (cfg : BDDconfig) (ul : list ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> BDDconfig_OK (gc cfg ul) /\ used_nodes_preserved cfg (gc cfg ul) ul /\ no_new_node cfg (gc cfg ul). Lemma initBDDstate_OK : BDDstate_OK initBDDstate. Proof. (* Goal: BDDstate_OK initBDDstate *) unfold BDDstate_OK, initBDDstate in |- *. split. simpl in |- *. trivial. split. simpl in |- *. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) trivial. intros. compute in H. discriminate H. Qed. Lemma initBDDsharing_map_OK : BDDsharing_OK initBDDstate initBDDsharing_map. Proof. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold BDDsharing_OK, initBDDstate, initBDDsharing_map in |- *. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) compute in H. discriminate H. intros. compute in H. discriminate H. Qed. Lemma initBDDfree_list_OK : BDDfree_list_OK initBDDstate initBDDfree_list (Npos 2). Proof. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold BDDfree_list_OK, initBDDstate, initBDDfree_list in |- *. simpl in |- *. split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) apply no_dup_nil. split. tauto. intro. elim H; clear H; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H0; clear H0; intros. cut (Nleb (ad_S node) node = true). intro. (* Goal: False *) (* Goal: @eq bool (Nleb (ad_S node) node) true *) cut (Neqb node node = false). rewrite (Neqb_correct node). (* Goal: forall _ : @eq bool true false, False *) (* Goal: @eq bool (N.eqb node node) false *) (* Goal: @eq bool (Nleb (ad_S node) node) true *) intro; discriminate. apply ad_S_le_then_neq. assumption. (* Goal: @In ad node0 ul *) apply Nleb_trans with (b := Npos 2). assumption. assumption. Qed. Lemma initBDDneg_memo_OK : forall bs : BDDstate, BDDneg_memo_OK bs initBDDneg_memo. Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) unfold BDDneg_memo_OK, initBDDneg_memo in |- *. simpl in |- *. intros; discriminate. Qed. Lemma initBDDor_memo_OK : forall bs : BDDstate, BDDor_memo_OK bs initBDDor_memo. Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) unfold BDDor_memo_OK, initBDDor_memo in |- *. simpl in |- *. intros; discriminate. Qed. Lemma initBDDuniv_memo_OK : forall bs : BDDstate, BDDuniv_memo_OK bs initBDDuniv_memo. Proof. (* Goal: forall (bs : BDDstate) (x : BDDvar) (node node' : ad) (_ : @eq (option ad) (MapGet2 ad (newMap (Map ad)) node x) (@Some ad node')), and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) unfold BDDuniv_memo_OK, initBDDuniv_memo in |- *. intros; discriminate. Qed. Lemma initBDDconfig_OK : BDDconfig_OK initBDDconfig. Proof. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold BDDconfig_OK, initBDDconfig in |- *. simpl in |- *. split. apply initBDDstate_OK. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. exact initBDDsharing_map_OK. split. exact initBDDfree_list_OK. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. split; reflexivity. split. apply initBDDneg_memo_OK. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. apply initBDDor_memo_OK. apply initBDDuniv_memo_OK. Qed. Lemma config_OK_zero : forall cfg : BDDconfig, BDDconfig_OK cfg -> MapGet _ (fst cfg) BDDzero = None. Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. elim cfg. clear cfg. intros bs y. elim y. intros share cnt. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intros. elim H. intros. elim H0. intros. simpl in |- *. exact H2. Qed. Lemma config_OK_one : forall cfg : BDDconfig, BDDconfig_OK cfg -> MapGet _ (fst cfg) BDDone = None. Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. elim cfg. clear cfg. intros bs y. elim y. intros share cnt. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intros. elim H. intros. elim H0. intros. simpl in |- *. exact (proj1 H3). Qed. Lemma zero_OK : forall cfg : BDDconfig, config_node_OK cfg BDDzero. Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. left; reflexivity. Qed. Lemma one_OK : forall cfg : BDDconfig, config_node_OK cfg BDDone. Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. right; left; reflexivity. Qed. Lemma node_height_zero : forall cfg : BDDconfig, BDDconfig_OK cfg -> Neqb (node_height cfg BDDzero) N0 = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_height in |- *. unfold bs_node_height in |- *. rewrite (config_OK_zero cfg H). (* Goal: @eq ad BDDone BDDone *) reflexivity. Qed. Lemma node_height_one : forall cfg : BDDconfig, BDDconfig_OK cfg -> Neqb (node_height cfg BDDone) N0 = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_height in |- *. unfold bs_node_height in |- *. rewrite (config_OK_one cfg H). (* Goal: @eq ad BDDone BDDone *) reflexivity. Qed. Lemma nodes_preserved_bs_trans : forall bs1 bs2 bs3 : BDDstate, nodes_preserved_bs bs1 bs2 -> nodes_preserved_bs bs2 bs3 -> nodes_preserved_bs bs1 bs3. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold nodes_preserved_bs in |- *. intros. apply H0. apply H. assumption. Qed. Lemma nodes_preserved_bs_refl : forall bs : BDDstate, nodes_preserved_bs bs bs. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : @In ad node ul) (x : BDDvar) (l r node' : ad) (_ : nodes_reachable (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node node') (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) unfold nodes_preserved_bs in |- *. tauto. Qed. Lemma nodes_preserved_trans : forall cfg1 cfg2 cfg3 : BDDconfig, nodes_preserved cfg1 cfg2 -> nodes_preserved cfg2 cfg3 -> nodes_preserved cfg1 cfg3. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold nodes_preserved in |- *. intros. apply nodes_preserved_bs_trans with (bs2 := fst cfg2); assumption. Qed. Lemma nodes_preserved_refl : forall cfg : BDDconfig, nodes_preserved cfg cfg. Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold nodes_preserved in |- *. intro. apply nodes_preserved_bs_refl. Qed. Lemma increase_bound : forall (bs : BDDstate) (n n' : BDDvar) (node : ad), BDDbounded bs node n -> BDDcompare n n' = Datatypes.Lt -> BDDbounded bs node n'. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intro. intro. intro. intro. intro. elim H. intros. apply BDDbounded_0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply BDDbounded_1. intros. apply BDDbounded_2 with (x := x) (l := l) (r := r). (* Goal: @In ad node0 ul *) assumption. apply BDDcompare_trans with (y := n0). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. Qed. Lemma nodes_preserved_bounded : forall (bs bs' : BDDstate) (n : BDDvar) (node : ad), nodes_preserved_bs bs bs' -> BDDbounded bs node n -> BDDbounded bs' node n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H0. intro. apply BDDbounded_0. intro. apply BDDbounded_1. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply BDDbounded_2 with (x := x) (l := l) (r := r). apply H. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDbounded_lemma : forall (bs : BDDstate) (node : ad) (n : BDDvar), BDDbounded bs node n -> node = BDDzero \/ node = BDDone \/ (exists x : BDDvar, (exists l : BDDvar, (exists r : BDDvar, MapGet _ bs node = Some (x, (l, r)) /\ BDDcompare x n = Datatypes.Lt /\ Neqb l r = false /\ BDDbounded bs l x /\ BDDbounded bs r x))). Proof. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) intro. intro. intro. intro. elim H. intros. left. trivial. intros. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) right. left. trivial. intros. right. right. split with x. split with l. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split with r. split. assumption. split. assumption. split. assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. assumption. assumption. Qed. Lemma BDD_OK_node_OK : forall (bs : BDDstate) (node : ad), BDD_OK bs node -> node_OK bs node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold BDD_OK in H. elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intro y. elim y; clear y; intros x y. right; right. unfold in_dom in |- *. simpl in |- *. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite y. reflexivity. intro y. rewrite y in H. elim H; intro. (* Goal: @In ad node0 ul *) left; assumption. right; left; assumption. Qed. Lemma node_OK_BDD_OK : forall (bs : BDDstate) (node : ad), BDDstate_OK bs -> node_OK bs node -> BDD_OK bs node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold BDD_OK in |- *. elim H0; intro. rewrite H1. unfold BDDstate_OK in H. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (proj1 H). left; reflexivity. elim H1; intro. rewrite H2. (* Goal: @eq ad BDDone BDDone *) rewrite (proj1 (proj2 H)). right; reflexivity. fold (BDD_OK bs node) in |- *. (* Goal: @In ad node0 ul *) unfold BDDstate_OK in H. apply (proj2 (proj2 H)). assumption. Qed. Lemma bs_node_height_left : forall (bs : BDDstate) (node l r : ad) (x : BDDvar), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> BDDcompare (bs_node_height bs l) (bs_node_height bs node) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. intros. unfold BDDstate_OK in H. unfold BDD_OK in H. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H; clear H; intros. elim H1; clear H1; intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (BDDbounded bs node (ad_S x)). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim (BDDbounded_lemma bs node (ad_S x) H3). intro. rewrite H4 in H0. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite H0 in H; discriminate. intro. elim H4; clear H4; intro. (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) rewrite H4 in H0; rewrite H0 in H1; discriminate. inversion H4. (* Goal: nodes_reachable bs' node node' *) clear H4; inversion H5. clear H5; inversion H4. clear H4; inversion H5. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) clear H5. rewrite H0 in H4. injection H4. intros. rewrite <- H5 in H6. (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) rewrite <- H7 in H6. rewrite <- H8 in H6. (* Goal: @eq comparison (BDDcompare (bs_node_height bs l) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) elim (BDDbounded_lemma bs l x (proj1 (proj2 (proj2 H6)))). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. unfold bs_node_height in |- *. rewrite H9. rewrite H. rewrite H0. unfold ad_S in |- *. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim x. reflexivity. reflexivity. intro. elim H9; clear H9; intro. (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) rewrite H9. unfold bs_node_height in |- *. rewrite H0. rewrite H1. unfold ad_S in |- *. elim x. (* Goal: @eq ad BDDone BDDone *) reflexivity. reflexivity. inversion H9. inversion H10. inversion H11. (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) inversion H12. inversion H14. unfold bs_node_height in |- *. rewrite H0. rewrite H13. (* Goal: @In ad node0 ul *) rewrite <- (ad_S_compare x3 x). assumption. lapply (H2 node). rewrite H0. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) trivial. unfold in_dom in |- *. rewrite H0. reflexivity. Qed. Lemma bs_node_height_right : forall (bs : BDDstate) (node l r : ad) (x : BDDvar), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> BDDcompare (bs_node_height bs r) (bs_node_height bs node) = Datatypes.Lt. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. intros. unfold BDDstate_OK in H. unfold BDD_OK in H. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H; clear H; intros. elim H1; clear H1; intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (BDDbounded bs node (ad_S x)). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim (BDDbounded_lemma bs node (ad_S x) H3). intro. rewrite H4 in H0. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite H0 in H; discriminate. intro. elim H4; clear H4; intro. (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) rewrite H4 in H0; rewrite H0 in H1; discriminate. inversion H4. (* Goal: nodes_reachable bs' node node' *) clear H4; inversion H5. clear H5; inversion H4. clear H4; inversion H5. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) clear H5. rewrite H0 in H4. injection H4. intros. rewrite <- H5 in H6. (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) rewrite <- H7 in H6. rewrite <- H8 in H6. (* Goal: @eq comparison (BDDcompare (bs_node_height bs r) (bs_node_height bs node)) Lt *) (* Goal: BDDbounded bs node (ad_S x) *) elim (BDDbounded_lemma bs r x (proj2 (proj2 (proj2 H6)))). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. unfold bs_node_height in |- *. rewrite H9. rewrite H. rewrite H0. unfold ad_S in |- *. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim x. reflexivity. reflexivity. intro. elim H9; clear H9; intro. (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) rewrite H9. unfold bs_node_height in |- *. rewrite H0. rewrite H1. unfold ad_S in |- *. elim x. (* Goal: @eq ad BDDone BDDone *) reflexivity. reflexivity. inversion H9. inversion H10. inversion H11. (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) inversion H12. inversion H14. unfold bs_node_height in |- *. rewrite H0. rewrite H13. (* Goal: @In ad node0 ul *) rewrite <- (ad_S_compare x3 x). assumption. lapply (H2 node). rewrite H0. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) trivial. unfold in_dom in |- *. rewrite H0. reflexivity. Qed. Lemma internal_node_lemma : forall (bs : BDDstate) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> Neqb l r = false /\ BDDbounded bs l x /\ BDDbounded bs r x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (BDD_OK bs node). unfold BDD_OK in |- *. rewrite H0. intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim (BDDbounded_lemma bs node (ad_S x) H1). intro. rewrite H2 in H0. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold BDDstate_OK in H. rewrite (proj1 H) in H0. discriminate. intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim H2; clear H2; intro. rewrite H2 in H0. unfold BDDstate_OK in H. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite (proj1 (proj2 H)) in H0. discriminate. inversion H2. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) inversion H3. inversion H4. rewrite H0 in H5. inversion H5. injection H6; intros. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) rewrite <- H8 in H7. rewrite <- H9 in H7. rewrite <- H10 in H7. split. (* Goal: @eq bool (N.eqb l r) false *) (* Goal: and (BDDbounded bs l x) (BDDbounded bs r x) *) (* Goal: BDD_OK bs node *) exact (proj1 (proj2 H7)). exact (proj2 (proj2 H7)). (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node bs') true *) unfold BDDstate_OK in H. apply (proj2 (proj2 H)). unfold in_dom in |- *. (* Goal: @eq ad BDDone BDDone *) rewrite H0. reflexivity. Qed. Lemma high_bounded : forall (bs : BDDstate) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> BDDbounded bs r x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. exact (proj2 (proj2 (internal_node_lemma bs x l r node H H0))). Qed. Lemma low_bounded : forall (bs : BDDstate) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> BDDbounded bs l x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. exact (proj1 (proj2 (internal_node_lemma bs x l r node H H0))). Qed. Lemma BDDbounded_node_OK : forall (bs : BDDstate) (node : ad) (n : BDDvar), BDDbounded bs node n -> node_OK bs node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim (BDDbounded_lemma bs node n H). intro. rewrite H0. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) left; reflexivity. intro. elim H0; clear H0; intro. rewrite H0. (* Goal: node_OK bs BDDzero *) (* Goal: forall _ : or (@eq ad node BDDone) (@ex BDDvar (fun x : BDDvar => @ex BDDvar (fun l : BDDvar => @ex BDDvar (fun r : BDDvar => and (@eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod BDDvar BDDvar)) (@pair BDDvar (prod BDDvar BDDvar) x (@pair BDDvar BDDvar l r)))) (and (@eq comparison (BDDcompare x n) Lt) (and (@eq bool (N.eqb l r) false) (and (BDDbounded bs l x) (BDDbounded bs r x)))))))), node_OK bs node *) right; left; reflexivity. inversion H0. inversion H1. inversion H2. (* Goal: @eq ad BDDone BDDone *) unfold node_OK in |- *. right; right; unfold in_dom in |- *; rewrite (proj1 H3); reflexivity. Qed. Lemma high_OK : forall (bs : BDDstate) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> node_OK bs r. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (BDDbounded bs r x). intros. apply BDDbounded_node_OK with (n := x). (* Goal: @In ad node0 ul *) assumption. unfold BDDstate_OK in H. apply high_bounded with (node := node) (l := l). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma low_OK : forall (bs : BDDstate) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> MapGet _ bs node = Some (x, (l, r)) -> node_OK bs l. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (BDDbounded bs l x). intros. apply BDDbounded_node_OK with (n := x). (* Goal: @In ad node0 ul *) assumption. unfold BDDstate_OK in H. apply low_bounded with (node := node) (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma low_high_neq : forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad), BDDconfig_OK cfg -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> Neqb l r = false. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. exact (proj1 (internal_node_lemma (fst cfg) x l r node (proj1 H) H0)). Qed. Lemma bs_node_height_left_le : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> Nleb (bs_node_height bs l) x = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold Nleb in |- *. apply leb_correct. apply lt_n_Sm_le. (* Goal: lt (N.to_nat (bs_node_height bs r)) (S (N.to_nat x)) *) rewrite <- (ad_S_is_S x). replace (ad_S x) with (bs_node_height bs node). (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := r). assumption. (* Goal: @In ad node0 ul *) assumption. unfold bs_node_height in |- *. rewrite H0. reflexivity. Qed. Lemma bs_node_height_right_le : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> Nleb (bs_node_height bs r) x = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold Nleb in |- *. apply leb_correct. apply lt_n_Sm_le. (* Goal: lt (N.to_nat (bs_node_height bs r)) (S (N.to_nat x)) *) rewrite <- (ad_S_is_S x). replace (ad_S x) with (bs_node_height bs node). (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := l). assumption. (* Goal: @In ad node0 ul *) assumption. unfold bs_node_height in |- *. rewrite H0. reflexivity. Qed. Lemma no_duplicate_node : forall (bs : BDDstate) (share : BDDsharing_map), BDDstate_OK bs -> BDDsharing_OK bs share -> forall (x : BDDvar) (l r node1 node2 : ad), MapGet _ bs node1 = Some (x, (l, r)) -> MapGet _ bs node2 = Some (x, (l, r)) -> node1 = node2. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (MapGet3 _ share l r x = Some node1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) cut (MapGet3 _ share l r x = Some node2). intros. rewrite H3 in H4. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) injection H4. intro. rewrite H5; reflexivity. unfold BDDsharing_OK in H0. (* Goal: @In ad node0 ul *) apply (proj2 (H0 x l r node2)). assumption. apply (proj2 (H0 x l r node1)). (* Goal: @In ad node0 ul *) assumption. Qed. Lemma int_node_gt_1 : forall (bs : BDDstate) (node : ad), BDDstate_OK bs -> in_dom _ node bs = true -> Nleb (Npos 2) node = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply ad_gt_1_lemma. unfold not in |- *; intro. unfold BDDstate_OK in H. (* Goal: False *) (* Goal: not (@eq ad node (Npos xH)) *) unfold BDDzero in H. rewrite <- H1 in H. unfold in_dom in H0. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (proj1 H) in H0. discriminate. unfold not in |- *; intro. (* Goal: @eq bool (match MapGet (prod BDDvar (prod ad ad)) bs BDDone with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r (N.to_nat (bs_node_height bs BDDone))) (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs BDDone))) | None => bool_fun_one end vb) (bool_fun_one vb) *) unfold BDDstate_OK in H. unfold BDDone in H. rewrite <- H1 in H. (* Goal: @eq bool (N.eqb node BDDone) true *) unfold in_dom in H0. rewrite (proj1 (proj2 H)) in H0. discriminate. Qed. Lemma int_node_lt_cnt : forall (bs : BDDstate) (cnt node : ad), cnt_OK bs cnt -> in_dom _ node bs = true -> Nleb (ad_S node) cnt = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold cnt_OK in H. apply Nltb_lebmma. apply not_true_is_false. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold not in |- *; intro. unfold in_dom in H0. unfold Nleb in |- *. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite (proj2 H node H1) in H0. discriminate. Qed. Lemma nodes_preserved_bs_node_OK : forall (bs1 bs2 : BDDstate) (node : ad), nodes_preserved_bs bs1 bs2 -> node_OK bs1 node -> node_OK bs2 node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H0; intro. rewrite H1; left; reflexivity. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim H1; intro. rewrite H2; right; left; reflexivity. right; right. (* Goal: @eq bool (in_dom (prod BDDvar (prod ad ad)) node bs') true *) unfold in_dom in |- *. unfold nodes_preserved_bs in H. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) elim (option_sum _ (MapGet _ bs1 node)). intro y. elim y. intro x. elim x. (* Goal: forall (a : BDDvar) (b : prod ad ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) a b))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) intros y0 y1. elim y1; intros y2 y3 y4. rewrite (H y0 y2 y3 node y4). (* Goal: @eq ad BDDone BDDone *) reflexivity. intro y. unfold in_dom in H2. rewrite y in H2; discriminate. Qed. Lemma nodes_preserved_config_node_OK : forall (cfg1 cfg2 : BDDconfig) (node : ad), nodes_preserved cfg1 cfg2 -> config_node_OK cfg1 node -> config_node_OK cfg2 node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold config_node_OK in |- *. (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_node_OK with (bs1 := fst cfg1). assumption. assumption. Qed. Lemma nodes_preserved_bs_node_height_eq : forall (bs1 bs2 : BDDstate) (node : ad), nodes_preserved_bs bs1 bs2 -> BDDstate_OK bs1 -> BDDstate_OK bs2 -> node_OK bs1 node -> Neqb (bs_node_height bs2 node) (bs_node_height bs1 node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H2; intro. rewrite H3. unfold bs_node_height in |- *. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs2 BDDzero with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs1 BDDzero with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs2 node) (bs_node_height bs1 node)) true *) unfold BDDstate_OK in H0. rewrite (proj1 H0). rewrite (proj1 H1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) apply Neqb_correct. elim H3; intros. rewrite H4. unfold bs_node_height in |- *. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' BDDone with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs BDDone with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) rewrite (proj1 (proj2 H0)). rewrite (proj1 (proj2 H1)). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) apply Neqb_correct. elim (option_sum _ (MapGet _ bs1 node)). intro y. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim y. intro. elim x. intros y0 y1. elim y1. intros y2 y3 y4. unfold bs_node_height in |- *. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs2 node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S y0)) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs1 node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb (bs_node_height bs2 node) (bs_node_height bs1 node)) true *) rewrite y4. unfold nodes_preserved_bs in H. rewrite (H y0 y2 y3 node y4). (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) apply Neqb_correct. intro y. unfold in_dom in H4. rewrite y in H4. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. Qed. Lemma nodes_preserved_node_height_eq : forall (cfg1 cfg2 : BDDconfig) (node : ad), BDDconfig_OK cfg1 -> BDDconfig_OK cfg2 -> nodes_preserved cfg1 cfg2 -> config_node_OK cfg1 node -> Neqb (node_height cfg2 node) (node_height cfg1 node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_height in |- *. apply nodes_preserved_bs_node_height_eq. assumption. (* Goal: @In ad node0 ul *) exact (proj1 H). exact (proj1 H0). assumption. Qed. Section Components. Variable cfg : BDDconfig. Hypothesis cfg_OK : BDDconfig_OK cfg. Definition bs_of_cfg := fst cfg. Definition share_of_cfg := fst (snd cfg). Definition fl_of_cfg := fst (snd (snd cfg)). Definition cnt_of_cfg := fst (snd (snd (snd cfg))). Definition negm_of_cfg := fst (snd (snd (snd (snd cfg)))). Definition orm_of_cfg := fst (snd (snd (snd (snd (snd cfg))))). Definition um_of_cfg := snd (snd (snd (snd (snd (snd cfg))))). Lemma cfg_comp : cfg = (bs_of_cfg, (share_of_cfg, (fl_of_cfg, (cnt_of_cfg, (negm_of_cfg, (orm_of_cfg, um_of_cfg)))))). Proof. unfold bs_of_cfg, share_of_cfg, fl_of_cfg, cnt_of_cfg, negm_of_cfg, (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : config_node_OK cfg node') (_ : @eq bool (Nleb (node_height cfg node') (node_height cfg node)) true) (_ : bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_forall x (bool_fun_of_BDD cfg node))), BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) bs (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) orm_of_cfg, um_of_cfg in |- *. elim cfg. intros y y0. elim y0. intros y1 y2. elim y2. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros y3 y4. elim y4. intros y5 y6. elim y6. intros y7 y8. elim y8. intros. (* Goal: @eq ad BDDone BDDone *) reflexivity. Qed. Lemma bs_of_cfg_OK : BDDstate_OK bs_of_cfg. Proof. (* Goal: BDDstate_OK bs_of_cfg *) exact (proj1 cfg_OK). Qed. Lemma share_of_cfg_OK : BDDsharing_OK bs_of_cfg share_of_cfg. Proof. (* Goal: BDDsharing_OK bs_of_cfg share_of_cfg *) exact (proj1 (proj2 cfg_OK)). Qed. Lemma fl_of_cfg_OK : BDDfree_list_OK bs_of_cfg fl_of_cfg cnt_of_cfg. Proof. (* Goal: BDDfree_list_OK bs_of_cfg fl_of_cfg cnt_of_cfg *) exact (proj1 (proj2 (proj2 cfg_OK))). Qed. Lemma cnt_of_cfg_OK : cnt_OK bs_of_cfg cnt_of_cfg. Proof. (* Goal: cnt_OK bs_of_cfg cnt_of_cfg *) exact (proj1 (proj2 (proj2 (proj2 cfg_OK)))). Qed. Lemma negm_of_cfg_OK : BDDneg_memo_OK bs_of_cfg negm_of_cfg. Proof. (* Goal: BDDneg_memo_OK bs_of_cfg negm_of_cfg *) exact (proj1 (proj2 (proj2 (proj2 (proj2 cfg_OK))))). Qed. Lemma orm_of_cfg_OK : BDDor_memo_OK bs_of_cfg orm_of_cfg. Proof. (* Goal: BDDor_memo_OK bs_of_cfg orm_of_cfg *) exact (proj1 (proj2 (proj2 (proj2 (proj2 (proj2 cfg_OK)))))). Qed. Lemma um_of_cfg_OK : BDDuniv_memo_OK bs_of_cfg um_of_cfg. Proof. (* Goal: BDDuniv_memo_OK bs_of_cfg um_of_cfg *) exact (proj2 (proj2 (proj2 (proj2 (proj2 (proj2 cfg_OK)))))). Qed. End Components. Lemma nodes_reachable_lemma_1 : forall (bs : BDDstate) (node node' : ad), nodes_reachable bs node node' -> node = node' \/ (exists x : BDDvar, (exists l : ad, (exists r : ad, MapGet _ bs node = Some (x, (l, r)) /\ (nodes_reachable bs l node' \/ nodes_reachable bs r node')))). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H. left. reflexivity. intros. right. split with x. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split with l. split with r. split. assumption. left; assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. right. split with x; split with l; split with r; split; [ assumption | right; assumption ]. Qed. Lemma nodes_reachable_trans : forall (bs : BDDstate) (node1 node2 node3 : ad), nodes_reachable bs node1 node2 -> nodes_reachable bs node2 node3 -> nodes_reachable bs node1 node3. Proof. (* Goal: forall (node : ad) (_ : nodes_reachable bs node node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs l node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs l node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) (* Goal: forall (node node' l r : ad) (x : BDDvar) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))) (_ : nodes_reachable bs r node') (_ : forall _ : nodes_reachable bs node' node3, nodes_reachable bs r node3) (_ : nodes_reachable bs node' node3), nodes_reachable bs node node3 *) intros bs node1 node2 node3. simple induction 1. trivial. intros. (* Goal: @In ad node0 ul *) apply nodes_reachable_1 with (x := x) (l := l) (r := r). assumption. apply H2. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) assumption. intros. apply nodes_reachable_2 with (x := x) (l := l) (r := r). (* Goal: @In ad node0 ul *) assumption. apply H2. assumption. Qed. Lemma reachable_node_OK_1 : forall (bs : BDDstate) (n : nat) (node1 node2 : ad), BDDstate_OK bs -> n = nat_of_N (bs_node_height bs node1) -> node_OK bs node1 -> nodes_reachable bs node1 node2 -> node_OK bs node2. Proof. (* Goal: forall (bs : BDDstate) (n : nat) (node1 node2 : ad) (_ : BDDstate_OK bs) (_ : @eq nat n (N.to_nat (bs_node_height bs node1))) (_ : node_OK bs node1) (_ : nodes_reachable bs node1 node2), node_OK bs node2 *) intros bs n. apply lt_wf_ind with (P := fun n : nat => forall node1 node2 : ad, BDDstate_OK bs -> n = nat_of_N (bs_node_height bs node1) -> node_OK bs node1 -> nodes_reachable bs node1 node2 -> node_OK bs node2). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim (nodes_reachable_lemma_1 _ _ _ H3). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) rewrite <- H4; assumption. intros. elim H4; clear H4; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H4; clear H4; intros. elim H4; clear H4; intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply H with (m := nat_of_N (bs_node_height bs x0)) (node1 := x0). rewrite H1. (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := x1). assumption. (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node1) (x := x) (r := x1). (* Goal: @In ad node0 ul *) assumption. assumption. assumption. apply H with (m := nat_of_N (bs_node_height bs x1)) (node1 := x1). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := x0). (* Goal: @In ad node0 ul *) assumption. assumption. assumption. reflexivity. (* Goal: @In ad node0 ul *) apply high_OK with (node := node1) (x := x) (l := x0). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma reachable_node_OK : forall (bs : BDDstate) (node1 node2 : ad), BDDstate_OK bs -> node_OK bs node1 -> nodes_reachable bs node1 node2 -> node_OK bs node2. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply reachable_node_OK_1 with (n := nat_of_N (bs_node_height bs node1)) (node1 := node1) (bs := bs). (* Goal: @In ad node0 ul *) assumption. reflexivity. assumption. assumption. Qed. Lemma nodes_reachableBDDzero : forall (bs : BDDstate) (node : ad), BDDstate_OK bs -> nodes_reachable bs BDDzero node -> node = BDDzero. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim (nodes_reachable_lemma_1 _ _ _ H0). intro. rewrite H1. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) reflexivity. intros. inversion H1. inversion H2. inversion H3. (* Goal: nodes_reachable bs' node node' *) inversion H4. rewrite (proj1 H) in H5. discriminate. Qed. Lemma nodes_reachableBDDone : forall (bs : BDDstate) (node : ad), BDDstate_OK bs -> nodes_reachable bs BDDone node -> node = BDDone. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim (nodes_reachable_lemma_1 _ _ _ H0). intro. rewrite H1. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) reflexivity. intros. inversion H1. inversion H2. inversion H3. (* Goal: nodes_reachable bs' node node' *) inversion H4. rewrite (proj1 (proj2 H)) in H5. discriminate. Qed. Lemma used_node'_used_node_bs : forall (bs : BDDstate) (ul : list ad) (node : ad), used_node_bs bs ul node -> used_node'_bs bs ul node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : @In ad node ul) (x : BDDvar) (l r node' : ad) (_ : nodes_reachable (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node node') (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) unfold used_node'_bs in |- *. tauto. Qed. Lemma high_used_bs : forall (bs : BDDstate) (ul : list ad) (x : BDDvar) (l r node : ad), used_node_bs bs ul node -> MapGet _ bs node = Some (x, (l, r)) -> used_node_bs bs ul r. Proof. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold used_node_bs in |- *. intros. elim H. intros. split with x0. split. (* Goal: @In ad x0 ul *) (* Goal: nodes_reachable bs x0 l *) exact (proj1 H1). apply nodes_reachable_trans with (node2 := node). (* Goal: nodes_reachable bs node r *) (* Goal: nodes_reachable bs r node' *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: node_OK bs r *) (* Goal: @eq nat (N.to_nat (bs_node_height bs r)) (N.to_nat (bs_node_height bs r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' l) (bool_fun_of_BDD_bs bs l) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) exact (proj2 H1). apply nodes_reachable_2 with (x := x) (l := l) (r := r). (* Goal: @In ad node0 ul *) assumption. apply nodes_reachable_0. Qed. Lemma high_used'_bs : forall (bs : BDDstate) (ul : list ad) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> used_node'_bs bs ul node -> MapGet _ bs node = Some (x, (l, r)) -> used_node'_bs bs ul r. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node'_bs in |- *. intros. elim H0. intro. rewrite H2 in H1. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (proj1 H) in H1. discriminate. intro. elim H2. intro. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite H3 in H1. rewrite (proj1 (proj2 H)) in H1. discriminate. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. right. right. apply high_used_bs with (x := x) (l := l) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma low_used_bs : forall (bs : BDDstate) (ul : list ad) (x : BDDvar) (l r node : ad), used_node_bs bs ul node -> MapGet _ bs node = Some (x, (l, r)) -> used_node_bs bs ul l. Proof. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold used_node_bs in |- *. intros. elim H. intros. split with x0. split. (* Goal: @In ad x0 ul *) (* Goal: nodes_reachable bs x0 l *) exact (proj1 H1). apply nodes_reachable_trans with (node2 := node). (* Goal: nodes_reachable bs node l *) (* Goal: nodes_reachable bs l node' *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x0 (@pair ad ad l0 r0))) *) (* Goal: node_OK bs l *) (* Goal: @eq nat (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) exact (proj2 H1). apply nodes_reachable_1 with (x := x) (l := l) (r := r). (* Goal: @In ad node0 ul *) assumption. apply nodes_reachable_0. Qed. Lemma low_used'_bs : forall (bs : BDDstate) (ul : list ad) (x : BDDvar) (l r node : ad), BDDstate_OK bs -> used_node'_bs bs ul node -> MapGet _ bs node = Some (x, (l, r)) -> used_node'_bs bs ul l. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node'_bs in |- *. intros. elim H0. intro. rewrite H2 in H1. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (proj1 H) in H1. discriminate. intro. elim H2. intro. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite H3 in H1. rewrite (proj1 (proj2 H)) in H1. discriminate. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. right. right. apply low_used_bs with (x := x) (r := r) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma high_used : forall (cfg : BDDconfig) (ul : list ad) (x : BDDvar) (l r node : ad), used_node cfg ul node -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> used_node cfg ul r. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node in |- *. intros. apply high_used_bs with (x := x) (l := l) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma high_used' : forall (cfg : BDDconfig) (ul : list ad) (x : BDDvar) (l r node : ad), BDDconfig_OK cfg -> used_node' cfg ul node -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> used_node' cfg ul r. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node' in |- *. intros. apply high_used'_bs with (x := x) (l := l) (node := node). (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. assumption. Qed. Lemma low_used : forall (cfg : BDDconfig) (ul : list ad) (x : BDDvar) (l r node : ad), used_node cfg ul node -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> used_node cfg ul l. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node in |- *. intros. apply low_used_bs with (x := x) (r := r) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma low_used' : forall (cfg : BDDconfig) (ul : list ad) (x : BDDvar) (l r node : ad), BDDconfig_OK cfg -> used_node' cfg ul node -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> used_node' cfg ul l. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node' in |- *. intros. apply low_used'_bs with (x := x) (r := r) (node := node). (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. assumption. Qed. Lemma used_node_OK_bs : forall (bs : BDDstate) (ul : list ad) (node : ad), BDDstate_OK bs -> used_list_OK_bs bs ul -> used_node_bs bs ul node -> node_OK bs node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H1. intros. elim H2; intros. (* Goal: @In ad node0 ul *) apply reachable_node_OK with (bs := bs) (node1 := x). assumption. apply H0. (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma used_node'_OK_bs : forall (bs : BDDstate) (ul : list ad) (node : ad), BDDstate_OK bs -> used_list_OK_bs bs ul -> used_node'_bs bs ul node -> node_OK bs node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H1. intros. elim H2; intros. left. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intro. elim H2. intros. right. left. assumption. intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H3. intros. elim H4. intros. (* Goal: @In ad node0 ul *) apply reachable_node_OK with (bs := bs) (node1 := x). assumption. apply H0. (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma used_node_OK : forall (cfg : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node cfg ul node -> config_node_OK cfg node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold config_node_OK in |- *. intros. apply used_node_OK_bs with (ul := ul). (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. assumption. Qed. Lemma used_node'_OK : forall (cfg : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> config_node_OK cfg node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold config_node_OK in |- *. intros. apply used_node'_OK_bs with (ul := ul). (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. assumption. Qed. Lemma nodes_preserved_used_nodes_preserved : forall (cfg cfg' : BDDconfig) (ul : list ad), nodes_preserved cfg cfg' -> used_nodes_preserved cfg cfg' ul. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (ul : list ad) (_ : nodes_preserved cfg cfg'), used_nodes_preserved cfg cfg' ul *) unfold nodes_preserved, used_nodes_preserved in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold nodes_preserved_bs, used_nodes_preserved_bs in |- *. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold node_preserved_bs in |- *. intros. apply H. assumption. Qed. Lemma node_preserved_bs_reachable_1 : forall bs bs' : BDDstate, BDDstate_OK bs -> forall (n : nat) (node node' : ad), n = nat_of_N (bs_node_height bs node) -> node_preserved_bs bs bs' node -> nodes_reachable bs node node' -> nodes_reachable bs' node node'. Proof. (* Goal: forall (bs bs' : BDDstate) (_ : BDDstate_OK bs) (n : nat) (node node' : ad) (_ : @eq nat n (N.to_nat (bs_node_height bs node))) (_ : node_preserved_bs bs bs' node) (_ : nodes_reachable bs node node'), nodes_reachable bs' node node' *) intros bs bs' H00 n. apply lt_wf_ind with (P := fun n : nat => forall node node' : ad, n = nat_of_N (bs_node_height bs node) -> node_preserved_bs bs bs' node -> nodes_reachable bs node node' -> nodes_reachable bs' node node'). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) clear n. intros. elim (nodes_reachable_lemma_1 bs node node' H2). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. rewrite H3. apply nodes_reachable_0. intro. inversion H3. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) inversion H4. inversion H5. inversion H6. elim H8. intro. (* Goal: nodes_reachable bs node node'0 *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node'0) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x2 (@pair ad ad l r))) *) (* Goal: nodes_reachable bs x0 node' *) (* Goal: forall _ : nodes_reachable bs x1 node', nodes_reachable bs' node node' *) apply nodes_reachable_1 with (x := x) (l := x0) (r := x1). apply H1. (* Goal: @In ad node0 ul *) apply nodes_reachable_0. assumption. (* Goal: lt (N.to_nat (bs_node_height bs1 l)) n0 *) (* Goal: @eq nat (N.to_nat (bs_node_height bs1 l)) (N.to_nat (bs_node_height bs1 l)) *) (* Goal: BDDstate_OK bs1 *) (* Goal: BDDstate_OK bs2 *) (* Goal: nodes_preserved_bs bs1 bs2 *) (* Goal: node_OK bs1 l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs2 node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs1 node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node) *) apply H with (m := nat_of_N (bs_node_height bs x0)). rewrite H0. (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := x1). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) assumption. reflexivity. unfold node_preserved_bs in |- *. intros. apply H1. (* Goal: @In ad node0 ul *) apply nodes_reachable_1 with (x := x) (l := x0) (r := x1). assumption. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. assumption. intro. (* Goal: bool_fun_eq (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (S (N.to_nat (bs_node_height bs l)))) *) (* Goal: lt (N.to_nat (bs_node_height bs r)) (N.to_nat (bs_node_height bs node)) *) (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r n) (bool_fun_of_BDD_1 bs l n) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end *) apply nodes_reachable_2 with (x := x) (l := x0) (r := x1). apply H1. (* Goal: @In ad node0 ul *) apply nodes_reachable_0. assumption. (* Goal: lt (N.to_nat (bs_node_height bs1 l)) n0 *) (* Goal: @eq nat (N.to_nat (bs_node_height bs1 l)) (N.to_nat (bs_node_height bs1 l)) *) (* Goal: BDDstate_OK bs1 *) (* Goal: BDDstate_OK bs2 *) (* Goal: nodes_preserved_bs bs1 bs2 *) (* Goal: node_OK bs1 l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs2 node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs1 node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node) *) apply H with (m := nat_of_N (bs_node_height bs x1)). rewrite H0. (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := x0). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) assumption. reflexivity. unfold node_preserved_bs in |- *. intros. apply H1. (* Goal: @In ad node0 ul *) apply nodes_reachable_2 with (x := x) (l := x0) (r := x1). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma node_preserved_bs_reachable : forall (bs bs' : BDDstate) (node node' : ad), BDDstate_OK bs -> node_preserved_bs bs bs' node -> nodes_reachable bs node node' -> nodes_reachable bs' node node'. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply node_preserved_bs_reachable_1 with (n := nat_of_N (bs_node_height bs node)) (bs := bs). (* Goal: @In ad node0 ul *) assumption. reflexivity. assumption. assumption. Qed. Lemma node_preserved_bs_trans : forall (bs1 bs2 bs3 : BDDstate) (node : ad), BDDstate_OK bs1 -> node_preserved_bs bs1 bs2 node -> node_preserved_bs bs2 bs3 node -> node_preserved_bs bs1 bs3 node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold node_preserved_bs in |- *. intros. apply H1. (* Goal: @In ad node0 ul *) apply node_preserved_bs_reachable with (bs := bs1). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. apply H0. assumption. assumption. Qed. Lemma used_nodes_preserved_trans : forall (cfg1 cfg2 cfg3 : BDDconfig) (ul : list ad), BDDconfig_OK cfg1 -> used_nodes_preserved cfg1 cfg2 ul -> used_nodes_preserved cfg2 cfg3 ul -> used_nodes_preserved cfg1 cfg3 ul. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_nodes_preserved in |- *. unfold used_nodes_preserved_bs in |- *. intros. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) apply node_preserved_bs_trans with (bs2 := fst cfg2). exact (proj1 H). (* Goal: @In ad node0 ul *) apply H0. assumption. apply H1. assumption. Qed. Lemma used_nodes_preserved_refl : forall (cfg : BDDconfig) (ul : list ad), used_nodes_preserved cfg cfg ul. Proof. (* Goal: forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad) (_ : used_nodes_preserved cfg cfg' (@cons ad node ul)), used_nodes_preserved cfg cfg' ul *) unfold used_nodes_preserved in |- *. unfold used_nodes_preserved_bs in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : @In ad node ul) (x : BDDvar) (l r node' : ad) (_ : nodes_reachable (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node node') (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)))), @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) unfold node_preserved_bs in |- *. tauto. Qed. Lemma BDDzero_preserved : forall bs bs' : BDDstate, BDDstate_OK bs -> node_preserved_bs bs bs' BDDzero. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_preserved_bs in |- *. intros. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (nodes_reachableBDDzero _ _ H H0) in H1. rewrite (proj1 H) in H1. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. Qed. Lemma BDDone_preserved : forall bs bs' : BDDstate, BDDstate_OK bs -> node_preserved_bs bs bs' BDDone. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_preserved_bs in |- *. intros. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node') (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) rewrite (nodes_reachableBDDone _ _ H H0) in H1. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite (proj1 (proj2 H)) in H1. discriminate. Qed. Lemma used_nodes_preserved_preserved_bs : forall (bs bs' : BDDstate) (ul : list ad) (node : ad), used_nodes_preserved_bs bs bs' ul -> used_node_bs bs ul node -> node_preserved_bs bs bs' node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H0. intros. elim H1; intros. unfold node_preserved_bs in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (node_preserved_bs bs bs' x). intro. apply H6. (* Goal: @In ad node0 ul *) apply nodes_reachable_trans with (node2 := node). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. apply H. assumption. Qed. Lemma used_nodes_preserved_preserved'_bs : forall (bs bs' : BDDstate) (ul : list ad) (node : ad), BDDstate_OK bs -> used_nodes_preserved_bs bs bs' ul -> used_node'_bs bs ul node -> node_preserved_bs bs bs' node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H1. intros. rewrite H2. apply BDDzero_preserved. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. intro. elim H2. intro. rewrite H3. apply BDDone_preserved. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. intro. apply used_nodes_preserved_preserved_bs with (ul := ul). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma node_preserved_OK_bs : forall (bs bs' : BDDstate) (node : ad), node_OK bs node -> node_preserved_bs bs bs' node -> node_OK bs' node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold node_preserved_bs in |- *. intros. elim H. left. assumption. intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim H1; intro. right; left; assumption. right; right. unfold in_dom in |- *. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y. elim y; intro. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) elim x. intros y0 y1. elim y1; intros y2 y3 y4. (* Goal: @eq ad BDDone BDDone *) rewrite (H0 _ _ _ _ (nodes_reachable_0 bs node) y4). reflexivity. intro y. (* Goal: @eq bool (N.eqb node BDDone) true *) unfold in_dom in H2. rewrite y in H2. discriminate. Qed. Lemma used_nodes_preserved_list_OK_bs : forall (bs bs' : BDDstate) (ul : list ad), used_list_OK_bs bs ul -> used_nodes_preserved_bs bs bs' ul -> used_list_OK_bs bs' ul. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_list_OK_bs, used_nodes_preserved_bs in |- *. intros. (* Goal: @In ad node0 ul *) apply node_preserved_OK_bs with (bs := bs). apply H. assumption. apply H0. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_nodes_preserved_list_OK : forall (cfg cfg' : BDDconfig) (ul : list ad), used_list_OK cfg ul -> used_nodes_preserved cfg cfg' ul -> used_list_OK cfg' ul. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_list_OK in |- *. intros. (* Goal: @In ad node0 ul *) apply used_nodes_preserved_list_OK_bs with (bs := fst cfg). assumption. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_node_cons_node_ul : forall (cfg : BDDconfig) (ul : list ad) (node : ad), used_node cfg (node :: ul) node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node in |- *. unfold used_node_bs in |- *. intros. split with node. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. simpl in |- *. left. reflexivity. apply nodes_reachable_0. Qed. Lemma used_node'_cons_node_ul : forall (cfg : BDDconfig) (ul : list ad) (node : ad), used_node' cfg (node :: ul) node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node' in |- *. unfold used_node'_bs in |- *. right. right. intros. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split with node. split. simpl in |- *. left. reflexivity. (* Goal: nodes_reachable bs node node *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply nodes_reachable_0. Qed. Lemma used_node_cons_node'_ul : forall (cfg : BDDconfig) (ul : list ad) (node node' : ad), used_node cfg ul node -> used_node cfg (node' :: ul) node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node in |- *. unfold used_node_bs in |- *. intros. elim H. intros. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split with x. split. simpl in |- *. right. exact (proj1 H0). (* Goal: nodes_reachable (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) x node *) exact (proj2 H0). Qed. Lemma used_node'_cons_node'_ul : forall (cfg : BDDconfig) (ul : list ad) (node node' : ad), used_node' cfg ul node -> used_node' cfg (node' :: ul) node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H. intro. left. assumption. intro. elim H0. intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) right. left. assumption. intro. right. right. (* Goal: used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@cons ad node' ul) node *) fold (used_node cfg (node' :: ul) node) in |- *. apply used_node_cons_node'_ul. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_nodes_preserved_bs_cons : forall (bs bs' : BDDstate) (ul : list ad) (node : ad), used_nodes_preserved_bs bs bs' (node :: ul) -> used_nodes_preserved_bs bs bs' ul. Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) unfold used_nodes_preserved_bs in |- *. intros. apply H. simpl in |- *. right. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_nodes_preserved_cons : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), used_nodes_preserved cfg cfg' (node :: ul) -> used_nodes_preserved cfg cfg' ul. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_nodes_preserved in |- *. unfold used_nodes_preserved_bs in |- *. intros. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) apply H. simpl in |- *. right. assumption. Qed. Lemma node_OK_list_OK_bs : forall (bs : BDDstate) (ul : list ad) (node : ad), node_OK bs node -> used_list_OK_bs bs ul -> used_list_OK_bs bs (node :: ul). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_list_OK_bs in |- *. intros. elim (in_inv H1). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite <- H2; assumption. intro. apply H0; assumption. Qed. Lemma node_OK_list_OK : forall (cfg : BDDconfig) (ul : list ad) (node : ad), config_node_OK cfg node -> used_list_OK cfg ul -> used_list_OK cfg (node :: ul). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_list_OK in |- *. intros. apply node_OK_list_OK_bs. assumption. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_nodes_preserved_node_OK : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node cfg ul node -> used_nodes_preserved cfg cfg' ul -> config_node_OK cfg' node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold config_node_OK in |- *. (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg') node *) apply node_preserved_OK_bs with (bs := fst cfg). (* Goal: @In ad node0 ul *) apply used_node_OK_bs with (ul := ul). exact (proj1 H). assumption. (* Goal: @In ad node0 ul *) assumption. apply used_nodes_preserved_preserved_bs with (ul := ul). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma used_nodes_preserved_node_OK' : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> used_nodes_preserved cfg cfg' ul -> config_node_OK cfg' node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold config_node_OK in |- *. (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg') node *) apply node_preserved_OK_bs with (bs := fst cfg). (* Goal: @In ad node0 ul *) apply used_node'_OK_bs with (ul := ul). exact (proj1 H). assumption. (* Goal: @In ad node0 ul *) assumption. apply used_nodes_preserved_preserved'_bs with (ul := ul). (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. assumption. Qed. Lemma used_nodes_preserved_used_node : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_nodes_preserved cfg cfg' ul -> used_node cfg ul node -> used_node cfg' ul node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_node in |- *. unfold used_node_bs in |- *. intros. inversion H1. split with x. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. exact (proj1 H2). (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) apply node_preserved_bs_reachable with (bs := fst cfg). exact (proj1 H). (* Goal: @In ad node0 ul *) apply used_nodes_preserved_preserved_bs with (ul := ul). assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split with x. split. exact (proj1 H2). apply nodes_reachable_0. (* Goal: nodes_reachable (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) x node *) exact (proj2 H2). Qed. Lemma used_nodes_preserved_used_node' : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_nodes_preserved cfg cfg' ul -> used_node' cfg ul node -> used_node' cfg' ul node. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H1. intro. left. assumption. intro. elim H2. intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) right. left. assumption. intro. right. right. (* Goal: used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg') ul node *) fold (used_node cfg' ul node) in |- *. (* Goal: @In ad node0 ul *) apply used_nodes_preserved_used_node with (cfg := cfg). assumption. (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma bool_fun_of_BDD_1_change_bound : forall bs : BDDstate, BDDstate_OK bs -> forall (bound : nat) (node : ad), nat_of_N (bs_node_height bs node) < bound -> bool_fun_eq (bool_fun_of_BDD_1 bs node bound) (bool_fun_of_BDD_1 bs node (S (nat_of_N (bs_node_height bs node)))). Proof. (* Goal: forall (bs : BDDstate) (_ : BDDstate_OK bs) (bound : nat) (node : ad) (_ : lt (N.to_nat (bs_node_height bs node)) bound), bool_fun_eq (bool_fun_of_BDD_1 bs node bound) (bool_fun_of_BDD_1 bs node (S (N.to_nat (bs_node_height bs node)))) *) intros bs H bound. apply lt_wf_ind with (P := fun bound : nat => forall node : ad, nat_of_N (bs_node_height bs node) < bound -> bool_fun_eq (bool_fun_of_BDD_1 bs node bound) (bool_fun_of_BDD_1 bs node (S (nat_of_N (bs_node_height bs node))))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intro. elim n. intros. absurd (nat_of_N (bs_node_height bs node) < 0). (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) apply lt_n_O. assumption. clear n bound. intros. simpl in |- *. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y. elim y; clear y. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8)))))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) y5 (@pair BDDneg_memo (prod BDDor_memo BDDuniv_memo) y7 y8))))) node))), BDDconfig_OK (let (orm, um) := y8 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) intro x. elim x; clear x. intros x y. elim y; clear y; intros l r H3. (* Goal: @eq bool (N.eqb node BDDone) true *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite H3. cut (nat_of_N (bs_node_height bs l) < nat_of_N (bs_node_height bs node)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) cut (nat_of_N (bs_node_height bs r) < nat_of_N (bs_node_height bs node)). intros. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs' r) (bool_fun_of_BDD_bs bs' l)) (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bool_fun_of_BDD_1 bs r (S (nat_of_N (bs_node_height bs r)))). (* Goal: bool_fun_eq (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (S (N.to_nat (bs_node_height bs l)))) *) (* Goal: lt (N.to_nat (bs_node_height bs r)) (N.to_nat (bs_node_height bs node)) *) (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r n) (bool_fun_of_BDD_1 bs l n) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end *) apply H1. unfold lt in |- *. apply le_n. apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_sym. apply H1. assumption. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bool_fun_of_BDD_1 bs l (S (nat_of_N (bs_node_height bs l)))). (* Goal: bool_fun_eq (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (S (N.to_nat (bs_node_height bs l)))) *) (* Goal: lt (N.to_nat (bs_node_height bs r)) (N.to_nat (bs_node_height bs node)) *) (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r n) (bool_fun_of_BDD_1 bs l n) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => bool_fun_if x (bool_fun_of_BDD_1 bs r (N.to_nat (bs_node_height bs node))) (bool_fun_of_BDD_1 bs l (N.to_nat (bs_node_height bs node))) | None => if N.eqb node BDDzero then bool_fun_zero else bool_fun_one end *) apply H1. unfold lt in |- *. apply le_n. apply lt_trans_1 with (y := nat_of_N (bs_node_height bs node)). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_sym. apply H1. assumption. (* Goal: @In ad node0 ul *) assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := l). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. intro y. rewrite y. apply bool_fun_eq_refl. Qed. Lemma bool_fun_of_BDD_bs_zero : forall bs : BDDstate, BDDstate_OK bs -> bool_fun_eq (bool_fun_of_BDD_bs bs BDDzero) bool_fun_zero. Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intros. unfold bool_fun_eq in |- *. intros. unfold bool_fun_of_BDD_bs in |- *. simpl in |- *. (* Goal: @eq ad BDDone BDDone *) unfold BDDstate_OK in H. rewrite (proj1 H). reflexivity. Qed. Lemma bool_fun_of_BDD_bs_one : forall bs : BDDstate, BDDstate_OK bs -> bool_fun_eq (bool_fun_of_BDD_bs bs BDDone) bool_fun_one. Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intros. unfold bool_fun_eq in |- *. intros. unfold bool_fun_of_BDD_bs in |- *. simpl in |- *. (* Goal: @eq ad BDDone BDDone *) unfold BDDstate_OK in H. rewrite (proj1 (proj2 H)). reflexivity. Qed. Lemma bool_fun_of_BDD_bs_int : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)). Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) intros. unfold bool_fun_of_BDD_bs at 1 in |- *. simpl in |- *. rewrite H0. apply bool_fun_if_preserves_eq. (* Goal: @In ad node0 ul *) unfold bool_fun_of_BDD_bs in |- *. apply bool_fun_of_BDD_1_change_bound. assumption. (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := l). assumption. (* Goal: @In ad node0 ul *) assumption. unfold bool_fun_of_BDD_bs in |- *. apply bool_fun_of_BDD_1_change_bound. (* Goal: @In ad node0 ul *) assumption. apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma bool_fun_of_BDD_one : forall cfg : BDDconfig, BDDconfig_OK cfg -> bool_fun_eq (bool_fun_of_BDD cfg BDDone) bool_fun_one. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold bool_fun_of_BDD in |- *. intros. apply bool_fun_of_BDD_bs_one. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) exact (proj1 H). Qed. Lemma bool_fun_of_BDD_zero : forall cfg : BDDconfig, BDDconfig_OK cfg -> bool_fun_eq (bool_fun_of_BDD cfg BDDzero) bool_fun_zero. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold bool_fun_of_BDD in |- *. intros. apply bool_fun_of_BDD_bs_zero. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) exact (proj1 H). Qed. Lemma bool_fun_of_BDD_int : forall (cfg : BDDconfig) (x : BDDvar) (l r node : ad), BDDconfig_OK cfg -> MapGet _ (fst cfg) node = Some (x, (l, r)) -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold bool_fun_of_BDD in |- *. intros. apply bool_fun_of_BDD_bs_int. (* Goal: @In ad node0 ul *) exact (proj1 H). assumption. Qed. Lemma bool_fun_of_BDD_1_ext : forall (bound : nat) (bs : BDDstate) (node : ad), bool_fun_ext (bool_fun_of_BDD_1 bs node bound). Proof. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) simple induction bound. intros. simpl in |- *. exact bool_fun_ext_zero. simpl in |- *. intros. elim (MapGet _ bs node). Focus 2. elim (Neqb node BDDzero). exact bool_fun_ext_zero. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) exact bool_fun_ext_one. intro a. elim a. intros y y0. elim y0. intros. (* Goal: node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) apply bool_fun_ext_if. apply H. apply H. Qed. Lemma bool_fun_of_BDD_bs_ext : forall (bs : BDDstate) (node : ad), bool_fun_ext (bool_fun_of_BDD_bs bs node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold bool_fun_of_BDD_bs in |- *. apply bool_fun_of_BDD_1_ext. Qed. Lemma BDDvar_independent_1 : forall bs : BDDstate, BDDstate_OK bs -> forall (n : nat) (node : ad) (x : BDDvar), n = nat_of_N (bs_node_height bs node) -> node_OK bs node -> Nleb (bs_node_height bs node) x = true -> bool_fun_independent (bool_fun_of_BDD_bs bs node) x. Proof. (* Goal: forall (bs : BDDstate) (_ : BDDstate_OK bs) (n : nat) (node : ad) (x : BDDvar) (_ : @eq nat n (N.to_nat (bs_node_height bs node))) (_ : node_OK bs node) (_ : @eq bool (Nleb (bs_node_height bs node) x) true), bool_fun_independent (bool_fun_of_BDD_bs bs node) x *) intros bs H n. apply lt_wf_ind with (P := fun n : nat => forall (node : ad) (x : BDDvar), n = nat_of_N (bs_node_height bs node) -> node_OK bs node -> Nleb (bs_node_height bs node) x = true -> bool_fun_independent (bool_fun_of_BDD_bs bs node) x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H2; intro. rewrite H4. apply bool_fun_eq_independent with (bf1 := bool_fun_zero). (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_zero. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) apply bool_fun_independent_zero. elim H4; clear H4; intro. rewrite H4. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_independent with (bf1 := bool_fun_one). apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_one. assumption. apply bool_fun_independent_one. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim (option_sum _ (MapGet _ bs node)). intro y. elim y; clear y; intro x0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x0), bool_fun_independent (bool_fun_of_BDD_bs bs node) x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_independent (bool_fun_of_BDD_bs bs node) x *) elim x0; clear x0. intros x' y. elim y; clear y; intros l r H5. apply bool_fun_eq_independent with (bf1 := bool_fun_if x' (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)). (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_int. assumption. assumption. (* Goal: bool_fun_independent (bool_fun_if x' (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) x *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_independent (bool_fun_of_BDD_bs bs node) x *) apply bool_fun_independent_if. apply H0 with (m := nat_of_N (bs_node_height bs r)). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply BDDcompare_lt. apply bs_node_height_right with (x := x') (l := l). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply high_OK with (x := x') (l := l) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. unfold Nleb in |- *. apply leb_correct. apply lt_le_weak. (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: BDDstate_OK bs *) (* Goal: BDDstate_OK bs' *) (* Goal: node_preserved_bs bs bs' l *) (* Goal: node_OK bs l *) (* Goal: @eq nat (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply lt_le_trans with (m := nat_of_N (bs_node_height bs node)). apply BDDcompare_lt. (* Goal: @In ad node0 ul *) apply bs_node_height_right with (x := x') (l := l). assumption. assumption. (* Goal: @In ad node0 ul *) apply leb_complete. assumption. apply H0 with (m := nat_of_N (bs_node_height bs l)). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply BDDcompare_lt. apply bs_node_height_left with (x := x') (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (x := x') (r := r) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. unfold Nleb in |- *. apply leb_correct. apply lt_le_weak. (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: BDDstate_OK bs *) (* Goal: BDDstate_OK bs' *) (* Goal: node_preserved_bs bs bs' l *) (* Goal: node_OK bs l *) (* Goal: @eq nat (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply lt_le_trans with (m := nat_of_N (bs_node_height bs node)). apply BDDcompare_lt. (* Goal: @In ad node0 ul *) apply bs_node_height_left with (x := x') (r := r). assumption. assumption. (* Goal: @In ad node0 ul *) apply leb_complete. assumption. unfold bs_node_height in H3. rewrite H5 in H3. (* Goal: @eq bool (N.eqb x' x) false *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_independent (bool_fun_of_BDD_bs bs node) x *) rewrite (Neqb_comm x x'). apply ad_S_le_then_neq. assumption. intro y. (* Goal: @eq bool (N.eqb node BDDone) true *) unfold in_dom in H4. rewrite y in H4; discriminate. Qed. Lemma BDDvar_independent_bs : forall bs : BDDstate, BDDstate_OK bs -> forall (node : ad) (x : BDDvar), node_OK bs node -> Nleb (bs_node_height bs node) x = true -> bool_fun_independent (bool_fun_of_BDD_bs bs node) x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply BDDvar_independent_1 with (n := nat_of_N (bs_node_height bs node)). (* Goal: @In ad node0 ul *) assumption. reflexivity. assumption. assumption. Qed. Lemma BDDvar_independent_low : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> bool_fun_independent (bool_fun_of_BDD_bs bs l) x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply BDDvar_independent_1 with (n := nat_of_N (bs_node_height bs l)). (* Goal: @In ad node0 ul *) assumption. reflexivity. apply low_OK with (x := x) (r := r) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. apply bs_node_height_left_le with (node := node) (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma BDDvar_independent_high : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> bool_fun_independent (bool_fun_of_BDD_bs bs r) x. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply BDDvar_independent_1 with (n := nat_of_N (bs_node_height bs r)). (* Goal: @In ad node0 ul *) assumption. reflexivity. apply high_OK with (x := x) (l := l) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. apply bs_node_height_right_le with (node := node) (l := l). (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma bool_fun_of_BDD_bs_high : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> bool_fun_eq (bool_fun_of_BDD_bs bs r) (bool_fun_restrict (bool_fun_of_BDD_bs bs node) x true). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) x true). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_if_restrict_true_independent. (* Goal: @In ad node0 ul *) apply BDDvar_independent_high with (node := node) (l := l). assumption. assumption. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_int. assumption. assumption. Qed. Lemma bool_fun_of_BDD_bs_low : forall bs : BDDstate, BDDstate_OK bs -> forall (x : BDDvar) (l r node : ad), MapGet _ bs node = Some (x, (l, r)) -> bool_fun_eq (bool_fun_of_BDD_bs bs l) (bool_fun_restrict (bool_fun_of_BDD_bs bs node) x false). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) x false). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_if_restrict_false_independent. (* Goal: @In ad node0 ul *) apply BDDvar_independent_low with (node := node) (r := r). assumption. assumption. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_int. assumption. assumption. Qed. Lemma BDDunique_1 : forall (bs : BDDstate) (share : BDDsharing_map), BDDstate_OK bs -> BDDsharing_OK bs share -> forall (n : nat) (node1 node2 : ad), n = max (nat_of_N (bs_node_height bs node1)) (nat_of_N (bs_node_height bs node2)) -> node_OK bs node1 -> node_OK bs node2 -> bool_fun_eq (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2) -> node1 = node2. Proof. (* Goal: forall (bs : BDDstate) (share : BDDsharing_map) (_ : BDDstate_OK bs) (_ : BDDsharing_OK bs share) (n : nat) (node1 node2 : ad) (_ : @eq nat n (max (N.to_nat (bs_node_height bs node1)) (N.to_nat (bs_node_height bs node2)))) (_ : node_OK bs node1) (_ : node_OK bs node2) (_ : bool_fun_eq (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)), @eq ad node1 node2 *) intros bs share H H00 n. apply lt_wf_ind with (P := fun n : nat => forall node1 node2 : ad, n = max (nat_of_N (bs_node_height bs node1)) (nat_of_N (bs_node_height bs node2)) -> node_OK bs node1 -> node_OK bs node2 -> bool_fun_eq (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2) -> node1 = node2). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H2; intro. elim H3; intro. rewrite H5. rewrite H6. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) reflexivity. elim H6; clear H6; intro. absurd (bool_fun_eq bool_fun_zero bool_fun_one). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold not, bool_fun_eq, bool_fun_zero, bool_fun_one in |- *. intro. absurd (false = true). (* Goal: forall _ : @eq bool true false, False *) (* Goal: @eq bool (N.eqb node node) false *) (* Goal: @eq bool (Nleb (ad_S node) node) true *) unfold not in |- *; intro; discriminate. apply H7. exact (fun _ : BDDvar => true). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false) (bool_fun_of_BDD_bs bs r1) *) (* Goal: bool_fun_independent (bool_fun_of_BDD_bs bs node1) x1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node1). (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. rewrite H5. apply bool_fun_of_BDD_bs_zero. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node2). assumption. (* Goal: @In ad node0 ul *) rewrite H6. apply bool_fun_of_BDD_bs_one. assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim (option_sum _ (MapGet _ bs node2)). intro y. elim y; clear y; intro x. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) elim x; clear x. intros x2 y. elim y; clear y; intros l2 r2 H7. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) absurd (l2 = r2). unfold not in |- *; intro. cut (Neqb l2 r2 = true). intro. (* Goal: False *) (* Goal: @eq bool (N.eqb l2 r2) true *) (* Goal: @eq ad l2 r2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) rewrite (proj1 (internal_node_lemma bs x2 l2 r2 node2 H H7)) in H9. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. rewrite H8. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l2)) (nat_of_N (bs_node_height bs r2))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_2. apply BDDcompare_lt. apply bs_node_height_left with (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node2) (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node2) (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r2). assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 true). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 false). (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 true). (* Goal: @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) (* Goal: forall _ : used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul node, @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) rewrite H5. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero x2 false). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node bs) true), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_restrict_preserves_eq. apply bool_fun_of_BDD_bs_zero. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_zero). (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_zero x1 true) bool_fun_zero *) (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_zero x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs BDDzero) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) (bool_fun_of_BDD_bs bs r1) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_restrict_zero. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero x2 true). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_restrict_zero. apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_zero. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. assumption. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_high with (l := l2). assumption. assumption. intro y. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold in_dom in H6. rewrite y in H6. discriminate. elim H5; clear H5; intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim H3; intro. absurd (bool_fun_eq bool_fun_one bool_fun_zero). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold not in |- *; intro. unfold bool_fun_eq, bool_fun_one, bool_fun_zero in H7. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (true = false). intro. discriminate. apply H7. exact (fun _ : BDDvar => true). (* Goal: @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) (* Goal: forall _ : used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul node, @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node1). rewrite H5. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_one. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node2). assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite H6. apply bool_fun_of_BDD_bs_zero. assumption. elim H6; clear H6; intro. (* Goal: @eq ad BDDone BDDone *) rewrite H5. rewrite H6. reflexivity. elim (option_sum _ (MapGet _ bs node2)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro y. elim y; clear y; intro. elim x; clear x. intros x2 y. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim y; clear y; intros l2 r2 H7. absurd (l2 = r2). unfold not in |- *; intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb l2 r2 = true). intro. (* Goal: False *) (* Goal: @eq bool (N.eqb l2 r2) true *) (* Goal: @eq ad l2 r2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: @eq ad node1 node2 *) rewrite (proj1 (internal_node_lemma bs x2 l2 r2 node2 H H7)) in H9. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. rewrite H8. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l2)) (nat_of_N (bs_node_height bs r2))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_2. apply BDDcompare_lt. apply bs_node_height_left with (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node2) (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node2) (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r2). assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 true). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 false). (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 true). (* Goal: @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) (* Goal: forall _ : used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul node, @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) rewrite H5. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one x2 false). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs BDDone) bool_fun_one *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_restrict_preserves_eq. apply bool_fun_of_BDD_bs_one. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_one). (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_one x1 true) bool_fun_one *) (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_one x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs BDDone) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) (bool_fun_of_BDD_bs bs r1) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_restrict_one. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one x2 true). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_restrict_one. apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_one. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. assumption. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_high with (l := l2). assumption. assumption. intro y. (* Goal: @eq bool (N.eqb node BDDone) true *) unfold in_dom in H6. rewrite y in H6. discriminate. elim (option_sum _ (MapGet _ bs node1)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro y. elim y; clear y; intro. elim x; clear x. intros x1 y. elim y; clear y. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intros l1 r1 H6. elim H3; intro. absurd (l1 = r1). unfold not in |- *; intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb l1 r1 = true). intro. rewrite (proj1 (internal_node_lemma bs x1 l1 r1 node1 H H6)) in H9. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. rewrite H8. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l1)) (nat_of_N (bs_node_height bs r1))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_1. apply BDDcompare_lt. apply bs_node_height_left with (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node1) (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node1) (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r1). assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. assumption. rewrite H7. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero x1 false). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node bs) true), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_restrict_preserves_eq. apply bool_fun_of_BDD_bs_zero. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true). (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_one x1 false) (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) (bool_fun_of_BDD_bs bs r1) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H7. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_zero x1 true). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' BDDzero) (bool_fun_of_BDD_bs bs BDDzero) *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node bs) true), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_trans with (bf2 := bool_fun_zero). apply bool_fun_restrict_zero. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_restrict_zero. apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_zero. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_high with (l := l1). assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. elim H7; clear H7; intro. absurd (l1 = r1). unfold not in |- *; intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb l1 r1 = true). intro. (* Goal: False *) (* Goal: @eq bool (N.eqb l1 r1) true *) (* Goal: @eq ad l1 r1 *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite (proj1 (internal_node_lemma bs x1 l1 r1 node1 H H6)) in H9. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. rewrite H8. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l1)) (nat_of_N (bs_node_height bs r1))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_1. apply BDDcompare_lt. apply bs_node_height_left with (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node1) (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node1) (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r1). assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. assumption. rewrite H7. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. apply bool_fun_of_BDD_bs_one. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true). apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true). (* Goal: bool_fun_eq (bool_fun_restrict bool_fun_one x1 false) (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x1 true) (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true) (bool_fun_of_BDD_bs bs r1) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H7. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bool_fun_one x1 true). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' BDDone) (bool_fun_of_BDD_bs bs BDDone) *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_trans with (bf2 := bool_fun_one). apply bool_fun_restrict_one. (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply bool_fun_restrict_one. apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_one. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. assumption. (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_high with (l := l1). assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. elim (option_sum _ (MapGet _ bs node2)). intro y. elim y; clear y; intro. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) elim x; clear x. intros x2 y. elim y; clear y; intros l2 r2 H8. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim (relation_sum (BDDcompare x1 x2)). intro y. elim y; clear y; intro y. apply no_duplicate_node with (x := x1) (l := l1) (r := r1) (bs := bs) (share := share). (* Goal: @In ad node0 ul *) assumption. assumption. assumption. rewrite H8. cut (l1 = l2). cut (r1 = r2). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. rewrite H9. rewrite H10. rewrite (BDD_EGAL_complete _ _ y). (* Goal: @eq ad BDDone BDDone *) reflexivity. apply H0 with (m := max (nat_of_N (bs_node_height bs r1)) (nat_of_N (bs_node_height bs r2))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_1_2. apply BDDcompare_lt. apply bs_node_height_right with (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply high_OK with (node := node1) (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node2) (x := x2) (l := l2). assumption. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_high with (l := l1). assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 true). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 false) (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false) (bool_fun_of_BDD_bs bs l2) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq comparison (BDDcompare x1 x2) Gt, @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite (BDD_EGAL_complete _ _ y). apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_high with (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. apply H0 with (m := max (nat_of_N (bs_node_height bs l1)) (nat_of_N (bs_node_height bs l2))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_1_2. apply BDDcompare_lt. apply bs_node_height_left with (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_left with (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node1) (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply low_OK with (node := node2) (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r1). assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false). (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x2 false) (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false) *) (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false) (bool_fun_of_BDD_bs bs l2) *) (* Goal: @eq ad node1 node2 *) (* Goal: forall _ : @eq comparison (BDDcompare x1 x2) Gt, @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite (BDD_EGAL_complete _ _ y). apply bool_fun_restrict_preserves_eq. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_low with (r := r2). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. assumption. absurd (l2 = r2). unfold not in |- *; intro. cut (Neqb l2 r2 = true). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. rewrite (proj1 (internal_node_lemma bs x2 l2 r2 node2 H H8)) in H10. (* Goal: @eq bool (N.eqb l1 r1) true *) (* Goal: @eq ad l1 r1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) discriminate. rewrite H9. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l2)) (nat_of_N (bs_node_height bs r2))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_2. apply BDDcompare_lt. apply bs_node_height_left with (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node2) (x := x2) (r := r2). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node2) (x := x2) (l := l2). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r2). assumption. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (bool_fun_independent (bool_fun_of_BDD_bs bs node2) x2). intro. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 false) (bool_fun_of_BDD_bs bs r2) *) (* Goal: bool_fun_independent (bool_fun_of_BDD_bs bs node2) x2 *) (* Goal: forall _ : @eq comparison (BDDcompare x1 x2) Gt, @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node2). apply H9. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node2) x2 true). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply H9. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_high with (l := l2). assumption. assumption. (* Goal: bool_fun_independent (bool_fun_of_BDD_bs bs node2) x2 *) (* Goal: forall _ : @eq comparison (BDDcompare x1 x2) Gt, @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_eq_independent with (bf1 := bool_fun_of_BDD_bs bs node1). (* Goal: @In ad node0 ul *) assumption. apply BDDvar_independent_bs. assumption. assumption. (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) unfold Nleb in |- *. apply leb_correct. unfold bs_node_height in |- *. rewrite H6. (* Goal: @In ad node0 ul *) rewrite (ad_S_is_S x1). apply lt_le_S. apply BDDcompare_lt. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. absurd (l1 = r1). unfold not in |- *; intro. cut (Neqb l1 r1 = true). intro. (* Goal: False *) (* Goal: @eq bool (N.eqb l1 r1) true *) (* Goal: @eq ad l1 r1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite (proj1 (internal_node_lemma bs x1 l1 r1 node1 H H6)) in H10. (* Goal: @eq bool (N.eqb l1 r1) true *) (* Goal: @eq ad l1 r1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) discriminate. rewrite H9. apply Neqb_correct. apply H0 with (m := max (nat_of_N (bs_node_height bs l1)) (nat_of_N (bs_node_height bs r1))). (* Goal: lt (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) n0 *) (* Goal: @eq nat (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) (max (N.to_nat (bs_node_height bs l1)) (N.to_nat (bs_node_height bs r1))) *) (* Goal: node_OK bs l1 *) (* Goal: node_OK bs r1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs l1) (bool_fun_of_BDD_bs bs r1) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) rewrite H1. apply lt_max_1. apply BDDcompare_lt. apply bs_node_height_left with (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply BDDcompare_lt. apply bs_node_height_right with (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. apply low_OK with (node := node1) (x := x1) (r := r1). (* Goal: @In ad node0 ul *) assumption. assumption. apply high_OK with (node := node1) (x := x1) (l := l1). (* Goal: @In ad node0 ul *) assumption. assumption. apply bool_fun_eq_trans with (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_low with (r := r1). assumption. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (bool_fun_independent (bool_fun_of_BDD_bs bs node1) x1). intro. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 false) (bool_fun_of_BDD_bs bs r1) *) (* Goal: bool_fun_independent (bool_fun_of_BDD_bs bs node1) x1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node1). apply H9. apply bool_fun_eq_trans with (bf2 := bool_fun_restrict (bool_fun_of_BDD_bs bs node1) x1 true). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_sym. apply H9. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_high with (l := l1). assumption. assumption. (* Goal: bool_fun_independent (bool_fun_of_BDD_bs bs node1) x1 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node2) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node1) (@None (prod BDDvar (prod ad ad))), @eq ad node1 node2 *) apply bool_fun_eq_independent with (bf1 := bool_fun_of_BDD_bs bs node2). (* Goal: @In ad node0 ul *) apply bool_fun_eq_sym. assumption. apply BDDvar_independent_bs. assumption. (* Goal: @In ad node0 ul *) assumption. unfold Nleb in |- *. apply leb_correct. unfold bs_node_height in |- *. (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: BDDstate_OK bs *) (* Goal: BDDstate_OK bs' *) (* Goal: node_preserved_bs bs bs' l *) (* Goal: node_OK bs l *) (* Goal: @eq nat (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) rewrite H8. rewrite (ad_S_is_S x2). apply lt_le_S. apply BDDcompare_lt. (* Goal: @In ad node0 ul *) apply BDDcompare_sup_inf. assumption. intro y. unfold in_dom in H7. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) rewrite y in H7; discriminate. intro y. unfold in_dom in H5. (* Goal: @eq bool (N.eqb node BDDone) true *) rewrite y in H5; discriminate. Qed. Lemma BDDunique : forall (cfg : BDDconfig) (node1 node2 : ad), BDDconfig_OK cfg -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> bool_fun_eq (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2) -> Neqb node1 node2 = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. cut (node1 = node2). intro. rewrite H3. apply Neqb_correct. apply BDDunique_1 with (bs := fst cfg) (share := fst (snd cfg)) (n := max (nat_of_N (bs_node_height (fst cfg) node1)) (nat_of_N (bs_node_height (fst cfg) node2))). (* Goal: @eq ad BDDone BDDone *) exact (proj1 H). exact (proj1 (proj2 H)). reflexivity. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. Qed. Lemma nodes_preserved_bs_bool_fun_1 : forall (bs1 bs2 : BDDstate) (n : nat) (node : ad), n = nat_of_N (bs_node_height bs1 node) -> BDDstate_OK bs1 -> BDDstate_OK bs2 -> nodes_preserved_bs bs1 bs2 -> node_OK bs1 node -> bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node). Proof. (* Goal: forall (bs1 bs2 : BDDstate) (n : nat) (node : ad) (_ : @eq nat n (N.to_nat (bs_node_height bs1 node))) (_ : BDDstate_OK bs1) (_ : BDDstate_OK bs2) (_ : nodes_preserved_bs bs1 bs2) (_ : node_OK bs1 node), bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node) *) intros bs1 bs2 n. apply lt_wf_ind with (P := fun n : nat => forall node : ad, n = nat_of_N (bs_node_height bs1 node) -> BDDstate_OK bs1 -> BDDstate_OK bs2 -> nodes_preserved_bs bs1 bs2 -> node_OK bs1 node -> bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H4; intro. rewrite H5. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs BDDzero) bool_fun_zero *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node bs) true), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_trans with (bf2 := bool_fun_zero). apply bool_fun_of_BDD_bs_zero. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_zero. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) assumption. elim H5; intro. rewrite H6. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs BDDone) bool_fun_one *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_trans with (bf2 := bool_fun_one). apply bool_fun_of_BDD_bs_one. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_one. (* Goal: @In ad node0 ul *) assumption. elim (option_sum _ (MapGet _ bs1 node)). intro y. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim y; clear y. intro. elim x; clear x; intros x y. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x y)), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) elim y; clear y; intros l r H7. cut (MapGet _ bs2 node = Some (x, (l, r))). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. cut (bool_fun_eq (bool_fun_of_BDD_bs bs2 l) (bool_fun_of_BDD_bs bs1 l)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) cut (bool_fun_eq (bool_fun_of_BDD_bs bs2 r) (bool_fun_of_BDD_bs bs1 r)). intros. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD_bs bs2 r) (bool_fun_of_BDD_bs bs2 l)). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_int. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD_bs bs1 r) (bool_fun_of_BDD_bs bs1 l)). (* Goal: @In ad node0 ul *) apply bool_fun_if_preserves_eq. assumption. assumption. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_int. assumption. assumption. (* Goal: lt (N.to_nat (bs_node_height bs1 l)) n0 *) (* Goal: @eq nat (N.to_nat (bs_node_height bs1 l)) (N.to_nat (bs_node_height bs1 l)) *) (* Goal: BDDstate_OK bs1 *) (* Goal: BDDstate_OK bs2 *) (* Goal: nodes_preserved_bs bs1 bs2 *) (* Goal: node_OK bs1 l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs2 node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs1 node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node) *) apply H with (m := nat_of_N (bs_node_height bs1 r)). rewrite H0. apply BDDcompare_lt. (* Goal: @In ad node0 ul *) apply bs_node_height_right with (x := x) (l := l). assumption. assumption. reflexivity. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. apply high_OK with (x := x) (l := l) (node := node). (* Goal: @In ad node0 ul *) assumption. assumption. apply H with (m := nat_of_N (bs_node_height bs1 l)). (* Goal: lt (N.to_nat (bs_node_height bs1 l)) n0 *) (* Goal: @eq nat (N.to_nat (bs_node_height bs1 l)) (N.to_nat (bs_node_height bs1 l)) *) (* Goal: BDDstate_OK bs1 *) (* Goal: BDDstate_OK bs2 *) (* Goal: nodes_preserved_bs bs1 bs2 *) (* Goal: node_OK bs1 l *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs2 node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs1 node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node) *) rewrite H0. apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := r). (* Goal: @In ad node0 ul *) assumption. assumption. reflexivity. assumption. assumption. assumption. (* Goal: @In ad node0 ul *) apply low_OK with (x := x) (r := r) (node := node). assumption. assumption. apply H3. (* Goal: @In ad node0 ul *) assumption. intro y. unfold in_dom in H6. rewrite y in H6; discriminate. Qed. Lemma nodes_preserved_bs_bool_fun : forall (bs1 bs2 : BDDstate) (node : ad), BDDstate_OK bs1 -> BDDstate_OK bs2 -> nodes_preserved_bs bs1 bs2 -> node_OK bs1 node -> bool_fun_eq (bool_fun_of_BDD_bs bs2 node) (bool_fun_of_BDD_bs bs1 node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply nodes_preserved_bs_bool_fun_1 with (n := nat_of_N (bs_node_height bs1 node)). (* Goal: @In ad node0 ul *) reflexivity. assumption. assumption. assumption. assumption. Qed. Lemma nodes_preserved_bool_fun : forall (cfg1 cfg2 : BDDconfig) (node : ad), BDDconfig_OK cfg1 -> BDDconfig_OK cfg2 -> nodes_preserved cfg1 cfg2 -> config_node_OK cfg1 node -> bool_fun_eq (bool_fun_of_BDD cfg2 node) (bool_fun_of_BDD cfg1 node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold bool_fun_of_BDD in |- *. apply nodes_preserved_bs_bool_fun. (* Goal: @In ad node0 ul *) exact (proj1 H). exact (proj1 H0). assumption. assumption. Qed. Lemma nodes_preserved_neg_memo_OK : forall (bs bs' : BDDstate) (negm : BDDneg_memo), nodes_preserved_bs bs bs' -> BDDstate_OK bs -> BDDstate_OK bs' -> BDDneg_memo_OK bs negm -> BDDneg_memo_OK bs' negm. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold BDDneg_memo_OK in |- *. unfold BDDneg_memo_OK in H2. intros. cut (node_OK bs node /\ node_OK bs node' /\ Neqb (bs_node_height bs node') (bs_node_height bs node) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_neg (bool_fun_of_BDD_bs bs node))). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) intros. split. apply nodes_preserved_bs_node_OK with (bs1 := bs). assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 H4). split. apply nodes_preserved_bs_node_OK with (bs1 := bs). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) assumption. exact (proj1 (proj2 H4)). split. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb (bs_node_height bs' node') (bs_node_height bs node') = true). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb (bs_node_height bs' node) (bs_node_height bs node) = true). intro. (* Goal: @eq bool (Nleb (bs_node_height bs' node') (bs_node_height bs' node)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node') (bs_node_height bs node')) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) rewrite (Neqb_complete _ _ H5). rewrite (Neqb_complete _ _ H6). (* Goal: @eq bool (N.eqb (bs_node_height bs' node') (bs_node_height bs node')) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 (proj2 H4))). apply nodes_preserved_bs_node_height_eq. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. exact (proj1 H4). (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_node_height_eq. assumption. assumption. assumption. (* Goal: node_OK bs node' *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 H4)). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node'). (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_bool_fun. assumption. assumption. assumption. (* Goal: node_OK bs node' *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 H4)). apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD_bs bs node)). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) exact (proj2 (proj2 (proj2 H4))). apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) apply bool_fun_neg_preserves_eq. apply nodes_preserved_bs_bool_fun. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. exact (proj1 H4). apply H2. assumption. Qed. Lemma nodes_preserved_or_memo_OK : forall (bs bs' : BDDstate) (orm : BDDor_memo), nodes_preserved_bs bs bs' -> BDDstate_OK bs -> BDDstate_OK bs' -> BDDor_memo_OK bs orm -> BDDor_memo_OK bs' orm. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold BDDor_memo_OK in |- *. intros. cut (node_OK bs node1 /\ node_OK bs node2 /\ node_OK bs node /\ Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2)) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intro. elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) elim H6; clear H6; intros. elim H7; clear H7; intros. split. (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_node_OK with (bs1 := bs). assumption. assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. apply nodes_preserved_bs_node_OK with (bs1 := bs). assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) assumption. split. apply nodes_preserved_bs_node_OK with (bs1 := bs). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) assumption. assumption. split. (* Goal: @eq bool (Nleb (bs_node_height bs' node) (BDDvar_max (bs_node_height bs' node1) (bs_node_height bs' node2))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_or (bool_fun_of_BDD_bs bs' node1) (bool_fun_of_BDD_bs bs' node2)) *) (* Goal: and (node_OK bs node1) (and (node_OK bs node2) (and (node_OK bs node) (and (@eq bool (Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2))) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)))))) *) cut (Neqb (bs_node_height bs' node1) (bs_node_height bs node1) = true). (* Goal: forall _ : @eq bool (N.eqb (bs_node_height bs' node1) (bs_node_height bs node1)) true, @eq bool (Nleb (bs_node_height bs' node) (BDDvar_max (bs_node_height bs' node1) (bs_node_height bs' node2))) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node1) (bs_node_height bs node1)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_or (bool_fun_of_BDD_bs bs' node1) (bool_fun_of_BDD_bs bs' node2)) *) (* Goal: and (node_OK bs node1) (and (node_OK bs node2) (and (node_OK bs node) (and (@eq bool (Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2))) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)))))) *) cut (Neqb (bs_node_height bs' node2) (bs_node_height bs node2) = true). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) cut (Neqb (bs_node_height bs' node) (bs_node_height bs node) = true). intros. (* Goal: @eq bool (Nleb (bs_node_height bs' node) (BDDvar_max (bs_node_height bs' node1) (bs_node_height bs' node2))) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node2) (bs_node_height bs node2)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node1) (bs_node_height bs node1)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_or (bool_fun_of_BDD_bs bs' node1) (bool_fun_of_BDD_bs bs' node2)) *) (* Goal: and (node_OK bs node1) (and (node_OK bs node2) (and (node_OK bs node) (and (@eq bool (Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2))) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)))))) *) rewrite (Neqb_complete _ _ H9). rewrite (Neqb_complete _ _ H10). (* Goal: @In ad node0 ul *) rewrite (Neqb_complete _ _ H11). assumption. apply nodes_preserved_bs_node_height_eq. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. apply nodes_preserved_bs_node_height_eq. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. apply nodes_preserved_bs_node_height_eq. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_or (bool_fun_of_BDD_bs bs' node1) (bool_fun_of_BDD_bs bs' node2)) *) (* Goal: and (node_OK bs node1) (and (node_OK bs node2) (and (node_OK bs node) (and (@eq bool (Nleb (bs_node_height bs node) (BDDvar_max (bs_node_height bs node1) (bs_node_height bs node2))) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node) (bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node). (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_bool_fun. assumption. assumption. assumption. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD_bs bs node1) (bool_fun_of_BDD_bs bs node2)). (* Goal: @In ad node0 ul *) assumption. apply bool_fun_or_preserves_eq. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_bool_fun. assumption. assumption. assumption. (* Goal: @In ad node0 ul *) assumption. apply bool_fun_eq_sym. apply nodes_preserved_bs_bool_fun. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. apply H2. assumption. Qed. Lemma nodes_preserved_um_OK : forall (bs bs' : BDDstate) (um : BDDuniv_memo), nodes_preserved_bs bs bs' -> BDDstate_OK bs -> BDDstate_OK bs' -> BDDuniv_memo_OK bs um -> BDDuniv_memo_OK bs' um. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold BDDuniv_memo_OK in |- *. unfold BDDuniv_memo_OK in H2. intros. cut (node_OK bs node /\ node_OK bs node' /\ Nleb (bs_node_height bs node') (bs_node_height bs node) = true /\ bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) intros. split. apply nodes_preserved_bs_node_OK with (bs1 := bs). assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 H4). split. apply nodes_preserved_bs_node_OK with (bs1 := bs). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) assumption. exact (proj1 (proj2 H4)). split. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb (bs_node_height bs' node') (bs_node_height bs node') = true). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) cut (Neqb (bs_node_height bs' node) (bs_node_height bs node) = true). intro. (* Goal: @eq bool (Nleb (bs_node_height bs' node') (bs_node_height bs' node)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node) (bs_node_height bs node)) true *) (* Goal: @eq bool (N.eqb (bs_node_height bs' node') (bs_node_height bs node')) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) rewrite (Neqb_complete _ _ H5). rewrite (Neqb_complete _ _ H6). (* Goal: @eq bool (N.eqb (bs_node_height bs' node') (bs_node_height bs node')) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 (proj2 H4))). apply nodes_preserved_bs_node_height_eq. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. exact (proj1 H4). (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_node_height_eq. assumption. assumption. assumption. (* Goal: node_OK bs node' *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 H4)). (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD_bs bs node'). (* Goal: @In ad node0 ul *) apply nodes_preserved_bs_bool_fun. assumption. assumption. assumption. (* Goal: node_OK bs node' *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs' node)) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) exact (proj1 (proj2 H4)). apply bool_fun_eq_trans with (bf2 := bool_fun_forall x (bool_fun_of_BDD_bs bs node)). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) exact (proj2 (proj2 (proj2 H4))). apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: and (node_OK bs node) (and (node_OK bs node') (and (@eq bool (Nleb (bs_node_height bs node') (bs_node_height bs node)) true) (bool_fun_eq (bool_fun_of_BDD_bs bs node') (bool_fun_forall x (bool_fun_of_BDD_bs bs node))))) *) apply bool_fun_forall_preserves_eq. apply nodes_preserved_bs_bool_fun. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. exact (proj1 H4). apply H2. assumption. Qed. Lemma node_preserved_bs_bool_fun_1 : forall (n : nat) (bs bs' : BDDstate) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> node_preserved_bs bs bs' node -> node_OK bs node -> n = nat_of_N (bs_node_height bs node) -> bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node). Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. apply lt_wf_ind with (P := fun n : nat => forall (bs bs' : BDDstate) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> node_preserved_bs bs bs' node -> node_OK bs node -> n = nat_of_N (bs_node_height bs node) -> bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) clear n. intros. elim H3. intro. rewrite H5. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' BDDzero) (bool_fun_of_BDD_bs bs BDDzero) *) (* Goal: forall _ : or (@eq ad node BDDone) (@eq bool (in_dom (prod BDDvar (prod ad ad)) node bs) true), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_eq_trans with (bf2 := bool_fun_zero). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_zero. assumption. apply bool_fun_eq_sym. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) apply bool_fun_of_BDD_bs_zero. assumption. intro. elim H5; intro. (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) rewrite H6. apply bool_fun_eq_trans with (bf2 := bool_fun_one). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_one. assumption. apply bool_fun_eq_sym. (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_one. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim (option_sum _ (MapGet _ bs node)). intro y. elim y; clear y. intro. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) elim x; clear x. intros x y. elim y; clear y; intros l r H7. cut (MapGet (BDDvar * (ad * ad)) bs' node = (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) Some (x, (l, r))). intro. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD_bs bs' r) (bool_fun_of_BDD_bs bs' l)). (* Goal: @In ad node0 ul *) apply bool_fun_of_BDD_bs_int. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs' r) (bool_fun_of_BDD_bs bs' l)) (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply bool_fun_if_preserves_eq. apply H with (m := nat_of_N (bs_node_height bs r)). (* Goal: lt (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs node)) *) (* Goal: BDDstate_OK bs *) (* Goal: BDDstate_OK bs' *) (* Goal: node_preserved_bs bs bs' l *) (* Goal: node_OK bs l *) (* Goal: @eq nat (N.to_nat (bs_node_height bs l)) (N.to_nat (bs_node_height bs l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD_bs bs r) (bool_fun_of_BDD_bs bs l)) (bool_fun_of_BDD_bs bs node) *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) rewrite H4. apply BDDcompare_lt. apply bs_node_height_right with (x := x) (l := l). (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. unfold node_preserved_bs in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply H2. apply nodes_reachable_trans with (node2 := r). (* Goal: @In ad node0 ul *) apply nodes_reachable_2 with (x := x) (l := l) (r := r). assumption. (* Goal: @In ad node0 ul *) apply nodes_reachable_0. assumption. assumption. (* Goal: @In ad node0 ul *) apply high_OK with (x := x) (l := l) (node := node). assumption. assumption. (* Goal: @eq ad BDDone BDDone *) reflexivity. apply H with (m := nat_of_N (bs_node_height bs l)). rewrite H4. (* Goal: @In ad node0 ul *) apply BDDcompare_lt. apply bs_node_height_left with (x := x) (r := r). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) assumption. assumption. assumption. unfold node_preserved_bs in |- *. intros. (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs' node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node) *) apply H2. apply nodes_reachable_trans with (node2 := l). (* Goal: @In ad node0 ul *) apply nodes_reachable_1 with (x := x) (l := l) (r := r). assumption. (* Goal: @In ad node0 ul *) apply nodes_reachable_0. assumption. assumption. (* Goal: @In ad node0 ul *) apply low_OK with (x := x) (r := r) (node := node). assumption. assumption. (* Goal: @eq ad BDDone BDDone *) reflexivity. apply bool_fun_eq_sym. apply bool_fun_of_BDD_bs_int. (* Goal: @In ad node0 ul *) assumption. assumption. apply H2. apply nodes_reachable_0. assumption. (* Goal: forall (a : BDDstate) (b : prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) a b) node))), BDDconfig_OK (let (share, p) := b in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) a (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) intro y. unfold in_dom in H6. rewrite y in H6. discriminate. Qed. Lemma node_preserved_bs_bool_fun : forall (bs bs' : BDDstate) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> node_preserved_bs bs bs' node -> node_OK bs node -> bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply node_preserved_bs_bool_fun_1 with (n := nat_of_N (bs_node_height bs node)). (* Goal: @In ad node0 ul *) assumption. assumption. assumption. assumption. reflexivity. Qed. Lemma node_preserved_bs_node_height_eq : forall (bs bs' : BDDstate) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> node_preserved_bs bs bs' node -> node_OK bs node -> Neqb (bs_node_height bs' node) (bs_node_height bs node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold bs_node_height in |- *. elim H2; intros. rewrite H3. (* Goal: @eq ad BDDone BDDone *) rewrite (proj1 H). rewrite (proj1 H0). reflexivity. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim H3; intros. rewrite H4. rewrite (proj1 (proj2 H0)). (* Goal: @eq ad BDDone BDDone *) rewrite (proj1 (proj2 H)). reflexivity. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) bs node)). intro y. elim y. intro x. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) x), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p1) as p0) => ad_S x | None => N0 end) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) elim x. intros y0 y1. elim y1. intros y2 y3 y4. rewrite y4. (* Goal: @eq bool (N.eqb (ad_S y0) (ad_S y0)) true *) (* Goal: @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) y0 (@pair ad ad y2 y3))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) bs node) (@None (prod BDDvar (prod ad ad))), @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) bs' node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end match MapGet (prod BDDvar (prod ad ad)) bs node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end) true *) rewrite (H1 y0 y2 y3 node (nodes_reachable_0 bs node)). apply Neqb_correct. (* Goal: @In ad node0 ul *) assumption. intro y. unfold in_dom in H4. rewrite y in H4. discriminate. Qed. Lemma node_preserved_node_height_eq : forall (cfg cfg' : BDDconfig) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> node_preserved cfg cfg' node -> config_node_OK cfg node -> Neqb (node_height cfg' node) (node_height cfg node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold node_height in |- *. apply node_preserved_bs_node_height_eq. exact (proj1 H). (* Goal: @In ad node0 ul *) exact (proj1 H0). assumption. assumption. Qed. Lemma used_nodes_preserved_node_height_eq : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> used_nodes_preserved cfg cfg' ul -> used_list_OK cfg ul -> used_node cfg ul node -> Neqb (node_height cfg' node) (node_height cfg node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply node_preserved_node_height_eq. assumption. assumption. (* Goal: node_preserved_bs bs bs' node *) (* Goal: node_OK bs node *) unfold node_preserved in |- *. apply used_nodes_preserved_preserved_bs with (ul := ul). (* Goal: @In ad node0 ul *) assumption. assumption. unfold config_node_OK in |- *. (* Goal: @In ad node0 ul *) apply used_node_OK_bs with (ul := ul). exact (proj1 H). assumption. (* Goal: @In ad node0 ul *) assumption. Qed. Lemma used_nodes_preserved'_node_height_eq : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> used_nodes_preserved cfg cfg' ul -> used_list_OK cfg ul -> used_node' cfg ul node -> Neqb (node_height cfg' node) (node_height cfg node) = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H3. intro. rewrite H4. (* Goal: @eq bool (N.eqb (node_height cfg' BDDzero) (node_height cfg BDDzero)) true *) (* Goal: forall _ : or (@eq ad node BDDone) (used_node_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul node), @eq bool (N.eqb (node_height cfg' node) (node_height cfg node)) true *) rewrite (Neqb_complete _ _ (node_height_zero cfg H)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (Neqb_complete _ _ (node_height_zero cfg' H0)). reflexivity. intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) elim H4. intro. rewrite H5. rewrite (Neqb_complete _ _ (node_height_one cfg H)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) rewrite (Neqb_complete _ _ (node_height_one cfg' H0)). reflexivity. intro. (* Goal: @In ad node0 ul *) apply used_nodes_preserved_node_height_eq with (ul := ul). assumption. assumption. (* Goal: @In ad node0 ul *) assumption. assumption. assumption. Qed. Lemma used_nodes_preserved_bs_bool_fun : forall (bs bs' : BDDstate) (ul : list ad) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> used_nodes_preserved_bs bs bs' ul -> used_list_OK_bs bs ul -> used_node_bs bs ul node -> bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply node_preserved_bs_bool_fun. assumption. assumption. (* Goal: @In ad node0 ul *) apply used_nodes_preserved_preserved_bs with (ul := ul). assumption. assumption. (* Goal: @In ad node0 ul *) apply used_node_OK_bs with (ul := ul). assumption. assumption. assumption. Qed. Lemma used_nodes_preserved'_bs_bool_fun : forall (bs bs' : BDDstate) (ul : list ad) (node : ad), BDDstate_OK bs -> BDDstate_OK bs' -> used_nodes_preserved_bs bs bs' ul -> used_list_OK_bs bs ul -> used_node'_bs bs ul node -> bool_fun_eq (bool_fun_of_BDD_bs bs' node) (bool_fun_of_BDD_bs bs node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. apply node_preserved_bs_bool_fun. assumption. assumption. (* Goal: @In ad node0 ul *) apply used_nodes_preserved_preserved'_bs with (ul := ul). assumption. (* Goal: @In ad node0 ul *) assumption. assumption. apply used_node'_OK_bs with (ul := ul). assumption. (* Goal: @In ad node0 ul *) assumption. assumption. Qed. Lemma used_nodes_preserved_bool_fun : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> used_nodes_preserved cfg cfg' ul -> used_list_OK cfg ul -> used_node cfg ul node -> bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold bool_fun_of_BDD in |- *. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) apply used_nodes_preserved_bs_bool_fun with (ul := ul). exact (proj1 H). (* Goal: @In ad node0 ul *) exact (proj1 H0). assumption. assumption. assumption. Qed. Lemma used_nodes_preserved'_bool_fun : forall (cfg cfg' : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> BDDconfig_OK cfg' -> used_nodes_preserved cfg cfg' ul -> used_list_OK cfg ul -> used_node' cfg ul node -> bool_fun_eq (bool_fun_of_BDD cfg' node) (bool_fun_of_BDD cfg node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. unfold bool_fun_of_BDD in |- *. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) *) (* Goal: and (BDDsharing_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (and (BDDfree_list_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (cnt_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))) (and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))))))) *) apply used_nodes_preserved'_bs_bool_fun with (ul := ul). exact (proj1 H). (* Goal: @In ad node0 ul *) exact (proj1 H0). assumption. assumption. assumption. Qed. Definition BDDneg_memo_put (cfg : BDDconfig) (node node' : ad) := match cfg with | (bs, (share, (fl, (cnt, (negm, z))))) => (bs, (share, (fl, (cnt, (MapPut _ negm node node', z))))) end. Lemma BDDnegm_put_OK : forall (cfg : BDDconfig) (node node' : ad), BDDconfig_OK cfg -> config_node_OK cfg node -> config_node_OK cfg node' -> Neqb (node_height cfg node') (node_height cfg node) = true -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_neg (bool_fun_of_BDD cfg node)) -> BDDconfig_OK (BDDneg_memo_put cfg node node'). Proof. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : config_node_OK cfg node') (_ : @eq bool (Nleb (node_height cfg node') (node_height cfg node)) true) (_ : bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_forall x (bool_fun_of_BDD cfg node))), BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) bs (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) unfold BDDneg_memo_put in |- *. intro cfg. elim cfg. intros y y0. elim y0. intros y1 y2. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node))), BDDconfig_OK (let (fl, p) := y2 in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim y2. intros y3 y4. elim y4. intros y5 y6. elim y6. intros y7 y8 node node' H. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold BDDconfig_OK in |- *. unfold BDDconfig_OK in H. split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 H). split. exact (proj1 (proj2 H)). split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 (proj2 (proj2 H))). split. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) exact (proj1 (proj2 (proj2 (proj2 H)))). simpl in |- *. simpl in H. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. unfold BDDneg_memo_OK in |- *. intros node0 node'0 H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (N.eqb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_neg (bool_fun_of_BDD_bs y node0))))) *) (* Goal: and (BDDor_memo_OK y (@fst BDDor_memo BDDuniv_memo y8)) (BDDuniv_memo_OK y (@snd BDDor_memo BDDuniv_memo y8)) *) rewrite (MapPut_semantics ad y7 node node' node0) in H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (N.eqb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_neg (bool_fun_of_BDD_bs y node0))))) *) (* Goal: and (BDDor_memo_OK y (@fst BDDor_memo BDDuniv_memo y8)) (BDDuniv_memo_OK y (@snd BDDor_memo BDDuniv_memo y8)) *) elim (sumbool_of_bool (Neqb node node0)). intro y9. rewrite y9 in H4. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) injection H4. intro H5. rewrite <- H5. split. unfold config_node_OK in H0, H1. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) simpl in H0, H1. rewrite <- (Neqb_complete _ _ y9). assumption. split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) assumption. split. rewrite <- (Neqb_complete _ _ y9). assumption. (* Goal: @In ad node0 ul *) rewrite <- (Neqb_complete _ _ y9). assumption. intro y9. rewrite y9 in H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (N.eqb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_neg (bool_fun_of_BDD_bs y node0))))) *) (* Goal: and (BDDor_memo_OK y (@fst BDDor_memo BDDuniv_memo y8)) (BDDuniv_memo_OK y (@snd BDDor_memo BDDuniv_memo y8)) *) apply (proj1 (proj2 (proj2 (proj2 (proj2 H))))). (* Goal: @In ad node0 ul *) assumption. exact (proj2 (proj2 (proj2 (proj2 (proj2 H))))). Qed. Definition BDDor_memo_put (cfg : BDDconfig) (node1 node2 node' : ad) := match cfg with | (bs, (share, (fl, (cnt, (negm, (orm, um)))))) => (bs, (share, (fl, (cnt, (negm, (MapPut2 _ orm node1 node2 node', um)))))) end. Lemma BDDorm_put_nodes_preserved : forall (cfg : BDDconfig) (node1 node2 node' : ad), nodes_preserved cfg (BDDor_memo_put cfg node1 node2 node'). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold BDDor_memo_put in |- *. intros. elim cfg. unfold nodes_preserved in |- *. intros y y0. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node))), BDDconfig_OK (let (share, p) := y0 in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim y0. intros y1 y2. elim y2. intros y3 y4. elim y4. intros y5 y6. elim y6. intros y7 y8. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) elim y8. intros. simpl in |- *. apply nodes_preserved_bs_refl. Qed. Lemma BDDorm_put_OK : forall (cfg : BDDconfig) (node1 node2 node' : ad), BDDconfig_OK cfg -> config_node_OK cfg node1 -> config_node_OK cfg node2 -> config_node_OK cfg node' -> Nleb (node_height cfg node') (BDDvar_max (node_height cfg node1) (node_height cfg node2)) = true -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) -> BDDconfig_OK (BDDor_memo_put cfg node1 node2 node'). Proof. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) unfold BDDor_memo_put in |- *. intro. elim cfg. intros y y0. elim y0. (* Goal: forall (a : BDDsharing_map) (b : prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))), nodes_preserved_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) a b))) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (let (fl, p) := b in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) a (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node')))))))) *) intros y1 y2. elim y2. intros y3 y4. elim y4. intros y5 y6. elim y6. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros y7 y8. elim y8. intros y9 y10 node1 node2 node'. intros. unfold BDDconfig_OK in |- *. unfold BDDconfig_OK in H. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. exact (proj1 H). split. exact (proj1 (proj2 H)). split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 (proj2 (proj2 H))). split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 (proj2 (proj2 (proj2 H)))). split. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) exact (proj1 (proj2 (proj2 (proj2 (proj2 H))))). simpl in |- *. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) simpl in H. unfold BDDor_memo_OK in |- *. split. intros. (* Goal: and (node_OK y node0) (and (node_OK y node3) (and (node_OK y node) (and (@eq bool (Nleb (bs_node_height y node) (BDDvar_max (bs_node_height y node0) (bs_node_height y node3))) true) (bool_fun_eq (bool_fun_of_BDD_bs y node) (bool_fun_or (bool_fun_of_BDD_bs y node0) (bool_fun_of_BDD_bs y node3)))))) *) (* Goal: BDDuniv_memo_OK y y10 *) rewrite (MapPut2_semantics ad y9 node1 node2 node0 node3 node') in H5. (* Goal: and (node_OK y node0) (and (node_OK y node3) (and (node_OK y node) (and (@eq bool (Nleb (bs_node_height y node) (BDDvar_max (bs_node_height y node0) (bs_node_height y node3))) true) (bool_fun_eq (bool_fun_of_BDD_bs y node) (bool_fun_or (bool_fun_of_BDD_bs y node0) (bool_fun_of_BDD_bs y node3)))))) *) (* Goal: BDDuniv_memo_OK y y10 *) elim (sumbool_of_bool (Neqb node1 node0 && Neqb node2 node3)). intro y11. (* Goal: and (node_OK y node0) (and (node_OK y node3) (and (node_OK y node) (and (@eq bool (Nleb (bs_node_height y node) (BDDvar_max (bs_node_height y node0) (bs_node_height y node3))) true) (bool_fun_eq (bool_fun_of_BDD_bs y node) (bool_fun_or (bool_fun_of_BDD_bs y node0) (bool_fun_of_BDD_bs y node3)))))) *) (* Goal: BDDuniv_memo_OK y y10 *) rewrite y11 in H5. injection H5. intro H6. rewrite <- H6. (* Goal: and (node_OK y node0) (and (node_OK y node') (and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) elim (andb_prop _ _ y11). intros H7 H8. rewrite <- (Neqb_complete _ _ H7). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) rewrite <- (Neqb_complete _ _ H8). split. assumption. split. assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. assumption. split. assumption. assumption. intro y11. (* Goal: and (node_OK y node0) (and (node_OK y node3) (and (node_OK y node) (and (@eq bool (Nleb (bs_node_height y node) (BDDvar_max (bs_node_height y node0) (bs_node_height y node3))) true) (bool_fun_eq (bool_fun_of_BDD_bs y node) (bool_fun_or (bool_fun_of_BDD_bs y node0) (bool_fun_of_BDD_bs y node3)))))) *) (* Goal: BDDuniv_memo_OK y y10 *) rewrite y11 in H5. (* Goal: and (node_OK y node0) (and (node_OK y node3) (and (node_OK y node) (and (@eq bool (Nleb (bs_node_height y node) (BDDvar_max (bs_node_height y node0) (bs_node_height y node3))) true) (bool_fun_eq (bool_fun_of_BDD_bs y node) (bool_fun_or (bool_fun_of_BDD_bs y node0) (bool_fun_of_BDD_bs y node3)))))) *) (* Goal: BDDuniv_memo_OK y y10 *) apply (proj1 (proj2 (proj2 (proj2 (proj2 (proj2 H)))))). (* Goal: @In ad node0 ul *) assumption. (* Goal: BDDuniv_memo_OK y y10 *) exact (proj2 (proj2 (proj2 (proj2 (proj2 (proj2 H)))))). Qed. Lemma BDDnegm_put_nodes_preserved : forall (cfg : BDDconfig) (node node' : ad), nodes_preserved cfg (BDDneg_memo_put cfg node node'). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold BDDneg_memo_put in |- *. intros. elim cfg. unfold nodes_preserved in |- *. intros y y0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) elim y0. intros y1 y2. elim y2. intros y3 y4. elim y4. intros y5 y6. elim y6. intros. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) simpl in |- *. apply nodes_preserved_bs_refl. Qed. Definition BDDuniv_memo_put (cfg : BDDconfig) (x : BDDvar) (node node' : ad) := match cfg with | (bs, (share, (fl, (cnt, (negm, (orm, um)))))) => (bs, (share, (fl, (cnt, (negm, (orm, MapPut2 ad um node x node')))))) end. Lemma BDDum_put_nodes_preserved : forall (cfg : BDDconfig) (x : BDDvar) (node node' : ad), nodes_preserved cfg (BDDuniv_memo_put cfg x node node'). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold BDDuniv_memo_put in |- *. intros. elim cfg. unfold nodes_preserved in |- *. intros y y0. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0)) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y y0) node))), BDDconfig_OK (let (share, p) := y0 in let (fl, p0) := p in let (cnt, p1) := p0 in let (negm, p2) := p1 in let (orm, um) := p2 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) elim y0. intros y1 y2. elim y2. intros y3 y4. elim y4. intros y5 y6. elim y6. intros y7 y8. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) elim y8. intros. simpl in |- *. apply nodes_preserved_bs_refl. Qed. Lemma BDDum_put_OK : forall (cfg : BDDconfig) (x : BDDvar) (node node' : ad), BDDconfig_OK cfg -> config_node_OK cfg node -> config_node_OK cfg node' -> Nleb (node_height cfg node') (node_height cfg node) = true -> bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_forall x (bool_fun_of_BDD cfg node)) -> BDDconfig_OK (BDDuniv_memo_put cfg x node node'). Proof. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : config_node_OK cfg node') (_ : @eq bool (Nleb (node_height cfg node') (node_height cfg node)) true) (_ : bool_fun_eq (bool_fun_of_BDD cfg node') (bool_fun_forall x (bool_fun_of_BDD cfg node))), BDDconfig_OK (let (bs, p) := cfg in let (share, p0) := p in let (fl, p1) := p0 in let (cnt, p2) := p1 in let (negm, p3) := p2 in let (orm, um) := p3 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) bs (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) share (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) unfold BDDuniv_memo_put in |- *. intro cfg. elim cfg. intro y. intro y0. elim y0. intro y1. (* Goal: forall (x : BDDvar) (node node' : ad) (_ : BDDconfig_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2))) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node) (_ : config_node_OK (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (_ : @eq bool (Nleb (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (node_height (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node)) true) (_ : bool_fun_eq (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node') (bool_fun_forall x (bool_fun_of_BDD (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) y1 y2)) node))), BDDconfig_OK (let (fl, p) := y2 in let (cnt, p0) := p in let (negm, p1) := p0 in let (orm, um) := p1 in @pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) fl (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) cnt (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) negm (@pair BDDor_memo (Map (Map ad)) orm (MapPut2 ad um node x node'))))))) *) intro y2. elim y2. intro y3. intro y4. elim y4. intro y5. intro y6. elim y6. intro y7. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intro y8. intro x. elim y8. intros y9 y10. intros. unfold BDDconfig_OK in |- *. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) unfold BDDconfig_OK in H. split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 H). split. exact (proj1 (proj2 H)). split. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) exact (proj1 (proj2 (proj2 H))). split. (* Goal: and (BDDneg_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))) (and (BDDor_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@fst BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))))))))) (BDDuniv_memo_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node')))))))) (@snd BDDor_memo BDDuniv_memo (@snd BDDneg_memo (prod BDDor_memo BDDuniv_memo) (@snd ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)) (@snd BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))) (@snd BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@pair BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))))) y (@pair BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))))) y1 (@pair BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad))))) y3 (@pair ad (prod BDDneg_memo (prod BDDor_memo (Map (Map ad)))) y5 (@pair BDDneg_memo (prod BDDor_memo (Map (Map ad))) y7 (@pair BDDor_memo (Map (Map ad)) y9 (MapPut2 ad y10 node x node'))))))))))))))) *) exact (proj1 (proj2 (proj2 (proj2 H)))). simpl in |- *. simpl in H. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. exact (proj1 (proj2 (proj2 (proj2 (proj2 H))))). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. exact (proj1 (proj2 (proj2 (proj2 (proj2 (proj2 H)))))). (* Goal: BDDuniv_memo_OK y (MapPut2 ad y10 node x node') *) unfold BDDuniv_memo_OK in |- *. intros x0 node0 node'0 H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) rewrite (MapPut2_semantics ad y10 node x node0 x0 node') in H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) elim (sumbool_of_bool (Neqb node node0 && Neqb x x0)). (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) intro y11. rewrite y11 in H4. injection H4. intro H5. rewrite <- H5. (* Goal: and (node_OK y node0) (and (node_OK y node') (and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) elim (andb_prop _ _ y11). intros H6 H7. rewrite <- (Neqb_complete _ _ H6). (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) rewrite <- (Neqb_complete _ _ H7). split. assumption. split. assumption. (* Goal: and (@eq bool (Nleb (bs_node_height y node') (bs_node_height y node)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node') (bool_fun_forall x (bool_fun_of_BDD_bs y node))) *) (* Goal: forall _ : @eq bool (andb (N.eqb node node0) (N.eqb x x0)) false, and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) split. assumption. assumption. intro y11. rewrite y11 in H4. (* Goal: and (node_OK y node0) (and (node_OK y node'0) (and (@eq bool (Nleb (bs_node_height y node'0) (bs_node_height y node0)) true) (bool_fun_eq (bool_fun_of_BDD_bs y node'0) (bool_fun_forall x0 (bool_fun_of_BDD_bs y node0))))) *) apply (proj2 (proj2 (proj2 (proj2 (proj2 (proj2 H)))))). (* Goal: @In ad node0 ul *) assumption. Qed. Lemma not_zero_is_one : forall (cfg : BDDconfig) (node : ad), config_node_OK cfg node -> in_dom _ node (fst cfg) = false -> Neqb node BDDzero = false -> Neqb node BDDone = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) intros. elim H. intro. rewrite H2 in H1. simpl in H1. discriminate. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, @eq bool (N.eqb node BDDone) true *) intro. elim H2. intro. rewrite H3. reflexivity. intro. rewrite H0 in H3. (* Goal: @eq bool (N.eqb node BDDone) true *) discriminate. Qed. Lemma used'_zero : forall (cfg : BDDconfig) (ul : list ad), used_node' cfg ul BDDzero. Proof. (* Goal: @eq ad BDDone BDDone *) left. reflexivity. Qed. Lemma used'_one : forall (cfg : BDDconfig) (ul : list ad), used_node' cfg ul BDDone. Proof. (* Goal: @eq ad BDDone BDDone *) right. left. reflexivity. Qed. Lemma cons_OK_list_OK : forall (cfg : BDDconfig) (ul : list ad) (node : ad), used_list_OK cfg (node :: ul) -> used_list_OK cfg ul. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : forall (node0 : ad) (_ : @In ad node0 (@cons ad node ul)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0) (node0 : ad) (_ : @In ad node0 ul), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node0 *) unfold used_list_OK in |- *. unfold used_list_OK_bs in |- *. intros. apply H. (* Goal: @In ad node0 ul *) apply in_cons. assumption. Qed. End BDD_config_1.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import misc. Section Bool_fun. Definition var_env := BDDvar -> bool. Definition bool_fun := var_env -> bool. Definition bool_fun_eq (bf1 bf2 : bool_fun) := forall vb : var_env, bf1 vb = bf2 vb. Definition bool_fun_zero (vb : var_env) := false. Definition bool_fun_one (vb : var_env) := true. Definition bool_fun_neg (bf : bool_fun) : bool_fun := fun vb : var_env => negb (bf vb). Definition bool_fun_or (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_env => bf1 vb || bf2 vb. Definition bool_fun_and (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_env => bf1 vb && bf2 vb. Definition bool_fun_impl (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_env => implb (bf1 vb) (bf2 vb). Definition bool_fun_iff (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_env => eqb (bf1 vb) (bf2 vb). Definition bool_fun_if (x : BDDvar) (bf1 bf2 : bool_fun) : bool_fun := fun vb : var_env => ifb (vb x) (bf1 vb) (bf2 vb). Definition bool_fun_var (x : BDDvar) : bool_fun := fun vb : var_env => vb x. Definition augment (vb : var_env) (x : BDDvar) (b : bool) : var_env := fun y : BDDvar => if Neqb x y then b else vb y. Definition bool_fun_restrict (bf : bool_fun) (x : BDDvar) (b : bool) : bool_fun := fun vb : var_env => bf (augment vb x b). Definition bool_fun_independent (bf : bool_fun) (x : BDDvar) := forall b : bool, bool_fun_eq (bool_fun_restrict bf x b) bf. Definition bool_fun_forall (x : BDDvar) (bf : bool_fun) := bool_fun_and (bool_fun_restrict bf x true) (bool_fun_restrict bf x false). Definition bool_fun_ex (x : BDDvar) (bf : bool_fun) := bool_fun_or (bool_fun_restrict bf x true) (bool_fun_restrict bf x false). Definition bool_fun_ext (bf : bool_fun) := forall vb vb' : var_env, (forall x : BDDvar, vb x = vb' x) -> bf vb = bf vb'. Inductive bool_expr : Set := | Zero : bool_expr | One : bool_expr | Var : BDDvar -> bool_expr | Neg : bool_expr -> bool_expr | Or : bool_expr -> bool_expr -> bool_expr | ANd : bool_expr -> bool_expr -> bool_expr | Impl : bool_expr -> bool_expr -> bool_expr | Iff : bool_expr -> bool_expr -> bool_expr. Fixpoint bool_fun_of_bool_expr (be : bool_expr) : bool_fun := match be with | Zero => bool_fun_zero | One => bool_fun_one | Var x => bool_fun_var x | Neg be' => bool_fun_neg (bool_fun_of_bool_expr be') | Or be1 be2 => bool_fun_or (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | ANd be1 be2 => bool_fun_and (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | Impl be1 be2 => bool_fun_impl (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) | Iff be1 be2 => bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) end. Lemma bool_fun_eq_refl : forall bf : bool_fun, bool_fun_eq bf bf. Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. intros. reflexivity. Qed. Lemma bool_fun_eq_sym : forall bf1 bf2 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq bf2 bf1. Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. intros. rewrite (H vb). reflexivity. Qed. Lemma bool_fun_eq_trans : forall bf1 bf2 bf3 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq bf2 bf3 -> bool_fun_eq bf1 bf3. Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. intros. rewrite (H vb). rewrite <- (H0 vb). reflexivity. Qed. Lemma bool_fun_neg_preserves_eq : forall bf1 bf2 : bool_fun, bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_neg bf1) (bool_fun_neg bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_neg in |- *. intros. rewrite (H vb). reflexivity. Qed. Lemma bool_fun_or_preserves_eq : forall bf1 bf1' bf2 bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_or bf1 bf2) (bool_fun_or bf1' bf2'). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_or in |- *. intros. rewrite (H vb). rewrite (H0 vb). reflexivity. Qed. Lemma bool_fun_if_preserves_eq : forall (x : BDDvar) (bf1 bf2 bf1' bf2' : bool_fun), bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_if x bf1 bf2) (bool_fun_if x bf1' bf2'). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_if in |- *. intros. rewrite (H vb). rewrite (H0 vb). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_and_preserves_eq : forall bf1 bf1' bf2 bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_and bf1' bf2'). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_and in |- *. intros. rewrite (H vb). rewrite (H0 vb). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_impl_preserves_eq : forall bf1 bf1' bf2 bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_impl bf1' bf2'). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_impl in |- *. intros. rewrite (H vb). rewrite (H0 vb). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_iff_preserves_eq : forall bf1 bf1' bf2 bf2' : bool_fun, bool_fun_eq bf1 bf1' -> bool_fun_eq bf2 bf2' -> bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_iff bf1' bf2'). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_iff in |- *. intros. rewrite (H vb). rewrite (H0 vb). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_forall_preserves_eq : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_forall x bf1) (bool_fun_forall x bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_forall, bool_fun_and in |- *. intros. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) y b) (bool_fun_if x (bool_fun_restrict bf1 y b) (bool_fun_restrict bf2 y b)) *) unfold bool_fun_restrict in |- *. rewrite (H (augment vb x true)). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) rewrite (H (augment vb x false)). reflexivity. Qed. Lemma bool_fun_ex_preserves_eq : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_ex x bf1) (bool_fun_ex x bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_ex, bool_fun_or in |- *. intros. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) y b) (bool_fun_if x (bool_fun_restrict bf1 y b) (bool_fun_restrict bf2 y b)) *) unfold bool_fun_restrict in |- *. rewrite (H (augment vb x true)). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) rewrite (H (augment vb x false)). reflexivity. Qed. Lemma bool_fun_neg_zero : bool_fun_eq (bool_fun_neg bool_fun_zero) bool_fun_one. Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. reflexivity. Qed. Lemma bool_fun_neg_one : bool_fun_eq (bool_fun_neg bool_fun_one) bool_fun_zero. Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. reflexivity. Qed. Lemma bool_fun_and_lemma : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_neg (bool_fun_or (bool_fun_neg bf1) (bool_fun_neg bf2))). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_neg, bool_fun_or, bool_fun_and in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf1 vb); elim (bf2 vb); reflexivity. Qed. Lemma bool_fun_impl_lemma : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_impl bf1 bf2) (bool_fun_or (bool_fun_neg bf1) bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_impl, bool_fun_or, bool_fun_neg in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf1 vb); elim (bf2 vb); reflexivity. Qed. Lemma bool_fun_iff_lemma : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_iff bf1 bf2) (bool_fun_impl (bool_fun_or bf1 bf2) (bool_fun_and bf1 bf2)). Proof. unfold bool_fun_eq, bool_fun_iff, bool_fun_impl, bool_fun_or, bool_fun_and in |- *. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. elim (bf1 vb); elim (bf2 vb); reflexivity. Qed. Lemma bool_fun_ex_lemma : forall (bf : bool_fun) (x : BDDvar), bool_fun_eq (bool_fun_ex x bf) (bool_fun_neg (bool_fun_forall x (bool_fun_neg bf))). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_ex in |- *. intros. unfold bool_fun_forall in |- *. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_restrict bf x true) (bool_fun_restrict bf x false)) (bool_fun_neg (bool_fun_and (bool_fun_restrict (bool_fun_neg bf) x true) (bool_fun_restrict (bool_fun_neg bf) x false))) *) unfold bool_fun_or, bool_fun_and, bool_fun_neg, bool_fun_restrict in |- *. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) unfold bool_fun_eq in |- *. intro. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf (augment vb x true)); elim (bf (augment vb x false)); reflexivity. Qed. Lemma bool_fun_var_lemma : forall x : BDDvar, bool_fun_eq (bool_fun_var x) (bool_fun_if x bool_fun_one bool_fun_zero). Proof. unfold bool_fun_var, bool_fun_one, bool_fun_zero, bool_fun_if, bool_fun_eq in |- *. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. elim (vb x); reflexivity. Qed. Lemma bool_fun_eq_neg_eq : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_neg bf1) (bool_fun_neg bf2) -> bool_fun_eq bf1 bf2. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_neg in |- *. intros. cut (negb (bf1 vb) = negb (bf2 vb)). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf1 vb). elim (bf2 vb). reflexivity. simpl in |- *. intro; discriminate. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf2 vb). intro; discriminate. reflexivity. apply H. Qed. Lemma bool_fun_neg_orthogonal : forall (x : BDDvar) (bf1 bf2 : bool_fun), bool_fun_eq (bool_fun_neg (bool_fun_if x bf1 bf2)) (bool_fun_if x (bool_fun_neg bf1) (bool_fun_neg bf2)). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_if, bool_fun_neg in |- *. intros. elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_or_zero : forall bf : bool_fun, bool_fun_eq (bool_fun_or bf bool_fun_zero) bf. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or, bool_fun_zero in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf vb); reflexivity. Qed. Lemma bool_fun_or_one : forall bf : bool_fun, bool_fun_eq (bool_fun_or bf bool_fun_one) bool_fun_one. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or, bool_fun_one in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf vb); reflexivity. Qed. Lemma bool_fun_or_comm : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_or bf1 bf2) (bool_fun_or bf2 bf1). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf1 vb); elim (bf2 vb); reflexivity. Qed. Lemma bool_fun_and_comm : forall bf1 bf2 : bool_fun, bool_fun_eq (bool_fun_and bf1 bf2) (bool_fun_and bf2 bf1). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_and in |- *. intros. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) elim (bf1 vb); elim (bf2 vb); reflexivity. Qed. Lemma bool_fun_and_idempotent : forall bf : bool_fun, bool_fun_eq (bool_fun_and bf bf) bf. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_and in |- *. intros. elim (bf vb); reflexivity. Qed. Lemma bool_fun_or_orthogonal : forall (x : BDDvar) (bf1 bf2 bf1' bf2' : bool_fun), bool_fun_eq (bool_fun_or (bool_fun_if x bf1 bf2) (bool_fun_if x bf1' bf2')) (bool_fun_if x (bool_fun_or bf1 bf1') (bool_fun_or bf2 bf2')). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. intros. elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_or_orthogonal_right : forall (x : BDDvar) (bf bf1' bf2' : bool_fun), bool_fun_eq (bool_fun_or bf (bool_fun_if x bf1' bf2')) (bool_fun_if x (bool_fun_or bf bf1') (bool_fun_or bf bf2')). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. intros. elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_or_orthogonal_left : forall (x : BDDvar) (bf1 bf2 bf' : bool_fun), bool_fun_eq (bool_fun_or (bool_fun_if x bf1 bf2) bf') (bool_fun_if x (bool_fun_or bf1 bf') (bool_fun_or bf2 bf')). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_or, bool_fun_if in |- *. intros. elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_and_orthogonal : forall (x : BDDvar) (bf1 bf2 bf1' bf2' : bool_fun), bool_fun_eq (bool_fun_and (bool_fun_if x bf1 bf2) (bool_fun_if x bf1' bf2')) (bool_fun_if x (bool_fun_and bf1 bf1') (bool_fun_and bf2 bf2')). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_and, bool_fun_if in |- *. intros. elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_forall_independent : forall (x : BDDvar) (bf : bool_fun), bool_fun_independent bf x -> bool_fun_eq (bool_fun_forall x bf) bf. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_forall in |- *. unfold bool_fun_independent in |- *. intros. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_restrict bf x true) (bool_fun_restrict bf x false)) bf *) apply bool_fun_eq_trans with (bf2 := bool_fun_and bf bf). (* Goal: bool_fun_eq (bool_fun_restrict bf1 x b) bf1 *) (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) bf2 *) apply bool_fun_and_preserves_eq. apply H. apply H. (* Goal: bool_fun_eq (bool_fun_and bf bf) bf *) apply bool_fun_and_idempotent. Qed. Lemma bool_fun_forall_zero : forall x : BDDvar, bool_fun_eq (bool_fun_forall x bool_fun_zero) bool_fun_zero. Proof. (* Goal: forall b : bool, bool_fun_eq (bool_fun_restrict (bool_fun_if y bf1 bf2) x b) (bool_fun_if y bf1 bf2) *) intro. unfold bool_fun_eq, bool_fun_forall, bool_fun_zero, bool_fun_restrict in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intro. reflexivity. Qed. Lemma bool_fun_forall_one : forall x : BDDvar, bool_fun_eq (bool_fun_forall x bool_fun_one) bool_fun_one. Proof. (* Goal: forall b : bool, bool_fun_eq (bool_fun_restrict (bool_fun_if y bf1 bf2) x b) (bool_fun_if y bf1 bf2) *) intro. unfold bool_fun_eq, bool_fun_forall, bool_fun_one, bool_fun_restrict in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intro. reflexivity. Qed. Lemma bool_fun_restrict_zero : forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_zero x b) bool_fun_zero. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_restrict, bool_fun_zero, bool_fun_one in |- *. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold augment in |- *. reflexivity. Qed. Lemma bool_fun_restrict_one : forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict bool_fun_one x b) bool_fun_one. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_restrict, bool_fun_zero, bool_fun_one in |- *. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold augment in |- *. reflexivity. Qed. Lemma bool_fun_restrict_preserves_eq : forall (bf1 bf2 : bool_fun) (x : BDDvar) (b : bool), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_restrict bf1 x b) (bool_fun_restrict bf2 x b). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_restrict in |- *. intros. rewrite (H (augment vb x b)). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_independent_zero : forall x : BDDvar, bool_fun_independent bool_fun_zero x. Proof. (* Goal: forall x : BDDvar, bool_fun_independent bool_fun_zero x *) unfold bool_fun_independent, bool_fun_zero in |- *. unfold bool_fun_restrict, bool_fun_eq in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_independent_one : forall x : BDDvar, bool_fun_independent bool_fun_one x. Proof. (* Goal: forall (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict (fun _ : var_env => true) x b) (fun _ : var_env => true) *) unfold bool_fun_independent, bool_fun_one in |- *. unfold bool_fun_restrict, bool_fun_eq in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. Qed. Lemma bool_fun_eq_independent : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_independent bf1 x -> bool_fun_independent bf2 x. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_independent in |- *. intros. (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) bf2 *) apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bf1 x b). (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) (bool_fun_restrict bf1 x b) *) (* Goal: bool_fun_eq (bool_fun_restrict bf1 x b) bf2 *) apply bool_fun_restrict_preserves_eq. apply bool_fun_eq_sym. assumption. (* Goal: bool_fun_independent bf2 x *) apply bool_fun_eq_trans with (bf2 := bf1). apply H0. assumption. Qed. Lemma bool_fun_if_restrict_true : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x true) (bool_fun_restrict bf1 x true). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_if in |- *. unfold bool_fun_restrict in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold augment at 1 in |- *. rewrite (Neqb_correct x). simpl in |- *. reflexivity. Qed. Lemma bool_fun_if_restrict_false : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x false) (bool_fun_restrict bf2 x false). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_eq, bool_fun_if in |- *. unfold bool_fun_restrict in |- *. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold augment at 1 in |- *. rewrite (Neqb_correct x). simpl in |- *. reflexivity. Qed. Lemma bool_fun_if_restrict : forall (bf1 bf2 : bool_fun) (x y : BDDvar) (b : bool), Neqb x y = false -> bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) y b) (bool_fun_if x (bool_fun_restrict bf1 y b) (bool_fun_restrict bf2 y b)). Proof. (* Goal: bool_fun_eq (fun vb : var_env => bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b))) *) intros. unfold bool_fun_restrict in |- *. unfold bool_fun_eq in |- *. intros. (* Goal: @eq bool (bool_fun_if x bf1 bf2 (augment vb y b)) (bool_fun_if x (fun vb : var_env => bf1 (augment vb y b)) (fun vb : var_env => bf2 (augment vb y b)) vb) *) unfold augment in |- *. unfold bool_fun_if in |- *. rewrite (Neqb_comm x y) in H. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) rewrite H. reflexivity. Qed. Lemma bool_fun_if_restrict_true_independent : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_independent bf1 x -> bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x true) bf1. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_independent in |- *. intros. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x true) bf1 *) apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bf1 x true). (* Goal: bool_fun_eq (bool_fun_restrict bf1 x b) bf1 *) (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) bf2 *) apply bool_fun_if_restrict_true. apply H. Qed. Lemma bool_fun_if_restrict_false_independent : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_independent bf2 x -> bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x false) bf2. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_independent in |- *. intros. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_if x bf1 bf2) x false) bf2 *) apply bool_fun_eq_trans with (bf2 := bool_fun_restrict bf2 x false). (* Goal: bool_fun_eq (bool_fun_restrict bf1 x b) bf1 *) (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) bf2 *) apply bool_fun_if_restrict_false. apply H. Qed. Lemma bool_fun_forall_orthogonal : forall (x u : BDDvar) (bf1 bf2 : bool_fun), Neqb x u = false -> bool_fun_eq (bool_fun_forall u (bool_fun_if x bf1 bf2)) (bool_fun_if x (bool_fun_forall u bf1) (bool_fun_forall u bf2)). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_forall at 1 in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_if x (bool_fun_restrict bf1 u true) (bool_fun_restrict bf2 u true)) (bool_fun_if x (bool_fun_restrict bf1 u false) (bool_fun_restrict bf2 u false))). (* Goal: bool_fun_eq (bool_fun_and (bool_fun_restrict (bool_fun_if x bf1 bf2) x true) (bool_fun_restrict (bool_fun_if x bf1 bf2) x false)) (bool_fun_and bf1 bf2) *) apply bool_fun_and_preserves_eq. apply bool_fun_if_restrict. assumption. (* Goal: bool_fun_eq (bool_fun_forall x (bool_fun_if x bf1 bf2)) (bool_fun_and bf1 bf2) *) apply bool_fun_if_restrict. assumption. unfold bool_fun_forall in |- *. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_if x (bool_fun_restrict bf1 u true) (bool_fun_restrict bf2 u true)) (bool_fun_if x (bool_fun_restrict bf1 u false) (bool_fun_restrict bf2 u false))) (bool_fun_if x (bool_fun_and (bool_fun_restrict bf1 u true) (bool_fun_restrict bf1 u false)) (bool_fun_and (bool_fun_restrict bf2 u true) (bool_fun_restrict bf2 u false))) *) apply bool_fun_and_orthogonal. Qed. Lemma bool_fun_independent_if : forall (x y : BDDvar) (bf1 bf2 : bool_fun), bool_fun_independent bf1 x -> bool_fun_independent bf2 x -> Neqb x y = false -> bool_fun_independent (bool_fun_if y bf1 bf2) x. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_independent in |- *. intro. apply bool_fun_eq_trans with (bf2 := bool_fun_if y (bool_fun_restrict bf1 x b) (bool_fun_restrict bf2 x b)). (* Goal: bool_fun_independent bf2 x *) apply bool_fun_if_restrict. rewrite (Neqb_comm x y) in H1; assumption. (* Goal: bool_fun_eq (bool_fun_restrict bf1 x b) bf1 *) (* Goal: bool_fun_eq (bool_fun_restrict bf2 x b) bf2 *) apply bool_fun_if_preserves_eq. apply H. apply H0. Qed. Lemma bool_fun_forall_if_egal : forall (x : BDDvar) (bf1 bf2 : bool_fun), bool_fun_independent bf1 x -> bool_fun_independent bf2 x -> bool_fun_eq (bool_fun_forall x (bool_fun_if x bf1 bf2)) (bool_fun_and bf1 bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) intros. unfold bool_fun_forall in |- *. apply bool_fun_and_preserves_eq. (* Goal: bool_fun_independent bf2 x *) apply bool_fun_if_restrict_true_independent. assumption. (* Goal: bool_fun_independent bf2 x *) apply bool_fun_if_restrict_false_independent. assumption. Qed. Lemma bool_fun_if_eq_1 : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_if x bf1 bf2) bf1. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_if in |- *. intros. rewrite (H vb). elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_if_eq_2 : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_if x bf1 bf2) bf2. Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_eq, bool_fun_if in |- *. intros. rewrite (H vb). elim (vb x). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) reflexivity. reflexivity. Qed. Lemma bool_fun_ext_zero : bool_fun_ext bool_fun_zero. Proof. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_ext, bool_fun_zero in |- *. reflexivity. Qed. Lemma bool_fun_ext_one : bool_fun_ext bool_fun_one. Proof. (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_ext, bool_fun_one in |- *. reflexivity. Qed. Lemma bool_fun_ext_if : forall (bf1 bf2 : bool_fun) (x : BDDvar), bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_if x bf1 bf2). Proof. (* Goal: forall (bf1 bf2 : bool_fun) (x : BDDvar) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf1 vb) (bf1 vb')) (_ : forall (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (bf2 vb) (bf2 vb')) (vb vb' : var_env) (_ : forall x0 : BDDvar, @eq bool (vb x0) (vb' x0)), @eq bool (ifb (vb x) (bf1 vb) (bf2 vb)) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) unfold bool_fun_ext, bool_fun_if in |- *. intros. rewrite (H vb vb' H1). (* Goal: @eq bool (ifb (vb' x) (bf1 vb') (bf2 vb')) (ifb (vb' x) (bf1 vb') (bf2 vb')) *) rewrite (H0 vb vb' H1). rewrite (H1 x). reflexivity. Qed. End Bool_fun.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import myMap. Require Import Wf_nat. Require Import EqNat. Require Import Peano_dec. Require Import Ensembles. Require Import Finite_sets. Require Import Finite_sets_facts. Require Import Image. Require Import misc. Require Import bool_fun. Require Import config. Require Import alloc. Require Import make. Require Import neg. Require Import or. Require Import univ. Require Import op. Require Import tauto. Require Import quant. Require Import gc. Require Import Compare. (* "two_power" and "zero_lt_pow" are copied from contribs/BORDEAUX/Additions/two_power.v to avoid Requiring the contribution *) Fixpoint two_power (m : nat) : nat := match m with | O => 1 | S n => 2 * two_power n end. Lemma zero_lt_pow : forall a : nat, 0 < two_power a. Proof. (* Goal: forall a : nat, lt O (two_power a) *) simple induction a; simpl in |- *. auto. intros. apply lt_plus_trans; auto. Qed. Definition be_to_be_inc (f : bool_expr -> bool_expr) := forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (f be1) (f be2). Definition fp (bef : bool_expr -> bool_expr) (be : bool_expr) := be_eq be (bef be). Definition lfp_be (bef : bool_expr -> bool_expr) (be1 be : bool_expr) := fp bef be /\ be_le be1 be /\ (forall be' : bool_expr, fp bef be' -> be_le be1 be' -> be_le be be'). Definition lfp (bef : bool_expr -> bool_expr) (be : bool_expr) := fp bef be /\ (forall be' : bool_expr, fp bef be' -> be_le be be'). Lemma lt_mn_minus : forall n m : nat, m < n -> 0 < n - m. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. intros. elim (lt_n_O _ H). intros. simpl in |- *. elim (O_or_S m). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. inversion y. rewrite <- H1. apply H. apply lt_S_n. rewrite H1. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. intro y. rewrite <- y. apply lt_O_Sn. Qed. Lemma le_minus_minus : forall m n : nat, n <= m -> n = m - (m - n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction m. intros. simpl in |- *. symmetry in |- *. apply le_n_O_eq. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (le_le_S_eq _ _ H0). intros. rewrite <- (minus_Sn_m n n0). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. apply H. apply le_S_n. assumption. apply le_S_n. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite H1. simpl in |- *. rewrite <- (minus_n_n n). reflexivity. Qed. Lemma minus_n_m_le_n : forall n m : nat, n - m <= n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. simpl in |- *. intros. apply le_n. intro. intro. intro. elim m. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply le_n. intros. simpl in |- *. apply le_S. apply H. Qed. Lemma le_minus_le : forall p n m : nat, n <= m -> p - m <= p - n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction p. simpl in |- *. intros. apply le_O_n. intros. elim (O_or_S m). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. inversion y. rewrite <- H1. simpl in |- *. elim (O_or_S n0). intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) inversion y0. rewrite <- H2. apply H. apply le_S_n. rewrite H1. (* Goal: BDDconfig_OK cfg *) rewrite H2. assumption. intro y0. rewrite <- y0. apply le_S. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply minus_n_m_le_n. intro y. rewrite <- y. rewrite <- y in H0. (* Goal: le U U *) rewrite (le_n_O_eq n0 H0). apply le_n. Qed. Section Nsec. Variable N : nat. Definition lxN := lx N. Definition lx'N := lx' N. Lemma Splus_nm : forall n m : nat, S (n + m) = S n + m. Proof. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. Qed. Lemma empty_map_card : forall (A : Set) (m : Map A), (forall x : ad, in_dom _ x m = false) -> MapCard _ m = 0. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction m. reflexivity. intros. cut (in_dom _ a (M1 _ a a0) = false). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold in_dom in |- *. simpl in |- *. rewrite (Neqb_correct a). intro. discriminate. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. intros. simpl in |- *. unfold in_dom in H1. rewrite H. rewrite H0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. intro. cut (match MapGet A (M2 A m0 m1) (Ndouble_plus_one x) with | None => false | Some _ => true end = false). rewrite (MapGet_M2_bit_0_1 A (Ndouble_plus_one x) (Ndouble_plus_one_bit0 x) m0 m1). (* Goal: forall _ : @eq bool (in_dom ad t bte) true, and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold in_dom in |- *. rewrite (Ndouble_plus_one_div2 x). trivial. apply H1. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. cut (match MapGet A (M2 A m0 m1) (Ndouble x) with | None => false | Some _ => true end = false). (* Goal: forall _ : @eq bool match MapGet A (M2 A m0 m1) (N.double x) with | Some a => true | None => false end false, @eq bool (in_dom A x m0) false *) (* Goal: @eq bool match MapGet A (M2 A m0 m1) (N.double x) with | Some a => true | None => false end false *) rewrite (MapGet_M2_bit_0_0 A (Ndouble x) (Ndouble_bit0 x) m0 m1). (* Goal: forall _ : @eq bool (in_dom ad t bte) true, and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold in_dom in |- *. rewrite (Ndouble_div2 x). trivial. apply H1. Qed. Fixpoint Map_eq (m1 m2 : Map unit) {struct m2} : bool := match m1, m2 with | M0, M0 => true | M1 a1 _, M1 a2 _ => Neqb a1 a2 | M2 m1 m1', M2 m2 m2' => Map_eq m1 m2 && Map_eq m1' m2' | _, _ => false end. Lemma Map_eq_complete : forall m1 m2 : Map unit, Map_eq m1 m2 = true -> m1 = m2. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) double induction m1 m2. reflexivity. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros; discriminate. simpl in |- *. intros; discriminate. simpl in |- *. intros. (* Goal: BDDconfig_OK cfg *) elim a0. elim a2. rewrite (Neqb_complete a1 a). reflexivity. assumption. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. intros; discriminate. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros; discriminate. simpl in |- *. intros. elim (andb_prop _ _ H3). intros. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (H1 _ H4). rewrite (H2 _ H5). reflexivity. Qed. Lemma Map_eq_correct : forall m : Map unit, Map_eq m m = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction m. reflexivity. simpl in |- *. intros. apply Neqb_correct. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite H. rewrite H0. reflexivity. Qed. Lemma Map_eq_dec : forall m1 m2 : Map unit, m1 = m2 \/ m1 <> m2. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (sumbool_of_bool (Map_eq m1 m2)). intros y. left. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply Map_eq_complete. assumption. intro y. right. unfold not in |- *; intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H in y. rewrite (Map_eq_correct m2) in y. discriminate. Qed. Section Intervals. Variable L U : nat. Definition nat_lu (n : nat) := leb L n && leb (S n) U. Definition var_lu (x : ad) := leb L (nat_of_N x) && leb (S (nat_of_N x)) U. Definition var_env_eq (e1 e2 : var_env) := forall x : BDDvar, var_lu x = true -> e1 x = e2 x. Section Sequence. Variable A : Set. Variable A_eq : A -> A -> Prop. Definition seq := nat -> A. Definition seq_eq (s1 s2 : seq) := forall n : nat, nat_lu n = true -> A_eq (s1 n) (s2 n). Definition seq_inj (s : seq) := forall i j : nat, nat_lu i = true -> nat_lu j = true -> A_eq (s i) (s j) -> i = j. Definition seq_surj (s : seq) := forall a : A, exists i : nat, nat_lu i = true /\ A_eq (s i) a. End Sequence. Lemma var_lu_nat_lu : forall x : ad, var_lu x = true -> nat_lu (nat_of_N x) = true. Proof. (* Goal: forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat O O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be be) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S O) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (bef be) *) (* Goal: forall (n : nat) (_ : forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n)) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S (S n)) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S (S n))) *) trivial. Qed. Lemma nat_lu_var_lu : forall n : nat, nat_lu n = true -> var_lu (N_of_nat n) = true. Proof. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_lu, nat_lu in |- *. intro. rewrite (nat_of_N_of_nat n). trivial. Qed. Lemma eval_be_independent : forall ve1 ve2 : var_env', seq_eq _ (eq (A:=_)) ve1 ve2 -> forall be : bool_expr, be_ok var_lu be -> eval_be' be ve1 = eval_be' be ve2. Proof. (* Goal: forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat O O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be be) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S O) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (bef be) *) (* Goal: forall (n : nat) (_ : forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n)) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S (S n)) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S (S n))) *) unfold seq_eq, eval_be' in |- *. intros ve1 ve2 H. simple induction be. trivial. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) trivial. simpl in |- *. unfold bool_fun_var in |- *. unfold var_env'_to_env in |- *. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. apply var_lu_nat_lu. apply var_ok_inv. assumption. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. unfold bool_fun_neg in |- *. replace (bool_fun_of_bool_expr b (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b (var_env'_to_env ve1)). (* Goal: BDDconfig_OK cfg *) reflexivity. apply H0. apply neg_ok_inv. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. unfold bool_fun_or in |- *. intros. replace (bool_fun_of_bool_expr b (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b (var_env'_to_env ve1)). replace (bool_fun_of_bool_expr b0 (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b0 (var_env'_to_env ve1)). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. apply H1. exact (proj2 (or_ok_inv _ _ _ H2)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. exact (proj1 (or_ok_inv _ _ _ H2)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. unfold bool_fun_and in |- *. intros. replace (bool_fun_of_bool_expr b (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b (var_env'_to_env ve1)). replace (bool_fun_of_bool_expr b0 (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b0 (var_env'_to_env ve1)). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. apply H1. exact (proj2 (and_ok_inv _ _ _ H2)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. exact (proj1 (and_ok_inv _ _ _ H2)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. unfold bool_fun_impl in |- *. intros. replace (bool_fun_of_bool_expr b (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b (var_env'_to_env ve1)). replace (bool_fun_of_bool_expr b0 (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b0 (var_env'_to_env ve1)). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. apply H1. exact (proj2 (impl_ok_inv _ _ _ H2)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. exact (proj1 (impl_ok_inv _ _ _ H2)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. unfold bool_fun_iff in |- *. intros. replace (bool_fun_of_bool_expr b (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b (var_env'_to_env ve1)). replace (bool_fun_of_bool_expr b0 (var_env'_to_env ve2)) with (bool_fun_of_bool_expr b0 (var_env'_to_env ve1)). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. apply H1. exact (proj2 (iff_ok_inv _ _ _ H2)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. exact (proj1 (iff_ok_inv _ _ _ H2)). Qed. Definition Evar_env' : Ensemble var_env' := fun ve : var_env' => forall n : nat, nat_lu n = false -> ve n = false. Definition Evar_env'' : Ensemble var_env'' := fun ve : var_env'' => mapcanon _ ve /\ (forall x : ad, var_lu x = false -> in_dom _ x ve = false). Lemma cardinal_Union : forall (U : Type) (X : Ensemble U) (m : nat), cardinal U X m -> forall (Y : Ensemble U) (n : nat), cardinal U Y n -> forall p : nat, cardinal U (Union U X Y) p -> p <= m + n. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros U0 X m H. elim H. intros Y n. rewrite (Empty_set_zero U0 Y). simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite (cardinal_is_functional _ _ _ H0 _ _ H1). apply le_n. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. intros A n H0. intros H1 x H2 Y n0 H3. simpl in |- *. (* Goal: forall (p : nat) (_ : cardinal U0 (Union U0 (Add U0 A x) Y) p), le p (S (Init.Nat.add n n0)) *) rewrite (Union_commutative U0 (Add U0 A x) Y). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite <- (Union_add U0 Y A x). rewrite (Union_commutative U0 Y A). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (exists q : nat, cardinal U0 (Union U0 A Y) q). intro. elim H4. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros q H5. intros. apply le_trans with (m := S q). (* Goal: BDDconfig_OK cfg *) apply card_Add_gen with (A := Union U0 A Y) (x := x). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply le_n_S. apply H1 with (Y := Y). assumption. assumption. (* Goal: @ex nat (fun q : nat => cardinal U0 (Union U0 A Y) q) *) apply finite_cardinal. apply Union_preserves_Finite. (* Goal: BDDconfig_OK cfg *) apply cardinal_finite with (n := n). assumption. (* Goal: BDDconfig_OK cfg *) apply cardinal_finite with (n := n0). assumption. Qed. End Intervals. Definition Evar_env'ntoSn (U : nat) (ve : var_env') : var_env' := fun n : nat => if beq_nat n U then true else ve n. Definition Evar_env''ntoSn (U : nat) (ve : var_env'') : var_env'' := MapPut _ ve (N_of_nat U) tt. Lemma beq_Eq_true : forall m n : nat, beq_nat m n = true <-> eq_nat m n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) double induction m n; simpl in |- *. split. trivial. reflexivity. intros. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro; discriminate. intro. elim H0. split; intros. discriminate. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim H0. intros. apply H0. Qed. Lemma beq_complete : forall m n : nat, beq_nat m n = true -> m = n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply eq_nat_eq. apply (proj1 (beq_Eq_true _ _) H). Qed. Lemma beq_correct : forall n : nat, beq_nat n n = true. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simple induction n; simpl in |- *. reflexivity. trivial. Qed. Lemma Evar_env'ntoSn_lemma : forall (L U : nat) (ve : var_env'), L <= U -> In _ (Evar_env' L U) ve -> In _ (Evar_env' L (S U)) (Evar_env'ntoSn U ve). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold In in |- *. unfold Evar_env', Evar_env'ntoSn in |- *. intros. unfold nat_lu in H1. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (andb_false_elim _ _ H1). intro y. cut (beq_nat n U = false). intro. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H2. apply H0. unfold nat_lu in |- *. rewrite y. reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. (* Goal: False *) rewrite (beq_complete _ _ H2) in y. rewrite (leb_correct _ _ H) in y. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) discriminate. simpl in |- *. intro y. cut (beq_nat n U = false). intro. rewrite H2. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. unfold nat_lu in |- *. replace (leb (S n) U) with false. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (leb L n). reflexivity. reflexivity. symmetry in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. cut (leb n U = true). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H4 in y; discriminate. apply leb_correct. apply le_Sn_le. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. apply not_true_is_false. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold not in |- *; intro. rewrite (beq_complete _ _ H2) in y. (* Goal: le U U *) rewrite (leb_correct U U) in y. discriminate. apply le_n. Qed. Lemma Evar_env''ntoSn_lemma : forall (L U : nat) (ve : var_env''), L <= U -> In _ (Evar_env'' L U) ve -> In _ (Evar_env'' L (S U)) (Evar_env''ntoSn U ve). Proof. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold In in |- *. unfold Evar_env'', Evar_env''ntoSn in |- *. split. apply MapPut_canon. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj1 H0). elim H0. clear H0. intro. clear H0. intros. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold var_lu in H1. elim (andb_false_elim _ _ H1). intro y. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (Neqb (N_of_nat U) x = false). intro. unfold in_dom in |- *. (* Goal: @eq Prop (lt O (two_power n)) (lt O O) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: be_le be (bef be) *) (* Goal: be_le (be_iter1 bef be (two_power n)) (@fst bool_expr bool (be_iter2n bef be n)) *) (* Goal: forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be' *) rewrite (MapPut_semantics unit ve (N_of_nat U) tt x). rewrite H2. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold in_dom in H0. apply H0. unfold var_lu in |- *. rewrite y. reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. (* Goal: False *) (* Goal: forall _ : @eq bool (Nat.leb (S (N.to_nat x)) (S U)) false, @eq bool (in_dom unit x (MapPut unit ve (N.of_nat U) tt)) false *) cut (Nleb (N_of_nat L) (N_of_nat U) = true). (* Goal: forall _ : @eq bool (Nleb (N.of_nat L) (N.of_nat U)) true, False *) (* Goal: @eq bool (Nleb (N.of_nat L) (N.of_nat U)) true *) (* Goal: forall _ : @eq bool (Nat.leb (S (N.to_nat x)) (S U)) false, @eq bool (in_dom unit x (MapPut unit ve (N.of_nat U) tt)) false *) rewrite (Neqb_complete _ _ H2). unfold Nleb in |- *. rewrite (nat_of_N_of_nat L). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y. intro; discriminate. unfold Nleb in |- *. rewrite (nat_of_N_of_nat L). (* Goal: BDDconfig_OK cfg *) rewrite (nat_of_N_of_nat U). apply leb_correct. assumption. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. intro y. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapPut unit ve (N.of_nat U) tt) x with | Some a => true | None => false end false *) rewrite (MapPut_semantics unit ve (N_of_nat U) tt x). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (Neqb (N_of_nat U) x = false). intro. rewrite H2. unfold in_dom in H0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. unfold var_lu in |- *. replace (leb (S (nat_of_N x)) U) with false. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (leb L (nat_of_N x)). reflexivity. reflexivity. symmetry in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (leb (nat_of_N x) U = true). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H4 in y; discriminate. apply leb_correct. apply le_Sn_le. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. apply not_true_is_false. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold not in |- *; intro. rewrite <- (Neqb_complete _ _ H2) in y. (* Goal: False *) rewrite (nat_of_N_of_nat U) in y. (* Goal: le U U *) rewrite (leb_correct U U) in y. discriminate. apply le_n. Qed. Section Evar_env''LULSU. Variable L U : nat. Definition Evar_env'LU : Ensemble var_env' := Evar_env' L U. Definition Evar_env''LU : Ensemble var_env'' := Evar_env'' L U. Definition Evar_env'LSU : Ensemble var_env' := Evar_env' L (S U). Definition Evar_env''LSU : Ensemble var_env'' := Evar_env'' L (S U). Definition f1 : var_env' -> var_env' := Evar_env'ntoSn U. Definition f1' : var_env'' -> var_env'' := Evar_env''ntoSn U. Definition imagef1 : Ensemble var_env' := Im _ _ Evar_env'LU f1. Definition imagef1' : Ensemble var_env'' := Im _ _ Evar_env''LU f1'. Definition f2 (x : var_env') : var_env' := x. Definition f2' (x : var_env'') : var_env'' := x. Definition imagef2 : Ensemble var_env' := Im _ _ Evar_env'LU f2. Definition imagef2' : Ensemble var_env'' := Im _ _ Evar_env''LU f2'. Definition imagef1orf2 : Ensemble var_env' := Union _ imagef1 imagef2. Definition imagef1'orf2' : Ensemble var_env'' := Union _ imagef1' imagef2'. Lemma var_env''M0 : forall ve : var_env'', U - L = 0 -> In _ Evar_env''LU ve -> ve = M0 _. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold In in H0. unfold Evar_env''LU in H0. (* Goal: @eq bool (eval_be' be1 (var_env''_to_env' x)) true *) (* Goal: Evar_env'' L U x *) unfold Evar_env'' in H0. apply (mapcanon_unique unit). exact (proj1 H0). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply M0_canon. unfold eqmap, eqm in |- *. simpl in |- *. intro. (* Goal: forall _ : @eq bool (in_dom ad t bte) true, and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) cut (in_dom unit a ve = false). unfold in_dom in |- *. elim (MapGet unit ve a). Focus 2. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) reflexivity. intros. discriminate. apply (proj2 H0). unfold var_lu in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. elim (andb_prop _ _ H1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (0 < U - L). rewrite H. intro. exact (lt_n_O _ H4). (* Goal: lt O (Init.Nat.sub U L) *) (* Goal: forall (n : nat) (_ : forall (L U : nat) (ve : var_env') (_ : @eq nat n (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x))))) (L U : nat) (ve : var_env') (_ : @eq nat (S n) (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) apply lt_mn_minus. unfold lt in |- *. apply le_trans with (m := S (nat_of_N a)). (* Goal: BDDconfig_OK cfg *) apply le_n_S. apply leb_complete. assumption. apply leb_complete. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma same_set_same_cardinal : forall (U : Type) (X Y : Ensemble U) (n m : nat), cardinal U X n -> cardinal U Y m -> Same_set U X Y -> n = m. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply le_antisym. apply incl_card_le with (X := X) (Y := Y). assumption. (* Goal: BDDconfig_OK cfg *) assumption. exact (proj1 H1). apply incl_card_le with (X := Y) (Y := X). (* Goal: BDDconfig_OK cfg *) assumption. assumption. exact (proj2 H1). Qed. Lemma same_set_finite : forall (U : Type) (X Y : Ensemble U), Finite U X -> Same_set U X Y -> Finite U Y. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (finite_cardinal _ X H). intros. (* Goal: BDDconfig_OK cfg *) apply Finite_downward_closed with (A := X). assumption. exact (proj2 H0). Qed. Lemma singleton_add_empty : forall (U : Type) (x : U), Same_set _ (Singleton _ x) (Add _ (Empty_set _) x). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Same_set in |- *. split. unfold Included in |- *. intro. unfold Add in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. inversion H. apply Union_intror. apply In_singleton. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold Included in |- *. intro. unfold Add in |- *. intro. inversion H. elim H0. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma singleton_cardinal_one : forall (U : Type) (x : U), cardinal _ (Singleton _ x) 1. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (Finite _ (Singleton U0 x)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (finite_cardinal _ _ H). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cardinal _ (Add _ (Empty_set _) x) 1). intro. rewrite (same_set_same_cardinal _ (Singleton U0 x) (Add U0 (Empty_set U0) x) x0 1) in H0. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply singleton_add_empty. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply card_add. apply card_empty. unfold not in |- *; intro. elim H1. (* Goal: Finite var_env'' (Singleton (Map unit) (M0 unit)) *) (* Goal: Same_set var_env'' (Singleton (Map unit) (M0 unit)) Evar_env''LU *) apply Singleton_is_finite. Qed. Lemma M0inEvar_env'' : In (Map unit) Evar_env''LU (M0 unit). Proof. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold In in |- *. unfold Evar_env''LU in |- *. unfold Evar_env'' in |- *. split. apply M0_canon. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold in_dom in |- *. simpl in |- *. reflexivity. Qed. Lemma var_env''singleton : U - L = 0 -> Same_set _ Evar_env''LU (Singleton _ (M0 _)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Same_set in |- *. split. unfold Included in |- *. intros. (* Goal: BDDconfig_OK cfg *) rewrite (var_env''M0 x). apply In_singleton. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold Included in |- *. intros. rewrite <- (Singleton_inv _ _ _ H0). (* Goal: In var_env'' Evar_env''LU (M0 unit) *) exact M0inEvar_env''. Qed. Lemma var_env''cardinal_one : U - L = 0 -> cardinal _ Evar_env''LU 1. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (Finite _ Evar_env''LU). intro. elim (finite_cardinal _ _ H0). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (Same_set _ Evar_env''LU (Singleton _ (M0 _))). intro. rewrite <- (same_set_same_cardinal var_env'' Evar_env''LU (Singleton (Map unit) (M0 unit)) x 1). (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply singleton_cardinal_one. (* Goal: BDDconfig_OK cfg *) apply var_env''singleton. assumption. apply var_env''singleton. assumption. (* Goal: Finite var_env'' Evar_env''LU *) apply (same_set_finite var_env'' (Singleton _ (M0 _)) Evar_env''LU). (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply Singleton_is_finite. split. exact (proj2 (var_env''singleton H)). (* Goal: Included var_env'' Evar_env''LU (Singleton (Map unit) (M0 unit)) *) exact (proj1 (var_env''singleton H)). Qed. Lemma imagef1lemma' : forall ve : var_env'', In _ Evar_env''LSU ve -> in_dom _ (N_of_nat U) ve = true -> exists ve' : var_env'', In _ Evar_env''LU ve' /\ f1' ve' = ve. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Evar_env''LSU in H. unfold Evar_env'' in H. unfold In in H. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split with (MapRemove _ ve (N_of_nat U)). split. unfold In in |- *. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold Evar_env''LU in |- *. unfold Evar_env'' in |- *. split. apply MapRemove_canon. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj1 H). intros. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapRemove unit ve (N.of_nat U)) x with | Some a => true | None => false end false *) (* Goal: @eq var_env'' (f1' (MapRemove unit ve (N.of_nat U))) ve *) rewrite (MapRemove_semantics unit ve (N_of_nat U) x). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool (Neqb (N_of_nat U) x)). intro y. rewrite y. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. intro y. rewrite y. unfold in_dom in H. apply (proj2 H). (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) unfold var_lu in |- *. unfold var_lu in H1. elim (andb_false_elim _ _ H1). intro y0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y0. reflexivity. intro y0. (* Goal: @eq bool (andb (Nat.leb L (N.to_nat x)) (Nat.leb (S (N.to_nat x)) (S U))) false *) (* Goal: @eq var_env'' (f2' ve) ve *) replace (leb (S (nat_of_N x)) (S U)) with false. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (leb L (nat_of_N x)); reflexivity. symmetry in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. cut (nat_of_N x <= U). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. elim (le_le_S_eq _ _ H3). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite (leb_correct _ _ H4) in y0. discriminate. intro. (* Goal: False *) (* Goal: le (N.to_nat x) U *) (* Goal: @eq var_env'' (f1' (MapRemove unit ve (N.of_nat U))) ve *) rewrite <- H4 in y. rewrite (N_of_nat_of_N x) in y. (* Goal: le x0 n0 *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite (Neqb_correct x) in y. discriminate. apply le_S_n. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. unfold f1' in |- *. unfold Evar_env''ntoSn in |- *. (* Goal: @eq var_env'' (MapPut unit (MapRemove unit ve (N.of_nat U)) (N.of_nat U) tt) ve *) unfold var_env'' in ve. apply (mapcanon_unique _ (MapPut unit (MapRemove unit ve (N_of_nat U)) (N_of_nat U) tt) ve). (* Goal: mapcanon unit (MapPut unit (MapRemove unit ve (N.of_nat U)) (N.of_nat U) tt) *) (* Goal: mapcanon unit ve *) (* Goal: eqmap unit (MapPut unit (MapRemove unit ve (N.of_nat U)) (N.of_nat U) tt) ve *) apply MapPut_canon. apply MapRemove_canon. exact (proj1 H). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj1 H). unfold eqmap in |- *. unfold eqm in |- *. intro. rewrite (MapPut_semantics unit (MapRemove unit ve (N_of_nat U)) (N_of_nat U) tt a). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim H; intros. elim (sumbool_of_bool (Neqb (N_of_nat U) a)). intro y. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y. unfold in_dom in H0. rewrite (Neqb_complete _ _ y) in H0. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (option_sum _ (MapGet unit ve a)). intro y0. elim y0. intro x. elim x. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros y1. rewrite y1. reflexivity. intro y0. rewrite y0 in H0. discriminate. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. rewrite y. rewrite (MapRemove_semantics unit ve (N_of_nat U) a). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y. reflexivity. Qed. Lemma imagef2lemma' : forall ve : var_env'', In _ Evar_env''LSU ve -> in_dom _ (N_of_nat U) ve = false -> exists ve' : var_env'', In _ Evar_env''LU ve' /\ f2' ve' = ve. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Evar_env''LSU in H. unfold Evar_env'' in H. unfold In in H. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split with ve. split. unfold In in |- *. unfold Evar_env''LU in |- *. unfold Evar_env'' in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. exact (proj1 H). intros. unfold var_lu in H1. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (andb_false_elim _ _ H1). intro y. apply (proj2 H). unfold var_lu in |- *. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y. reflexivity. intro y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (Neqb x (N_of_nat U))). intro y0. (* Goal: BDDconfig_OK cfg *) rewrite <- (Neqb_complete _ _ y0) in H0. assumption. intro y0. (* Goal: @eq bool (var_lu O N x) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@List.In BDDvar x (lx N))), @eq bool (var_lu O N x) true *) apply (proj2 H). unfold var_lu in |- *. (* Goal: @eq bool (andb (Nat.leb L (N.to_nat x)) (Nat.leb (S (N.to_nat x)) (S U))) false *) (* Goal: @eq var_env'' (f2' ve) ve *) replace (leb (S (nat_of_N x)) (S U)) with false. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (leb L (nat_of_N x)); reflexivity. symmetry in |- *. simpl in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *; intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (le_le_S_eq _ _ (leb_complete _ _ H2)). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite (leb_correct _ _ H3) in y. discriminate. intro. (* Goal: False *) (* Goal: @eq var_env'' (f2' ve) ve *) rewrite <- H3 in y0. rewrite (N_of_nat_of_N x) in y0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (Neqb_correct x) in y0. discriminate. reflexivity. Qed. Lemma imagef1'orf2'lemma : forall ve : var_env'', In _ Evar_env''LSU ve -> In _ imagef1'orf2' ve. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Evar_env''LSU in H. unfold Evar_env'' in H. unfold In in H. (* Goal: Finite var_env'' imagef1'orf2' *) unfold imagef1'orf2' in |- *. elim (sumbool_of_bool (in_dom _ (N_of_nat U) ve)). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. apply Union_introl. unfold imagef1' in |- *. elim (imagef1lemma' ve H y). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply (Im_intro _ _ Evar_env''LU f1' x). exact (proj1 H0). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (proj2 H0). reflexivity. intro y. elim (imagef2lemma' ve H y). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply Union_intror. unfold imagef2' in |- *. elim (imagef2lemma' ve H y). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply (Im_intro _ _ Evar_env''LU f2' x). exact (proj1 H0). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (proj2 H0). reflexivity. Qed. Section CardImage. Variable n : nat. Hypothesis H : cardinal _ Evar_env''LU n. Lemma card_imagef1'lemma : forall m : nat, cardinal _ imagef1' m -> m <= n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold imagef1' in |- *. intros. (* Goal: BDDconfig_OK cfg *) apply cardinal_decreases with (A := Evar_env''LU) (f := f1'). assumption. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma card_imagef2'lemma : forall m : nat, cardinal _ imagef2' m -> m <= n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold imagef2' in |- *. intros. (* Goal: BDDconfig_OK cfg *) apply cardinal_decreases with (A := Evar_env''LU) (f := f2'). assumption. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma imagef1'finite : Finite _ imagef1'. Proof. (* Goal: Finite var_env'' Evar_env''LU *) unfold imagef1' in |- *. apply finite_image. apply cardinal_finite with (n := n). (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma imagef2'finite : Finite _ imagef2'. Proof. (* Goal: Finite var_env'' Evar_env''LU *) unfold imagef2' in |- *. apply finite_image. apply cardinal_finite with (n := n). (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma card_imagef1'orf2'lemma : forall m : nat, cardinal _ imagef1'orf2' m -> m <= 2 * n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. simpl in |- *. rewrite <- (plus_n_O n). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (finite_cardinal _ _ imagef1'finite). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (finite_cardinal _ _ imagef2'finite). intros. (* Goal: le m (Init.Nat.add n n) *) apply le_trans with (m := x + x0). unfold imagef1'orf2' in H0. (* Goal: BDDconfig_OK cfg *) apply cardinal_Union with (X := imagef1') (Y := imagef2'). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply plus_le_compat. apply card_imagef1'lemma. assumption. (* Goal: BDDconfig_OK cfg *) apply card_imagef2'lemma. assumption. Qed. Lemma imagef1'orf2'finite : Finite _ imagef1'orf2'. Proof. (* Goal: Finite var_env'' (Union var_env'' imagef1' imagef2') *) unfold imagef1'orf2' in |- *. apply Union_preserves_Finite. apply imagef1'finite. (* Goal: Finite var_env'' imagef2' *) apply imagef2'finite. Qed. Lemma card_Evar_env''LSU_lemma : forall m : nat, cardinal _ Evar_env''LSU m -> m <= 2 * n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (finite_cardinal _ imagef1'orf2'). intros. (* Goal: le x0 (two_power (Init.Nat.sub U L)) *) (* Goal: be_eq (f x0) (f (S x0)) *) (* Goal: cardinal var_env'' (bool_expr_to_var_env'' L U (f O)) x *) (* Goal: forall k : nat, be_le (f (S k)) (f k) *) (* Goal: forall k : nat, be_ok (var_lu L U) (f k) *) apply le_trans with (m := x). (* Goal: BDDconfig_OK cfg *) apply incl_card_le with (X := Evar_env''LSU) (Y := imagef1'orf2'). assumption. (* Goal: BDDconfig_OK cfg *) assumption. exact imagef1'orf2'lemma. apply card_imagef1'orf2'lemma. (* Goal: BDDconfig_OK cfg *) assumption. apply imagef1'orf2'finite. Qed. Lemma Evar_env''LSU_finite : Finite _ Evar_env''LSU. Proof. (* Goal: Finite var_env'' Evar_env''LSU *) apply Finite_downward_closed with (A := imagef1'orf2'). (* Goal: Included var_env'' Evar_env''LSU imagef1'orf2' *) apply imagef1'orf2'finite. exact imagef1'orf2'lemma. Qed. End CardImage. End Evar_env''LULSU. Lemma Evar_env''LSULU : forall L U : nat, Evar_env''LSU L U = Evar_env''LU L (S U). Proof. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. Qed. Lemma Eenv_var''LU_finite : forall n L U : nat, n = U - L -> Finite _ (Evar_env''LU L U). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. intros. apply cardinal_finite with (n := 1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply var_env''cardinal_one. rewrite H. reflexivity. intros. (* Goal: forall _ : @eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) true, be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (f (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0))) *) cut (U = S (L + n0)). intro. rewrite H1. (* Goal: Finite var_env'' (Evar_env''LU L (S (Init.Nat.add L n0))) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite <- (Evar_env''LSULU L (L + n0)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (finite_cardinal _ (Evar_env''LU L (L + n0))). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply Evar_env''LSU_finite with (n := x). assumption. apply H. symmetry in |- *. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add L n0) L) n0 *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply minus_plus. rewrite (Splus_nm L n0). rewrite (plus_Snm_nSm L n0). (* Goal: @eq bool (andb (negb false) (mu_rel_free P0 g)) true *) rewrite H0. apply le_plus_minus. apply lt_le_weak. apply lt_O_minus_lt. (* Goal: lt (f (S O)) n0 *) rewrite <- H0. auto with arith. Qed. Lemma Eenv_var''LU_card : forall n L U c : nat, n = U - L -> cardinal _ (Evar_env''LU L U) c -> c <= two_power n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. simpl in |- *. intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cardinal var_env'' (Evar_env''LU L U) 1). intro. (* Goal: not (@eq nat (S n1) O) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: be_le be (bef be) *) (* Goal: be_le (be_iter1 bef be (S n1)) (be_iter1 bef be (S (S n1))) *) rewrite (cardinal_unicity _ _ _ H0 _ H1). auto with arith. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply var_env''cardinal_one. rewrite H. reflexivity. intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (U = S (L + n0)). intro. rewrite H2 in H1. (* Goal: le c (two_power (S n0)) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) replace (two_power (S n0)) with (2 * two_power n0). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (finite_cardinal _ (Evar_env''LU L (L + n0))). intros. (* Goal: le c (Init.Nat.mul (S (S O)) (two_power n0)) *) (* Goal: Finite var_env'' (Evar_env''LU L (Init.Nat.add L n0)) *) (* Goal: @eq nat (Init.Nat.mul (S (S O)) (two_power n0)) (two_power (S n0)) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply le_trans with (m := 2 * x). (* Goal: BDDconfig_OK cfg *) apply card_Evar_env''LSU_lemma with (L := L) (U := L + n0). assumption. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. simpl in |- *. rewrite <- (plus_n_O x). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite <- (plus_n_O (two_power n0)). cut (x <= two_power n0). intro. (* Goal: BDDconfig_OK cfg *) apply plus_le_compat. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply H with (L := L) (U := L + n0). symmetry in |- *. apply minus_plus. assumption. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add L n0) L) n0 *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply Eenv_var''LU_finite with (n := n0). symmetry in |- *. apply minus_plus. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. rewrite (Splus_nm L n0). rewrite (plus_Snm_nSm L n0). (* Goal: @eq bool (andb (negb false) (mu_rel_free P0 g)) true *) rewrite H0. apply le_plus_minus. apply lt_le_weak. apply lt_O_minus_lt. (* Goal: lt (f (S O)) n0 *) rewrite <- H0. auto with arith. Qed. Lemma Eenv''_var''finite : forall L U : nat, Finite _ (Evar_env'' L U). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply Eenv_var''LU_finite with (n := U - L). reflexivity. Qed. Lemma Eenv''_var''card : forall L U n : nat, cardinal _ (Evar_env''LU L U) n -> n <= two_power (U - L). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply Eenv_var''LU_card with (L := L) (U := U). reflexivity. assumption. Qed. (* Inductive index : Set := i_intro : (n:nat)(le L n) -> (lt n U) -> index. Definition order := [i:index]Cases i of (i_intro n _ _) => n end. Definition index_eq := [i,j:index](order i)=(order j). Section Sequence. Variable A:Set. Variable A_eq:A->A->Prop. Definition seq := index -> A. Definition seq_ok := [s:seq](i,j:index)(index_eq i j) -> (A_eq (s i) (s j)). Definition seq_inj := [s:seq](i,j:index)(A_eq (s i) (s j)) -> (index_eq i j). Definition seq_surj := [s:seq](a:A)(EX i:index|(A_eq (s i) a)). End Sequence. Lemma nat_to_index : (n:nat)(le L n) -> (lt n U) -> (EX i:index|(order i)=n). Proof. Intros. Split with (i_intro n H H0). Auto with v62. Qed. Lemma var_lu_to_index1 : (x:ad)(var_lu x)=true->index. Proof. Unfold var_lu. Intros. Elim (andb_prop ? ? H). Intros. Refine (i_intro (nat_of_N x) ? ?). Apply leb_complete. Assumption. Unfold lt. Apply leb_complete. Assumption. Qed. Lemma var_lu_to_index2 : (x:BDDvar; pi:(var_lu x)=true)(order (var_lu_to_index1 x pi))=(nat_of_N x). Lemma var_lu_to_index : (x:ad)(var_lu x)=true->(EX i:index|(order i)=(nat_of_N x)). Proof. Unfold var_lu. Intros. Elim (andb_prop ? ? H). Intros. Split with (i_intro (nat_of_N x) (leb_complete ? ? H0) (leb_complete ? ? H1)). Reflexivity. Qed. Inductive be_lu : Set := be_lu_intro : (be:bool_expr)(be_ok var_lu be) -> be_lu. Definition be_of_be_lu := [bel:be_lu]Cases bel of (be_lu_intro be _) => be end. Definition var_env_lu := (seq bool). Definition env_lu_to_var_binding := [vel:var_env_lu;x:BDDvar] (* problem in defining this function *) Cases (var_lu x) of true => (([pi:true=(var_lu x)](vel (var_lu_to_index1 x (sym_eq ? ? ? pi)))) (refl_equal ? (var_lu x))) | false => false end. Lemma eval_be' : be_lu -> var_env_lu -> bool. (* to be completed *) Proof. Unfold var_env_lu. Unfold seq. Intros. Elim H. Induction be. Intros. Exact false. Intros. Exact true. Intros. Exact true. Intros. Exact true. Intros. Exact true. Intros. Exact true. Intros. Exact true. Intros. Exact true. Qed. *) Lemma minusUL0_var_lu : forall L U : nat, U - L = 0 -> forall x : ad, var_lu L U x = false. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply not_true_is_false. unfold var_lu in |- *. unfold not in |- *; intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (andb_prop _ _ H0). intros. absurd (0 < U - L). rewrite H. (* Goal: lt O (Init.Nat.sub U L) *) (* Goal: forall (n : nat) (_ : forall (L U : nat) (ve : var_env') (_ : @eq nat n (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x))))) (L U : nat) (ve : var_env') (_ : @eq nat (S n) (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) apply lt_irrefl. apply lt_mn_minus. unfold lt in |- *. (* Goal: le (S L) (S (N.to_nat x)) *) (* Goal: le (S (N.to_nat x)) U *) (* Goal: forall (n : nat) (_ : forall (L U : nat) (ve : var_env') (_ : @eq nat n (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x))))) (L U : nat) (ve : var_env') (_ : @eq nat (S n) (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) apply le_trans with (m := S (nat_of_N x)). apply le_n_S. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. apply leb_complete. assumption. Qed. Definition bool_expr_to_var_env'' (L U : nat) (be : bool_expr) : Ensemble var_env'' := fun ve => eval_be' be (var_env''_to_env' ve) = true /\ In _ (Evar_env'' L U) ve. Definition be_le1 (L U : nat) (be1 be2 : bool_expr) := forall ve : var_env'', In _ (bool_expr_to_var_env'' L U be1) ve -> In _ (bool_expr_to_var_env'' L U be2) ve. Lemma var_env'_to_var_env''_lemma1 : forall (n L U : nat) (ve : var_env'), n = U - L -> exists ve'' : var_env'', In _ (Evar_env'' L U) ve'' /\ (forall x : ad, var_lu L U x = true -> in_dom _ x ve'' = ve (nat_of_N x)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. intros. split with (M0 unit). split. apply M0inEvar_env''. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_lu in |- *. intros. absurd (0 < U - L). rewrite H. apply lt_irrefl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply lt_mn_minus. elim (andb_prop _ _ H0). intros. unfold lt in |- *. (* Goal: le (S L) (S (N.to_nat x)) *) (* Goal: le (S (N.to_nat x)) U *) (* Goal: forall (n : nat) (_ : forall (L U : nat) (ve : var_env') (_ : @eq nat n (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x))))) (L U : nat) (ve : var_env') (_ : @eq nat (S n) (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) apply le_trans with (m := S (nat_of_N x)). apply le_n_S. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. apply leb_complete. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (U = S (L + n0)). intro. elim (H L (L + n0) ve). intros. (* Goal: forall _ : @eq bool x0 true, be_eq (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) (* Goal: forall _ : @eq bool x0 false, be_eq (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) elim (sumbool_of_bool (ve (L + n0))). intros y. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split with (MapPut _ x (N_of_nat (L + n0)) tt). intros. unfold in_dom in |- *. (* Goal: forall _ : @eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) true, be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (f (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0))) *) split. rewrite H1. fold (Evar_env''ntoSn (L + n0) x) in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply Evar_env''ntoSn_lemma. apply le_plus_l. exact (proj1 H2). intros. (* Goal: @eq bool match MapGet unit (MapPut unit x (N.of_nat (Init.Nat.add L n0)) tt) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: forall _ : @eq bool (ve (Init.Nat.add L n0)) false, @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapPut_semantics unit x (N_of_nat (L + n0)) tt x0). (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y0. (* Goal: le (S x0) (S n0) *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y0. rewrite <- (Neqb_complete _ _ y0). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (nat_of_N_of_nat (L + n0)). rewrite y. reflexivity. intro y0. (* Goal: le (S x0) (S n0) *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y0. unfold in_dom in H2. apply (proj2 H2). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (andb_prop _ _ H3). intros. unfold var_lu in |- *. rewrite H4. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) replace (leb (S (nat_of_N x0)) (L + n0)) with true. reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) symmetry in |- *. elim (le_le_S_eq (nat_of_N x0) (L + n0)). intro. (* Goal: BDDconfig_OK cfg *) apply leb_correct. assumption. intro. rewrite <- H6 in y0. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (N_of_nat_of_N x0) in y0. rewrite (Neqb_correct x0) in y0. (* Goal: used_node' cfg (@cons ad node ul) node0 *) (* Goal: forall (_ : @eq bool (N.eqb P P0) false) (_ : @eq (option ad) (if N.eqb P P0 then @Some ad node else MapGet ad bre P0) (@Some ad node0)), used_node' cfg (@cons ad node ul) node0 *) discriminate. apply le_S_n. rewrite <- H1. apply leb_complete. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. intro y. split with (MapRemove _ x (N_of_nat (L + n0))). (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split. unfold Evar_env'' in |- *. unfold In in |- *. split. apply MapRemove_canon. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj1 (proj1 H2)). intros. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapRemove unit x (N.of_nat (Init.Nat.add L n0))) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapRemove_semantics unit x (N_of_nat (L + n0)) x0). (* Goal: lfp_be bef be (be_iter bef be O) *) (* Goal: @eq nat x O *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : be_le be (bef be)) (_ : forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : @ex nat (fun m : nat => and (le m n) (be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))))), lfp_be bef be (be_iter bef be n)) (be : bool_expr) (_ : be_le be (bef be)) (_ : forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : @ex nat (fun m : nat => and (le m (S n)) (be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))))), lfp_be bef be (be_iter bef be (S n)) *) rewrite H1 in H3. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y0. reflexivity. intro y0. rewrite y0. unfold Evar_env'' in H2. (* Goal: @eq bool match MapGet unit x x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) unfold In in H2. unfold in_dom in H2. apply (proj2 (proj1 H2)). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *. intro. unfold var_lu in H4. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) unfold var_lu in H3. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (andb_prop _ _ H4); intros H6 H7. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite H6 in H3. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (le_le_S_eq (nat_of_N x0) (L + n0)). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (leb (S (nat_of_N x0)) (S (L + n0)) = true). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H8 in H3. discriminate. apply leb_correct. (* Goal: BDDconfig_OK cfg *) apply le_trans with (m := L + n0). assumption. apply le_n_Sn. intro. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite <- H5 in y0. rewrite (N_of_nat_of_N x0) in y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (Neqb_correct x0) in y0. discriminate. (* Goal: le (N.to_nat x0) (S (N.to_nat x0)) *) (* Goal: le (S (N.to_nat x0)) (Init.Nat.add L n0) *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply le_trans with (m := S (nat_of_N x0)). apply le_n_Sn. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply leb_complete. assumption. intros. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapRemove unit x (N.of_nat (Init.Nat.add L n0))) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapRemove_semantics unit x (N_of_nat (L + n0)) x0). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H1 in H3. elim (andb_prop _ _ H3). intros. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y0. (* Goal: le (S x0) (S n0) *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y0. rewrite <- (Neqb_complete _ _ y0). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (nat_of_N_of_nat (L + n0)). rewrite y. reflexivity. intro y0. (* Goal: @eq bool (var_lu O N x) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@List.In BDDvar x (lx N))), @eq bool (var_lu O N x) true *) rewrite y0. unfold in_dom in H2. apply (proj2 H2). unfold var_lu in |- *. (* Goal: @eq bool (andb (Nat.leb L (N.to_nat x0)) (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0))) true *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite H4. replace (leb (S (nat_of_N x0)) (L + n0)) with true. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. symmetry in |- *. elim (le_le_S_eq (nat_of_N x0) (L + n0)). (* Goal: BDDconfig_OK cfg *) intro. apply leb_correct. assumption. intro. rewrite <- H6 in y0. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (N_of_nat_of_N x0) in y0. rewrite (Neqb_correct x0) in y0. (* Goal: BDDconfig_OK cfg *) discriminate. apply le_S_n. apply leb_complete. assumption. symmetry in |- *. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add L n0) L) n0 *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply minus_plus. rewrite (Splus_nm L n0). rewrite (plus_Snm_nSm L n0). (* Goal: @eq bool (andb (negb false) (mu_rel_free P0 g)) true *) rewrite H0. apply le_plus_minus. apply lt_le_weak. apply lt_O_minus_lt. (* Goal: lt (f (S O)) n0 *) rewrite <- H0. auto with arith. Qed. Lemma var_env'_to_var_env''_lemma2 : forall (n L U : nat) (ve : var_env'), n = U - L -> {ve'' : var_env'' | In _ (Evar_env'' L U) ve'' /\ (forall x : ad, var_lu L U x = true -> in_dom _ x ve'' = ve (nat_of_N x))}. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. intros. split with (M0 unit). split. apply M0inEvar_env''. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_lu in |- *. intros. absurd (0 < U - L). rewrite H. apply lt_irrefl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply lt_mn_minus. elim (andb_prop _ _ H0). intros. unfold lt in |- *. (* Goal: le (S L) (S (N.to_nat x)) *) (* Goal: le (S (N.to_nat x)) U *) (* Goal: forall (n : nat) (_ : forall (L U : nat) (ve : var_env') (_ : @eq nat n (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x))))) (L U : nat) (ve : var_env') (_ : @eq nat (S n) (Init.Nat.sub U L)), @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) apply le_trans with (m := S (nat_of_N x)). apply le_n_S. (* Goal: BDDconfig_OK cfg *) apply leb_complete. assumption. apply leb_complete. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. cut (U = S (L + n0)). intro. elim (H L (L + n0) ve). intros x y. (* Goal: @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (sumbool_of_bool (ve (L + n0))). intros y0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split with (MapPut _ x (N_of_nat (L + n0)) tt). intros. unfold in_dom in |- *. (* Goal: forall _ : @eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) true, be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (f (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0))) *) split. rewrite H1. fold (Evar_env''ntoSn (L + n0) x) in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply Evar_env''ntoSn_lemma. apply le_plus_l. exact (proj1 y). intros. (* Goal: @eq bool match MapGet unit (MapPut unit x (N.of_nat (Init.Nat.add L n0)) tt) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: forall _ : @eq bool (ve (Init.Nat.add L n0)) false, @sig var_env'' (fun ve'' : var_env'' => and (In var_env'' (Evar_env'' L U) ve'') (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x ve'') (ve (N.to_nat x)))) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapPut_semantics unit x (N_of_nat (L + n0)) tt x0). (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y1. (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite y1. rewrite <- (Neqb_complete _ _ y1). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (nat_of_N_of_nat (L + n0)). rewrite y0. reflexivity. intro y1. (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite y1. unfold in_dom in y. apply (proj2 y). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (andb_prop _ _ H2). intros. unfold var_lu in |- *. rewrite H3. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) replace (leb (S (nat_of_N x0)) (L + n0)) with true. reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) symmetry in |- *. elim (le_le_S_eq (nat_of_N x0) (L + n0)). intro. (* Goal: BDDconfig_OK cfg *) apply leb_correct. assumption. intro. rewrite <- H5 in y1. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (N_of_nat_of_N x0) in y1. rewrite (Neqb_correct x0) in y1. (* Goal: used_node' cfg (@cons ad node ul) node0 *) (* Goal: forall (_ : @eq bool (N.eqb P P0) false) (_ : @eq (option ad) (if N.eqb P P0 then @Some ad node else MapGet ad bre P0) (@Some ad node0)), used_node' cfg (@cons ad node ul) node0 *) discriminate. apply le_S_n. rewrite <- H1. apply leb_complete. (* Goal: BDDconfig_OK cfg *) assumption. intro y0. split with (MapRemove _ x (N_of_nat (L + n0))). (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split. unfold Evar_env'' in |- *. unfold In in |- *. split. apply MapRemove_canon. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj1 (proj1 y)). intros. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapRemove unit x (N.of_nat (Init.Nat.add L n0))) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapRemove_semantics unit x (N_of_nat (L + n0)) x0). (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite H1 in H2. (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y1. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y1. reflexivity. intro y1. rewrite y1. unfold Evar_env'' in y. (* Goal: @eq bool match MapGet unit x x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) unfold In in y. unfold in_dom in y. apply (proj2 (proj1 y)). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply not_true_is_false. unfold not in |- *. intro. unfold var_lu in H3. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) unfold var_lu in H2. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (andb_prop _ _ H3); intros H5 H6. (* Goal: False *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite H5 in H2. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (le_le_S_eq (nat_of_N x0) (L + n0)). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (leb (S (nat_of_N x0)) (S (L + n0)) = true). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H7 in H2. discriminate. apply leb_correct. (* Goal: BDDconfig_OK cfg *) apply le_trans with (m := L + n0). assumption. apply le_n_Sn. intro. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite <- H4 in y1. rewrite (N_of_nat_of_N x0) in y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (Neqb_correct x0) in y1. discriminate. (* Goal: le (N.to_nat x0) (S (N.to_nat x0)) *) (* Goal: le (S (N.to_nat x0)) (Init.Nat.add L n0) *) (* Goal: forall (x0 : ad) (_ : @eq bool (var_lu L U x0) true), @eq bool (in_dom unit x0 (MapRemove unit x (N.of_nat (Init.Nat.add L n0)))) (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply le_trans with (m := S (nat_of_N x0)). apply le_n_Sn. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply leb_complete. assumption. intros. unfold in_dom in |- *. (* Goal: @eq bool match MapGet unit (MapRemove unit x (N.of_nat (Init.Nat.add L n0))) x0 with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (MapRemove_semantics unit x (N_of_nat (L + n0)) x0). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H1 in H2. elim (andb_prop _ _ H2). intros. (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) elim (sumbool_of_bool (Neqb (N_of_nat (L + n0)) x0)). intro y1. (* Goal: @eq bool match (if N.eqb (N.of_nat (Init.Nat.add L n0)) x0 then @None unit else MapGet unit x x0) with | Some a => true | None => false end (ve (N.to_nat x0)) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite y1. rewrite <- (Neqb_complete _ _ y1). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (nat_of_N_of_nat (L + n0)). rewrite y0. reflexivity. intro y1. (* Goal: @eq bool (var_lu O N x) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@List.In BDDvar x (lx N))), @eq bool (var_lu O N x) true *) rewrite y1. unfold in_dom in y. apply (proj2 y). unfold var_lu in |- *. (* Goal: @eq bool (andb true (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0))) true *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite H3. replace (leb (S (nat_of_N x0)) (L + n0)) with true. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. symmetry in |- *. elim (le_le_S_eq (nat_of_N x0) (L + n0)). (* Goal: BDDconfig_OK cfg *) intro. apply leb_correct. assumption. intro. rewrite <- H5 in y1. (* Goal: @eq bool (Nat.leb (S (N.to_nat x0)) (Init.Nat.add L n0)) true *) (* Goal: le (N.to_nat x0) (Init.Nat.add L n0) *) (* Goal: @eq nat n0 (Init.Nat.sub (Init.Nat.add L n0) L) *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) rewrite (N_of_nat_of_N x0) in y1. rewrite (Neqb_correct x0) in y1. (* Goal: BDDconfig_OK cfg *) discriminate. apply le_S_n. apply leb_complete. assumption. symmetry in |- *. (* Goal: @eq nat (Init.Nat.sub (Init.Nat.add L n0) L) n0 *) (* Goal: @eq nat U (S (Init.Nat.add L n0)) *) apply minus_plus. rewrite (Splus_nm L n0). rewrite (plus_Snm_nSm L n0). (* Goal: @eq bool (andb (negb false) (mu_rel_free P0 g)) true *) rewrite H0. apply le_plus_minus. apply lt_le_weak. apply lt_O_minus_lt. (* Goal: lt (f (S O)) n0 *) rewrite <- H0. auto with arith. Qed. Definition var_env'_to_env'' (L U : nat) (ve : var_env') := match var_env'_to_var_env''_lemma2 (U - L) L U ve (refl_equal _) with | exist ve'' _ => ve'' end. Lemma var_env'_to_env''_lemma3 : forall (L U : nat) (ve : var_env'), In _ (Evar_env'' L U) (var_env'_to_env'' L U ve) /\ (forall x : ad, var_lu L U x = true -> in_dom _ x (var_env'_to_env'' L U ve) = ve (nat_of_N x)). Proof. (* Goal: forall (L U : nat) (ve : var_env'), and (In var_env'' (Evar_env'' L U) (var_env'_to_env'' L U ve)) (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x (var_env'_to_env'' L U ve)) (ve (N.to_nat x))) *) intros L U ve. unfold var_env'_to_env'' in |- *. (* Goal: and (In var_env'' (Evar_env'' L U) (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub U L) L U ve (@eq_refl nat (Init.Nat.sub U L)) in ve'')) (forall (x : ad) (_ : @eq bool (var_lu L U x) true), @eq bool (in_dom unit x (let (ve'', _) := var_env'_to_var_env''_lemma2 (Init.Nat.sub U L) L U ve (@eq_refl nat (Init.Nat.sub U L)) in ve'')) (ve (N.to_nat x))) *) elim (var_env'_to_var_env''_lemma2 (U - L) L U ve (refl_equal (U - L))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. assumption. Qed. Lemma be_le1_le : forall (L U : nat) (be1 be2 : bool_expr), be_ok (var_lu L U) be1 -> be_ok (var_lu L U) be2 -> be_le1 L U be1 be2 -> be_le be1 be2. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold be_le in |- *. intros. unfold be_le1 in H1. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (var_env'_to_var_env''_lemma1 (U - L) L U ve). intros. (* Goal: @eq bool (eval_be' be2 ve) true *) (* Goal: @eq nat (Init.Nat.sub U L) (Init.Nat.sub U L) *) unfold bool_expr_to_var_env'' in H1. unfold In in H1. unfold In in H3. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (seq_eq L U _ (eq (A:=_)) ve (var_env''_to_env' x)). intro. elim (H1 x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite (eval_be_independent L U ve (var_env''_to_env' x) H4 be2). (* Goal: BDDconfig_OK cfg *) assumption. assumption. split. (* Goal: @eq bool (eval_be' be1 (var_env''_to_env' x)) true *) (* Goal: Evar_env'' L U x *) (* Goal: seq_eq L U bool (@eq bool) ve (var_env''_to_env' x) *) (* Goal: @eq nat (Init.Nat.sub U L) (Init.Nat.sub U L) *) rewrite (eval_be_independent L U ve (var_env''_to_env' x) H4 be1) in H2. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. assumption. exact (proj1 H3). unfold seq_eq in |- *. intros. (* Goal: @eq bool (ve n) (var_env''_to_env' x n) *) (* Goal: @eq nat (Init.Nat.sub U L) (Init.Nat.sub U L) *) unfold var_env''_to_env' in |- *. symmetry in |- *. (* Goal: @eq bool (in_dom unit (N.of_nat n) x) (ve n) *) (* Goal: @eq nat (Init.Nat.sub U L) (Init.Nat.sub U L) *) replace (ve n) with (ve (nat_of_N (N_of_nat n))). apply (proj2 H3). (* Goal: BDDconfig_OK cfg *) apply nat_lu_var_lu. assumption. rewrite (nat_of_N_of_nat n). reflexivity. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. Qed. Lemma be_le_le1 : forall (L U : nat) (be1 be2 : bool_expr), be_le be1 be2 -> be_le1 L U be1 be2. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold be_le1 in |- *. unfold In in |- *. unfold bool_expr_to_var_env'' in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. apply H. exact (proj1 H0). exact (proj2 H0). Qed. Definition var_env''le (ve1 ve2 : var_env'') := forall x : ad, in_dom _ x ve1 = true -> in_dom _ x ve2 = true. Lemma var_env''le_refl : forall ve : var_env'', var_env''le ve ve. Proof. (* Goal: forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat O O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be be) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S O) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (bef be) *) (* Goal: forall (n : nat) (_ : forall (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n)) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (_ : forall (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S n) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S n))) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat (S (S n)) O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be (S (S n))) *) unfold var_env''le in |- *. trivial. Qed. Lemma var_env''le_trans : forall ve1 ve2 ve3 : var_env'', var_env''le ve1 ve2 -> var_env''le ve2 ve3 -> var_env''le ve1 ve3. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_env''le in |- *. intros. apply H0. apply H. assumption. Qed. Lemma be_le_ens_inc : forall (be1 be2 : bool_expr) (L U : nat), be_le be1 be2 -> Included _ (bool_expr_to_var_env'' L U be1) (bool_expr_to_var_env'' L U be2). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold Included, bool_expr_to_var_env'' in |- *. intros. unfold In in |- *. unfold In in H0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold be_le in H. split. apply H. exact (proj1 H0). (* Goal: In var_env'' (Evar_env'' L U) x *) exact (proj2 H0). Qed. Lemma incl_eq : forall (U : Type) (A B : Ensemble U) (n : nat), Included _ A B -> cardinal _ A n -> cardinal _ B n -> Included _ B A. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold Included in |- *. intros. elim (classic (In _ A x)). trivial. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. elim (lt_irrefl n). fold (n > n) in |- *. (* Goal: BDDconfig_OK cfg *) apply incl_st_card_lt with (X := A) (Y := B). assumption. assumption. split. (* Goal: BDDconfig_OK cfg *) assumption. unfold not in |- *; intro. rewrite H4 in H3. apply H3. assumption. Qed. Lemma decreasing_seq : forall (n : nat) (f : nat -> nat), f 0 = n -> (forall n : nat, f (S n) <= f n) -> exists m : nat, m <= n /\ f m = f (S m). Proof. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. apply lt_wf_ind with (P := fun n : nat => forall f : nat -> nat, f 0 = n -> (forall n : nat, f (S n) <= f n) -> exists m : nat, m <= n /\ f m = f (S m)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (eq_nat_decide (f 0) (f 1)). intro y. split with 0. split. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply le_O_n. apply eq_nat_eq. assumption. intro y. cut (f 1 < n0). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. elim (H (f 1) H2 (fun n : nat => f (S n))). intros. split with (S x). (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split. fold (x < n0) in |- *. apply le_lt_trans with (m := f 1). (* Goal: BDDconfig_OK cfg *) exact (proj1 H3). assumption. exact (proj2 H3). reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. apply H1. rewrite <- H0. elim (le_le_S_eq (f 1) (f 0)). intro. (* Goal: BDDconfig_OK cfg *) assumption. intro. rewrite H2 in y. elim (y (eq_nat_refl _)). apply H1. Qed. Lemma decreasing_ens_seq : forall (U : Type) (n : nat) (f : nat -> Ensemble U), cardinal _ (f 0) n -> (forall k : nat, Finite _ (f k)) -> (forall k : nat, Included _ (f (S k)) (f k)) -> exists m : nat, (exists c : nat, m <= n /\ cardinal _ (f m) c /\ cardinal _ (f (S m)) c). Proof. (* Goal: forall (U : Type) (n : nat) (f : forall _ : nat, Ensemble U) (_ : cardinal U (f O) n) (_ : forall k : nat, Finite U (f k)) (_ : forall k : nat, Included U (f (S k)) (f k)), @ex nat (fun m : nat => @ex nat (fun c : nat => and (le m n) (and (cardinal U (f m) c) (cardinal U (f (S m)) c)))) *) intros U n. apply lt_wf_ind with (P := fun n : nat => forall f : nat -> Ensemble U, cardinal U (f 0) n -> (forall k : nat, Finite U (f k)) -> (forall k : nat, Included U (f (S k)) (f k)) -> exists m : nat, (exists c : nat, m <= n /\ cardinal U (f m) c /\ cardinal U (f (S m)) c)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (finite_cardinal _ _ (H1 1)). intros. (* Goal: forall _ : @eq bool x0 true, be_eq (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) (* Goal: forall _ : @eq bool x0 false, be_eq (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) elim (eq_nat_decide n0 x). intros y. split with 0. split with n0. split. (* Goal: BDDconfig_OK cfg *) apply le_O_n. split. assumption. rewrite (eq_nat_eq _ _ y). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro y. cut (x < n0). intro. elim (H x H4 (fun n : nat => f (S n))). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim H5; clear H5. intros. split with (S x0). split with x1. split. (* Goal: le (S x0) n0 *) (* Goal: and (cardinal U (f (S x0)) x1) (cardinal U (f (S (S x0))) x1) *) (* Goal: cardinal U (f (S O)) x *) (* Goal: forall k : nat, Finite U (f (S k)) *) (* Goal: forall k : nat, Included U (f (S (S k))) (f (S k)) *) (* Goal: lt x n0 *) fold (x0 < n0) in |- *. apply le_lt_trans with (m := x). exact (proj1 H5). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. exact (proj2 H5). assumption. intro. apply H1. intros. (* Goal: BDDconfig_OK cfg *) apply H2. elim (le_le_S_eq x n0). intro. assumption. intro. (* Goal: lt x n0 *) (* Goal: le x n0 *) rewrite H4 in y. elim (y (eq_nat_refl _)). (* Goal: BDDconfig_OK cfg *) apply incl_card_le with (X := f 1) (Y := f 0). assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr (re P)) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bre P) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (re P))))) *) (* Goal: @eq bool match MapGet ad bre P with | Some a => true | None => false end true *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_neg m) bre) (_ : f_bte_ok (mu_neg m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_neg m) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_and m m0) bre) (_ : f_bte_ok (mu_and m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_and m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H2. Qed. Lemma bool_expr_to_var_env''_finite : forall (L U : nat) (be : bool_expr), be_ok (var_lu L U) be -> Finite _ (bool_expr_to_var_env'' L U be). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply Finite_downward_closed with (A := Evar_env'' L U). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply Eenv_var''LU_finite with (n := U - L). reflexivity. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold bool_expr_to_var_env'' in |- *. unfold Included in |- *. intros. (* Goal: In var_env'' (Evar_env'' L U) x *) exact (proj2 H0). Qed. Lemma bool_expr_to_var_env''_card : forall (L U n : nat) (be : bool_expr), be_ok (var_lu L U) be -> cardinal _ (bool_expr_to_var_env'' L U be) n -> n <= two_power (U - L). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (finite_cardinal _ _ (Eenv_var''LU_finite (U - L) L U (refl_equal _))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply le_trans with (m := x). apply incl_card_le with (Y := Evar_env''LU L U) (X := bool_expr_to_var_env'' L U be). (* Goal: BDDconfig_OK cfg *) assumption. assumption. unfold bool_expr_to_var_env'' in |- *. unfold Included in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. exact (proj2 H2). apply Eenv_var''LU_card with (L := L) (U := U). (* Goal: BDDconfig_OK cfg *) reflexivity. assumption. Qed. Lemma decreasing_be_seq : forall (n L U : nat) (f : nat -> bool_expr), cardinal _ (bool_expr_to_var_env'' L U (f 0)) n -> (forall k : nat, be_le (f (S k)) (f k)) -> (forall k : nat, be_ok (var_lu L U) (f k)) -> exists m : nat, m <= n /\ be_le (f m) (f (S m)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (decreasing_ens_seq var_env'' n (fun n : nat => bool_expr_to_var_env'' L U (f n))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim H2; clear H2. intros. decompose [and] H2. clear H2. (* Goal: BDDconfig_OK cfg *) split with x. split. assumption. apply be_le1_le with (L := L) (U := U). apply H1. (* Goal: be_eq (re1 a) (re2 a) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_neg m)) (_ : mu_form_ap_ok (var_lu O N) (mu_neg m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_neg m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) true), re_to_be_inc (mu_eval (mu_neg m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) false), re_to_be_dec (mu_eval (mu_neg m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_neg m) re1 re2), be_eq (mu_eval (mu_neg m) re1) (mu_eval (mu_neg m) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_and m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) true), re_to_be_inc (mu_eval (mu_and m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) false), re_to_be_dec (mu_eval (mu_and m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_and m m0) re1 re2), be_eq (mu_eval (mu_and m m0) re1) (mu_eval (mu_and m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_or m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) true), re_to_be_inc (mu_eval (mu_or m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) false), re_to_be_dec (mu_eval (mu_or m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_or m m0) re1 re2), be_eq (mu_eval (mu_or m m0) re1) (mu_eval (mu_or m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_impl m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) true), re_to_be_inc (mu_eval (mu_impl m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) false), re_to_be_dec (mu_eval (mu_impl m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_impl m m0) re1 re2), be_eq (mu_eval (mu_impl m m0) re1) (mu_eval (mu_impl m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_iff m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (mu_eval (mu_iff m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (mu_eval (mu_iff m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (mu_eval (mu_iff m m0) re1) (mu_eval (mu_iff m m0) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) apply H1. unfold be_le1 in |- *. fold (Included _ (bool_expr_to_var_env'' L U (f x)) (bool_expr_to_var_env'' L U (f (S x)))) in |- *. (* Goal: Included var_env'' (bool_expr_to_var_env'' L U (f x)) (bool_expr_to_var_env'' L U (f (S x))) *) (* Goal: cardinal var_env'' (bool_expr_to_var_env'' L U (f O)) n *) (* Goal: forall k : nat, Finite var_env'' (bool_expr_to_var_env'' L U (f k)) *) (* Goal: forall k : nat, Included var_env'' (bool_expr_to_var_env'' L U (f (S k))) (bool_expr_to_var_env'' L U (f k)) *) apply incl_eq with (n := x0). (* Goal: forall k : nat, Included var_env'' (bool_expr_to_var_env'' L U (f (S k))) (bool_expr_to_var_env'' L U (f k)) *) unfold Included in |- *. (* Goal: BDDconfig_OK cfg *) fold (be_le1 L U (f (S x)) (f x)) in |- *. apply be_le_le1. apply H0. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. intro. apply bool_expr_to_var_env''_finite. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H1. unfold Included in |- *. intro. fold (be_le1 L U (f (S k)) (f k)) in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_le_le1. apply H0. Qed. Lemma decreasing_be_seq_1 : forall (L U : nat) (f : nat -> bool_expr), (forall k : nat, be_ok (var_lu L U) (f k)) -> (forall k : nat, be_le (f (S k)) (f k)) -> exists m : nat, m <= two_power (U - L) /\ be_eq (f m) (f (S m)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. (* Goal: @ex nat (fun m : nat => and (le m (two_power (Init.Nat.sub U L))) (be_eq (f m) (f (S m)))) *) elim (finite_cardinal _ _ (bool_expr_to_var_env''_finite L U (f 0) (H 0))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (decreasing_be_seq x L U f). intros. split with x0. split. (* Goal: le x0 (two_power (Init.Nat.sub U L)) *) (* Goal: be_eq (f x0) (f (S x0)) *) (* Goal: cardinal var_env'' (bool_expr_to_var_env'' L U (f O)) x *) (* Goal: forall k : nat, be_le (f (S k)) (f k) *) (* Goal: forall k : nat, be_ok (var_lu L U) (f k) *) apply le_trans with (m := x). exact (proj1 H2). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply bool_expr_to_var_env''_card with (be := f 0). apply H. assumption. (* Goal: BDDconfig_OK cfg *) apply be_le_antisym. exact (proj2 H2). apply H0. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. Qed. Lemma increasing_be_seq_1 : forall (L U : nat) (f : nat -> bool_expr), (forall k : nat, be_ok (var_lu L U) (f k)) -> (forall k : nat, be_le (f k) (f (S k))) -> exists m : nat, m <= two_power (U - L) /\ be_eq (f m) (f (S m)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (decreasing_be_seq_1 L U (fun n : nat => Neg (f n))). intros. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split with x. split. exact (proj1 H1). apply neg_eq_eq. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact (proj2 H1). intros. apply neg_ok. apply H. intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_le_not_1. apply H0. Qed. Lemma increasing_seq : forall (n : nat) (f : nat -> nat), (forall k : nat, f k <= n) -> (forall k : nat, f k <= f (S k)) -> exists m : nat, m <= n - f 0 /\ f m = f (S m). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (decreasing_seq (n - f 0) (fun k : nat => n - f k)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. split with x. split. exact (proj1 H1). (* Goal: @eq nat (f x) (f (S x)) *) (* Goal: @eq nat (Init.Nat.sub n (f O)) (Init.Nat.sub n (f O)) *) (* Goal: forall n0 : nat, le (Init.Nat.sub n (f (S n0))) (Init.Nat.sub n (f n0)) *) rewrite (le_minus_minus n (f x)). rewrite (le_minus_minus n (f (S x))). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite (proj2 H1). reflexivity. apply H. apply H. reflexivity. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. apply le_minus_le. apply H0. Qed. Definition unprimed_var := var_lu 0 N. Definition rel_env := ad -> bool_expr. Definition Brel_env := Map ad. Definition trans_env := ad -> bool_expr. Definition Btrans_env := Map ad. Definition re_put (re : rel_env) (x : ad) (be : bool_expr) : rel_env := fun y => if Neqb x y then be else re y. Inductive mu_form : Set := | mu_0 : mu_form | mu_1 : mu_form | mu_ap : ad -> mu_form | mu_rel_var : ad -> mu_form | mu_neg : mu_form -> mu_form | mu_and : mu_form -> mu_form -> mu_form | mu_or : mu_form -> mu_form -> mu_form | mu_impl : mu_form -> mu_form -> mu_form | mu_iff : mu_form -> mu_form -> mu_form | mu_all : ad -> mu_form -> mu_form | mu_ex : ad -> mu_form -> mu_form | mu_mu : ad -> mu_form -> mu_form. (* (mu_rel_free P f) means that there is a free occurrence of the relational variable P in the formula f *) Fixpoint mu_rel_free (P : ad) (f : mu_form) {struct f} : bool := match f with | mu_0 => false | mu_1 => false | mu_ap _ => false | mu_rel_var Q => Neqb P Q | mu_neg g => mu_rel_free P g | mu_and g h => mu_rel_free P g || mu_rel_free P h | mu_or g h => mu_rel_free P g || mu_rel_free P h | mu_impl g h => mu_rel_free P g || mu_rel_free P h | mu_iff g h => mu_rel_free P g || mu_rel_free P h | mu_all t g => mu_rel_free P g | mu_ex t g => mu_rel_free P g | mu_mu Q g => negb (Neqb P Q) && mu_rel_free P g end. (* (mu_t_free t f) means that there is a free occurrence of the transition variable t in the formula f *) Fixpoint mu_t_free (t : ad) (f : mu_form) {struct f} : bool := match f with | mu_0 => false | mu_1 => false | mu_ap _ => false | mu_rel_var P => false | mu_neg g => mu_t_free t g | mu_and g h => mu_t_free t g || mu_t_free t h | mu_or g h => mu_t_free t g || mu_t_free t h | mu_impl g h => mu_t_free t g || mu_t_free t h | mu_iff g h => mu_t_free t g || mu_t_free t h | mu_all u g => Neqb t u || mu_t_free t g | mu_ex u g => Neqb t u || mu_t_free t g | mu_mu Q g => mu_t_free t g end. (* Applies the function f n times on argument a *) Fixpoint iter (A : Type) (A_eq : A -> A -> bool) (f : A -> A) (a : A) (n : nat) {struct n} : A := match n with | O => a | S m => if A_eq a (f a) then f a else iter _ A_eq f (f a) m end. Definition be_iter (f : bool_expr -> bool_expr) (be : bool_expr) (n : nat) := iter _ be_eq_dec f be n. Fixpoint iter2n (A : Set) (A_eq : A -> A -> bool) (f : A -> A) (a : A) (n : nat) {struct n} : A * bool := match n with | O => (f a, A_eq a (f a)) | S m => match iter2n _ A_eq f a m with | (b, true) => (b, true) | (b, false) => iter2n _ A_eq f b m end end. Definition be_iter2n := iter2n _ be_eq_dec. Lemma be_iter_prop_preserved : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr) (pr : bool_expr -> Prop), pr be -> (forall be' : bool_expr, pr be' -> pr (f be')) -> pr (be_iter f be n). Proof. (* Goal: forall (n : nat) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n) *) simple induction n. unfold be_iter in |- *. simpl in |- *. trivial. unfold be_iter in |- *. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (be_eq_dec be (f be)). apply H1. assumption. apply H. (* Goal: BDDconfig_OK cfg *) apply H1. assumption. assumption. Qed. Lemma be_iter2n_prop_preserved : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr) (pr : bool_expr -> Prop), pr be -> (forall be' : bool_expr, pr be' -> pr (f be')) -> pr (fst (be_iter2n f be n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold be_iter2n in |- *. simpl in |- *. intros. apply H0. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold be_iter2n in |- *. simpl in |- *. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f be n0)). intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) inversion H2. rewrite H3. elim x0. simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. assumption. rewrite H3. reflexivity. apply H. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. rewrite H3. reflexivity. assumption. Qed. Lemma be_iter_eq_preserved : forall (n : nat) (be : bool_expr) (f1 f2 : bool_expr -> bool_expr), (forall be' : bool_expr, f1 be' = f2 be') -> be_iter f1 be n = be_iter f2 be n. Proof. (* Goal: forall (n : nat) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n) *) simple induction n. unfold be_iter in |- *. simpl in |- *. reflexivity. unfold be_iter in |- *. simpl in |- *. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros n0 H be f3 f4 H0. rewrite (H0 be). elim (be_eq_dec be (f4 be)). reflexivity. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. Qed. Lemma be_iter2n_eq_preserved : forall (n : nat) (be : bool_expr) (f1 f2 : bool_expr -> bool_expr), (forall be' : bool_expr, f1 be' = f2 be') -> be_iter2n f1 be n = be_iter2n f2 be n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold be_iter2n in |- *. simpl in |- *. intros. rewrite (H be). intuition. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. intros n0 H be f3 f4 H0. unfold be_iter2n in |- *. simpl in |- *. unfold be_iter2n in H. (* Goal: @eq (prod bool_expr bool) (let (b, b0) := iter2n bool_expr be_eq_dec f3 be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f3 b n0) (let (b, b0) := iter2n bool_expr be_eq_dec f4 be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f4 b n0) *) rewrite (H be f3 f4 H0). elim (iter2n bool_expr be_eq_dec f4 be n0). intros y y0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (H y f3 f4 H0). reflexivity. Qed. Lemma be_iter_eq_1 : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), be_eq (f be) be -> be_eq (be_iter f be n) be. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold be_iter in |- *. simpl in |- *. intros. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold be_iter in |- *. simpl in |- *. intros. replace (be_eq_dec be (f be)) with true. (* Goal: BDDconfig_OK cfg *) assumption. symmetry in |- *. apply be_eq_eq_dec. apply be_eq_sym. assumption. Qed. Lemma be_iter_eq_preserved_1 : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_eq be1 be2 -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f1 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f2 be1') (f2 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f2 be2')) -> be_eq (be_iter f1 be1 n) (be_iter f2 be2 n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold be_iter in |- *. simpl in |- *. intros. assumption. unfold be_iter in |- *. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. intros n0 H be1 be2 f3 f4 H0 H1 H2 H3. elim (sumbool_of_bool (be_eq_dec be1 (f3 be1))). intro y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) rewrite y. elim (sumbool_of_bool (be_eq_dec be2 (f4 be2))). intro y0. (* Goal: BDDconfig_OK cfg *) rewrite y0. apply H3. assumption. intro y0. rewrite y0. (* Goal: be_eq (f3 be1) (iter bool_expr be_eq_dec f4 (f4 be2) n0) *) (* Goal: forall _ : @eq bool (be_eq_dec be1 (f3 be1)) false, be_eq (if be_eq_dec be1 (f3 be1) then f3 be1 else iter bool_expr be_eq_dec f3 (f3 be1) n0) (if be_eq_dec be2 (f4 be2) then f4 be2 else iter bool_expr be_eq_dec f4 (f4 be2) n0) *) apply be_eq_trans with (be2 := iter bool_expr be_eq_dec f3 (f3 be1) n0). (* Goal: be_eq (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_eq_sym. fold (be_iter f3 (f3 be1) n0) in |- *. apply be_iter_eq_1. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H1. apply be_eq_sym. apply be_eq_dec_eq. assumption. apply H. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H3. assumption. assumption. assumption. assumption. intro y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) rewrite y. elim (sumbool_of_bool (be_eq_dec be2 (f4 be2))). intro y0. (* Goal: le (S x0) (S n0) *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y0. (* Goal: be_eq (iter bool_expr be_eq_dec f3 (f3 be1) n0) (f4 be2) *) (* Goal: forall _ : @eq bool (be_eq_dec be2 (f4 be2)) false, be_eq (iter bool_expr be_eq_dec f3 (f3 be1) n0) (if be_eq_dec be2 (f4 be2) then f4 be2 else iter bool_expr be_eq_dec f4 (f4 be2) n0) *) apply be_eq_trans with (be2 := iter bool_expr be_eq_dec f4 (f4 be2) n0). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. apply H3. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr (re P)) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bre P) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bre P with | Some node => @pair BDDconfig ad cfg node | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (re P))))) *) (* Goal: @eq bool match MapGet ad bre P with | Some a => true | None => false end true *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_neg m) bre) (_ : f_bte_ok (mu_neg m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_neg m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_neg m) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_and m m0) bre) (_ : f_bte_ok (mu_and m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_and m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) fold (be_iter f4 (f4 be2) n0) in |- *. apply be_iter_eq_1. apply H2. (* Goal: BDDconfig_OK cfg *) apply be_eq_sym. apply be_eq_dec_eq. assumption. intro y0. rewrite y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. apply H3. assumption. assumption. assumption. assumption. Qed. Lemma be_iter2n_eq_preserved_1 : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_eq be1 be2 -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f1 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f2 be1') (f2 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f2 be2')) -> be_eq (fst (be_iter2n f1 be1 n)) (fst (be_iter2n f2 be2 n)) /\ snd (be_iter2n f1 be1 n) = snd (be_iter2n f2 be2 n). Proof. (* Goal: forall (n : nat) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n) *) simple induction n. unfold be_iter2n in |- *. simpl in |- *. intros be1 be2 f3 f4 H H0 H1 H2. split. apply H2. (* Goal: BDDconfig_OK cfg *) assumption. elim (sumbool_of_bool (be_eq_dec be1 (f3 be1))). intros y. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y. symmetry in |- *. apply be_eq_eq_dec. apply be_eq_trans with (be2 := be1). (* Goal: BDDconfig_OK cfg *) apply be_eq_sym. assumption. apply be_eq_trans with (be2 := f3 be1). (* Goal: BDDconfig_OK cfg *) apply be_eq_dec_eq. assumption. apply H2. assumption. intros y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (be_eq_dec be2 (f4 be2))). intro y0. rewrite y0. (* Goal: BDDconfig_OK cfg *) apply be_eq_eq_dec. apply be_eq_trans with (be2 := be2). assumption. (* Goal: BDDconfig_OK cfg *) apply be_eq_trans with (be2 := f4 be2). apply be_eq_dec_eq. assumption. (* Goal: BDDconfig_OK cfg *) apply be_eq_sym. apply H2. assumption. intro y0. rewrite y. rewrite y0. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. unfold be_iter2n in |- *. intros n0 H be1 be2 f3 f4 H0 H1 H2 H3. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f3 be1 n0)). intros. (* Goal: and (be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f3 be1 n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f3 b n0)) (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f4 be2 n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f4 b n0))) (@eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f3 be1 n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f3 b n0)) (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f4 be2 n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f4 b n0))) *) inversion H4. elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f4 be2 n0)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H6. cut (be_eq x x1 /\ x0 = x2). intros. inversion H8. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H5. rewrite H7. rewrite H10. elim x2. simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split; [ assumption | reflexivity ]. apply H. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. (* Goal: and (be_eq x x1) (@eq bool x0 x2) *) replace x with (fst (iter2n bool_expr be_eq_dec f3 be1 n0)). (* Goal: and (be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x1) (@eq bool x0 x2) *) (* Goal: @eq bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x *) replace x0 with (snd (iter2n bool_expr be_eq_dec f3 be1 n0)). (* Goal: and (be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x1) (@eq bool (@snd bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x2) *) (* Goal: @eq bool (@snd bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x0 *) (* Goal: @eq bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec f3 be1 n0)) x *) replace x1 with (fst (iter2n bool_expr be_eq_dec f4 be2 n0)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x2 with (snd (iter2n bool_expr be_eq_dec f4 be2 n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. rewrite H7; reflexivity. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H7; reflexivity. rewrite H5; reflexivity. rewrite H5; reflexivity. Qed. Lemma be_iter2n_eq_preserved_2 : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_eq be1 be2 -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f1 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f2 be1') (f2 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f2 be2')) -> be_eq (fst (be_iter2n f1 be1 n)) (fst (be_iter2n f2 be2 n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros n be1 be2 f3 f4. intros. elim (be_iter2n_eq_preserved_1 n be1 be2 f3 f4). trivial. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. Qed. Lemma be_iter_le_preserved : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_le be1 be2 -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f1 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f2 be1') (f2 be2')) -> (forall be1' be2' : bool_expr, be_le be1' be2' -> be_le (f1 be1') (f2 be2')) -> be_le (be_iter f1 be1 n) (be_iter f2 be2 n). Proof. (* Goal: forall (n : nat) (be : bool_expr) (bef : forall _ : bool_expr, bool_expr) (_ : not (@eq nat n O)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : be_le be (bef be)), be_le be (be_iter1 bef be n) *) simple induction n. unfold be_iter in |- *. simpl in |- *. intros be1 be2 f3 f4 H H0 H1 H2. assumption. unfold be_iter in |- *. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. intros n0 H be1 be2 f3 f4 H0 H1 H2 H3. elim (sumbool_of_bool (be_eq_dec be1 (f3 be1))). intro y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) rewrite y. elim (sumbool_of_bool (be_eq_dec be2 (f4 be2))). intro y0. (* Goal: BDDconfig_OK cfg *) rewrite y0. apply H3. assumption. intro y0. rewrite y0. (* Goal: be_le (f3 be1) (iter bool_expr be_eq_dec f4 (f4 be2) n0) *) (* Goal: forall _ : @eq bool (be_eq_dec be1 (f3 be1)) false, be_le (if be_eq_dec be1 (f3 be1) then f3 be1 else iter bool_expr be_eq_dec f3 (f3 be1) n0) (if be_eq_dec be2 (f4 be2) then f4 be2 else iter bool_expr be_eq_dec f4 (f4 be2) n0) *) apply be_le_trans with (be2 := iter bool_expr be_eq_dec f3 (f3 be1) n0). (* Goal: be_eq (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_eq_le. apply be_eq_sym. fold (be_iter f3 (f3 be1) n0) in |- *. (* Goal: be_eq (re1 a) (re2 a) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_neg m)) (_ : mu_form_ap_ok (var_lu O N) (mu_neg m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_neg m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) true), re_to_be_inc (mu_eval (mu_neg m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) false), re_to_be_dec (mu_eval (mu_neg m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_neg m) re1 re2), be_eq (mu_eval (mu_neg m) re1) (mu_eval (mu_neg m) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_and m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) true), re_to_be_inc (mu_eval (mu_and m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) false), re_to_be_dec (mu_eval (mu_and m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_and m m0) re1 re2), be_eq (mu_eval (mu_and m m0) re1) (mu_eval (mu_and m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_or m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) true), re_to_be_inc (mu_eval (mu_or m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) false), re_to_be_dec (mu_eval (mu_or m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_or m m0) re1 re2), be_eq (mu_eval (mu_or m m0) re1) (mu_eval (mu_or m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_impl m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) true), re_to_be_inc (mu_eval (mu_impl m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) false), re_to_be_dec (mu_eval (mu_impl m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_impl m m0) re1 re2), be_eq (mu_eval (mu_impl m m0) re1) (mu_eval (mu_impl m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_iff m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (mu_eval (mu_iff m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (mu_eval (mu_iff m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (mu_eval (mu_iff m m0) re1) (mu_eval (mu_iff m m0) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) apply be_iter_eq_1. apply H1. apply be_eq_sym. apply be_eq_dec_eq. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. apply H. apply H3. assumption. assumption. assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. intro y. rewrite y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (be_eq_dec be2 (f4 be2))). intro y0. rewrite y0. (* Goal: be_le (iter bool_expr be_eq_dec f3 (f3 be1) n0) (f4 be2) *) (* Goal: forall _ : @eq bool (be_eq_dec be2 (f4 be2)) false, be_le (iter bool_expr be_eq_dec f3 (f3 be1) n0) (if be_eq_dec be2 (f4 be2) then f4 be2 else iter bool_expr be_eq_dec f4 (f4 be2) n0) *) apply be_le_trans with (be2 := iter bool_expr be_eq_dec f4 (f4 be2) n0). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. apply H3. assumption. assumption. assumption. assumption. (* Goal: be_eq (be_iter f4 (f4 be2) n0) (f4 be2) *) (* Goal: forall _ : @eq bool (be_eq_dec be2 (f4 be2)) false, be_le (iter bool_expr be_eq_dec f3 (f3 be1) n0) (if be_eq_dec be2 (f4 be2) then f4 be2 else iter bool_expr be_eq_dec f4 (f4 be2) n0) *) apply be_eq_le. fold (be_iter f4 (f4 be2) n0) in |- *. apply be_iter_eq_1. (* Goal: BDDconfig_OK cfg *) apply H2. apply be_eq_sym. apply be_eq_dec_eq. assumption. intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite y0. apply H. apply H3. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma be_iter2n_true : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (f be1) (f be2)) -> snd (be_iter2n f be n) = true -> fp f (fst (be_iter2n f be n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold fp in |- *. simpl in |- *. intros. apply H. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_eq_dec_eq; assumption. unfold fp in |- *. simpl in |- *. intros n0 H be f H0. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold be_iter2n in |- *. simpl in |- *. (* Goal: be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f be n0)). intros be1 H1. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H1; clear H1. intro b. elim b. intro. rewrite H1. simpl in |- *. intro. (* Goal: be_eq be1 (f be1) *) (* Goal: forall (_ : @eq (prod bool_expr bool) (iter2n bool_expr be_eq_dec f be n0) (@pair bool_expr bool be1 false)) (_ : @eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) true), be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (f (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0))) *) replace be1 with (fst (iter2n bool_expr be_eq_dec f be n0)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold be_iter2n in H. apply H. assumption. rewrite H1; reflexivity. (* Goal: forall _ : @eq bool (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) true, be_eq (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0)) (f (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec f be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec f b n0))) *) rewrite H1; reflexivity. intro. rewrite H1. intro. unfold be_iter2n in H. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. Qed. Lemma be_iter2n_0 : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (f be1) (f be2)) -> fp f be -> be_eq be (fst (be_iter2n f be n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. unfold fp in |- *. simpl in |- *. trivial. unfold be_iter2n in |- *. simpl in |- *. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f be n0)). intros. (* Goal: forall (re : rel_env) (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (if N.eqb P a then be2 else re a) (if N.eqb P a then be1 else re a) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_rel_var a) re1 re2), be_eq (re1 a) (re2 a) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_neg m)) (_ : mu_form_ap_ok (var_lu O N) (mu_neg m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_neg m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) true), re_to_be_inc (mu_eval (mu_neg m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) false), re_to_be_dec (mu_eval (mu_neg m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_neg m) re1 re2), be_eq (mu_eval (mu_neg m) re1) (mu_eval (mu_neg m) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_and m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) true), re_to_be_inc (mu_eval (mu_and m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) false), re_to_be_dec (mu_eval (mu_and m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_and m m0) re1 re2), be_eq (mu_eval (mu_and m m0) re1) (mu_eval (mu_and m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_or m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) true), re_to_be_inc (mu_eval (mu_or m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) false), re_to_be_dec (mu_eval (mu_or m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_or m m0) re1 re2), be_eq (mu_eval (mu_or m m0) re1) (mu_eval (mu_or m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_impl m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) true), re_to_be_inc (mu_eval (mu_impl m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) false), re_to_be_dec (mu_eval (mu_impl m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_impl m m0) re1 re2), be_eq (mu_eval (mu_impl m m0) re1) (mu_eval (mu_impl m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_iff m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (mu_eval (mu_iff m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (mu_eval (mu_iff m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (mu_eval (mu_iff m m0) re1) (mu_eval (mu_iff m m0) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) inversion H2. rewrite H3. elim x0. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). simpl in |- *. apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. rewrite H3. reflexivity. (* Goal: be_eq be (@fst bool_expr bool (iter2n bool_expr be_eq_dec f x n0)) *) apply be_eq_trans with (be2 := x). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. assumption. rewrite H3. reflexivity. apply H. assumption. (* Goal: be_eq (@fst bool_expr bool (be_iter2n bef be' n)) be' *) unfold fp in |- *. apply be_eq_trans with (be2 := be). apply be_eq_sym. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. rewrite H3. reflexivity. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_eq_trans with (be2 := f be). exact H1. apply H0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. rewrite H3. reflexivity. Qed. Section Be_iter1. Variable bef : bool_expr -> bool_expr. Hypothesis bef_inc : be_to_be_inc bef. Hypothesis bef_ok : forall be : bool_expr, be_ok (var_lu 0 N) be -> be_ok (var_lu 0 N) (bef be). Fixpoint be_iter1 (be : bool_expr) (n : nat) {struct n} : bool_expr := match n with | O => be | S m => be_iter1 (bef be) m end. Fixpoint be_iter2 (be : bool_expr) (n : nat) {struct n} : bool_expr := match n with | O => be | S m => bef (be_iter2 be m) end. Lemma be_iter1_plus : forall (m n : nat) (be : bool_expr), be_iter1 (be_iter1 be m) n = be_iter1 be (m + n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction m. simpl in |- *. reflexivity. simpl in |- *. intros. apply H. Qed. Lemma be_iter1eq2 : forall (n : nat) (be : bool_expr), be_iter1 be n = be_iter2 be n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. reflexivity. intros. simpl in |- *. rewrite <- (H be). (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) transitivity (be_iter1 be (S n0)). reflexivity. symmetry in |- *. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) transitivity (be_iter1 (be_iter1 be n0) 1). reflexivity. (* Goal: @eq bool_expr (be_iter1 (be_iter1 be n0) (S O)) (be_iter1 be (S n0)) *) replace (S n0) with (n0 + 1). apply be_iter1_plus. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (plus_comm n0 1). reflexivity. Qed. Lemma be_iter1_inc : forall (k : nat) (be : bool_expr), be_le be (bef be) -> be_le (be_iter1 be k) (be_iter1 be (S k)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction k. unfold be_iter1 in |- *. trivial. simpl in |- *. intros. apply H. (* Goal: BDDconfig_OK cfg *) apply bef_inc. assumption. Qed. Lemma be_iter1_ok : forall (k : nat) (be : bool_expr), be_ok (var_lu 0 N) be -> be_ok (var_lu 0 N) (be_iter1 be k). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction k. trivial. simpl in |- *. intros. apply H. apply bef_ok. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma be_iter1_fix_ex : forall be : bool_expr, be_ok (var_lu 0 N) be -> be_le be (bef be) -> exists m : nat, m <= two_power N /\ be_eq (be_iter1 be m) (be_iter1 be (S m)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. replace N with (N - 0). apply increasing_be_seq_1. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter1_ok. assumption. intros. apply be_iter1_inc. assumption. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim N; reflexivity. Qed. End Be_iter1. Lemma be_iter1_preserves_eq : forall (n : nat) (be1 be2 : bool_expr) (f : bool_expr -> bool_expr), (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (f be1) (f be2)) -> be_eq be1 be2 -> be_eq (be_iter1 f be1 n) (be_iter1 f be2 n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. trivial. simpl in |- *. intros. apply H. intros. apply H0. (* Goal: BDDconfig_OK cfg *) assumption. apply H0. assumption. Qed. Lemma be_iter1_plus1 : forall (m n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), be_eq (be_iter1 f (be_iter1 f be m) n) (be_iter1 f be (m + n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite (be_iter1_plus f m n be). apply be_eq_refl. Qed. Lemma be_iter2n_false : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (f be1) (f be2)) -> snd (be_iter2n f be n) = false -> be_eq (fst (be_iter2n f be n)) (be_iter1 f be (two_power n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. simpl in |- *. intros. apply be_eq_refl. unfold be_iter2n in |- *. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f be n0)). intros. (* Goal: forall (re : rel_env) (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (if N.eqb P a then be2 else re a) (if N.eqb P a then be1 else re a) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_rel_var a) re1 re2), be_eq (re1 a) (re2 a) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_neg m)) (_ : mu_form_ap_ok (var_lu O N) (mu_neg m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_neg m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) true), re_to_be_inc (mu_eval (mu_neg m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_neg m) false), re_to_be_dec (mu_eval (mu_neg m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_neg m) re1 re2), be_eq (mu_eval (mu_neg m) re1) (mu_eval (mu_neg m) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_and m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) true), re_to_be_inc (mu_eval (mu_and m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) false), re_to_be_dec (mu_eval (mu_and m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_and m m0) re1 re2), be_eq (mu_eval (mu_and m m0) re1) (mu_eval (mu_and m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_or m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) true), re_to_be_inc (mu_eval (mu_or m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) false), re_to_be_dec (mu_eval (mu_or m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_or m m0) re1 re2), be_eq (mu_eval (mu_or m m0) re1) (mu_eval (mu_or m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_impl m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) true), re_to_be_inc (mu_eval (mu_impl m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) false), re_to_be_dec (mu_eval (mu_impl m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_impl m m0) re1 re2), be_eq (mu_eval (mu_impl m m0) re1) (mu_eval (mu_impl m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_iff m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (mu_eval (mu_iff m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (mu_eval (mu_iff m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (mu_eval (mu_iff m m0) re1) (mu_eval (mu_iff m m0) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) inversion H2. rewrite H3 in H1. rewrite H3. elim (sumbool_of_bool x0). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. rewrite y in H1. discriminate. intro y. rewrite y in H1. rewrite y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_eq_trans with (be2 := be_iter1 f x (two_power n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply be_eq_trans with (be2 := be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)). (* Goal: BDDconfig_OK cfg *) apply be_iter1_preserves_eq. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. rewrite H3. assumption. rewrite H3. reflexivity. (* Goal: be_eq (be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) apply be_eq_trans with (be2 := be_iter1 f be (two_power n0 + two_power n0)). (* Goal: be_eq (be_iter1 f x (two_power n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) apply be_iter1_plus1. rewrite <- (plus_n_O (two_power n0)). apply be_eq_refl. Qed. Lemma be_iter2n_2n : forall (n : nat) (be : bool_expr) (f : bool_expr -> bool_expr), (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (f be1) (f be2)) -> be_eq (fst (be_iter2n f be n)) (be_iter1 f be (two_power n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. simpl in |- *. intros. apply be_eq_refl. unfold be_iter2n in |- *. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (prod_sum _ _ (iter2n bool_expr be_eq_dec f be n0)). intros. (* Goal: @eq Prop (lt O (two_power n)) (lt O O) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: be_le be (bef be) *) (* Goal: be_le (be_iter1 bef be (two_power n)) (@fst bool_expr bool (be_iter2n bef be n)) *) (* Goal: forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be' *) inversion H1. rewrite H2. elim (sumbool_of_bool x0). intros y. rewrite y. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. apply be_eq_trans with (be2 := be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)). (* Goal: be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) apply be_eq_trans with (be2 := be_iter1 f x (two_power n0)). (* Goal: be_eq x (be_iter1 f x (two_power n0)) *) (* Goal: be_eq (be_iter1 f x (two_power n0)) (be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)) *) (* Goal: be_eq (be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) (* Goal: forall _ : @eq bool x0 false, be_eq (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec f x n0)) (be_iter1 f be (Init.Nat.add (two_power n0) (Init.Nat.add (two_power n0) O))) *) apply be_eq_trans with (be2 := fst (be_iter2n f x n0)). apply be_iter2n_0. (* Goal: BDDconfig_OK cfg *) assumption. replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). (* Goal: BDDconfig_OK cfg *) fold (be_iter2n f be n0) in |- *. apply be_iter2n_true. assumption. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold be_iter2n in |- *. rewrite H2. rewrite y. reflexivity. rewrite H2. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) reflexivity. unfold be_iter2n in |- *. apply H. assumption. (* Goal: BDDconfig_OK cfg *) apply be_iter1_preserves_eq. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. rewrite H2. reflexivity. rewrite <- (plus_n_O (two_power n0)). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_iter1_plus1. intro y. rewrite y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_eq_trans with (be2 := be_iter1 f x (two_power n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. rewrite <- (plus_n_O (two_power n0)). apply be_eq_trans with (be2 := be_iter1 f (be_iter1 f be (two_power n0)) (two_power n0)). (* Goal: BDDconfig_OK cfg *) apply be_iter1_preserves_eq. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) replace x with (fst (iter2n bool_expr be_eq_dec f be n0)). apply H. (* Goal: BDDconfig_OK cfg *) assumption. rewrite H2. reflexivity. apply be_iter1_plus1. Qed. Lemma be_iter1_le_preserved : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_le be1 be2 -> (forall be1' be2' : bool_expr, be_le be1' be2' -> be_le (f1 be1') (f2 be2')) -> be_le (be_iter1 f1 be1 n) (be_iter1 f2 be2 n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. simpl in |- *. trivial. simpl in |- *. intros. apply H. apply H1. (* Goal: BDDconfig_OK cfg *) assumption. assumption. Qed. Lemma be_iter2n_le_preserved : forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : bool_expr -> bool_expr), be_le be1 be2 -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f1 be1') (f1 be2')) -> (forall be1' be2' : bool_expr, be_eq be1' be2' -> be_eq (f2 be1') (f2 be2')) -> (forall be1' be2' : bool_expr, be_le be1' be2' -> be_le (f1 be1') (f2 be2')) -> be_le (fst (be_iter2n f1 be1 n)) (fst (be_iter2n f2 be2 n)). Proof. (* Goal: forall (n : nat) (be1 be2 : bool_expr) (f1 f2 : forall _ : bool_expr, bool_expr) (_ : be_le be1 be2) (_ : forall (be1' be2' : bool_expr) (_ : be_eq be1' be2'), be_eq (f1 be1') (f1 be2')) (_ : forall (be1' be2' : bool_expr) (_ : be_eq be1' be2'), be_eq (f2 be1') (f2 be2')) (_ : forall (be1' be2' : bool_expr) (_ : be_le be1' be2'), be_le (f1 be1') (f2 be2')), be_le (@fst bool_expr bool (be_iter2n f1 be1 n)) (@fst bool_expr bool (be_iter2n f2 be2 n)) *) intros n be1 be2 f3 f4 H H0 H1 H2. apply be_le_trans with (be2 := be_iter1 f3 be1 (two_power n)). (* Goal: BDDconfig_OK cfg *) apply be_eq_le. apply be_iter2n_2n. assumption. (* Goal: be_le (be_iter1 f3 be1 (two_power n)) (@fst bool_expr bool (be_iter2n f4 be2 n)) *) apply be_le_trans with (be2 := be_iter1 f4 be2 (two_power n)). (* Goal: BDDconfig_OK cfg *) apply be_iter1_le_preserved. assumption. assumption. apply be_eq_le. (* Goal: BDDconfig_OK cfg *) apply be_eq_sym. apply be_iter2n_2n. assumption. Qed. Fixpoint BDDiter (f : BDDconfig -> ad -> BDDconfig * ad) (cfg : BDDconfig) (node : ad) (n : nat) {struct n} : BDDconfig * ad := match n with | O => (cfg, node) | S m => match f cfg node with | (cfg1, node1) => if Neqb node node1 then (cfg1, node1) else BDDiter f cfg1 node1 m end end. Fixpoint BDDiter2n (f : BDDconfig -> ad -> BDDconfig * ad) (cfg : BDDconfig) (node : ad) (n : nat) {struct n} : BDDconfig * ad * bool := match n with | O => match f cfg node with | (cfg1, node1) => (cfg1, node1, Neqb node node1) end | S m => match BDDiter2n f cfg node m with | ((cfg1, node1), true) => (cfg1, node1, true) | ((cfg1, node1), false) => BDDiter2n f cfg1 node1 m end end. Definition cfgnode_eq (cfgnode1 cfgnode2 : BDDconfig * ad) := Neqb (snd cfgnode1) (snd cfgnode2). Lemma BDDiter_as_iter : forall (n : nat) (cfg : BDDconfig) (node : ad) (f : BDDconfig -> ad -> BDDconfig * ad), BDDiter f cfg node n = iter _ cfgnode_eq (fun x => f (fst x) (snd x)) (cfg, node) n. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. reflexivity. intros. simpl in |- *. elim (prod_sum _ _ (f cfg node)). (* Goal: @eq bool (andb (negb false) (mu_rel_free P0 g)) true *) intros cfg1 H0. elim H0; clear H0. intros node1 H0. rewrite H0. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold cfgnode_eq in |- *. simpl in |- *. rewrite (H cfg1 node1 f). reflexivity. Qed. (* (mu_form_ap_ok vf f) means that for all atomic propositions p occurring in f (vf ap)=true *) Inductive mu_form_ap_ok (vf : ad -> bool) : mu_form -> Prop := | mu_0_ok : mu_form_ap_ok vf mu_0 | mu_1_ok : mu_form_ap_ok vf mu_1 | mu_ap_ok : forall p : ad, vf p = true -> mu_form_ap_ok vf (mu_ap p) | mu_rel_var_ok : forall P : ad, mu_form_ap_ok vf (mu_rel_var P) | mu_neg_ok : forall f : mu_form, mu_form_ap_ok vf f -> mu_form_ap_ok vf (mu_neg f) | mu_and_ok : forall f g : mu_form, mu_form_ap_ok vf f -> mu_form_ap_ok vf g -> mu_form_ap_ok vf (mu_and f g) | mu_or_ok : forall f g : mu_form, mu_form_ap_ok vf f -> mu_form_ap_ok vf g -> mu_form_ap_ok vf (mu_or f g) | mu_impl_ok : forall f g : mu_form, mu_form_ap_ok vf f -> mu_form_ap_ok vf g -> mu_form_ap_ok vf (mu_impl f g) | mu_iff_ok : forall f g : mu_form, mu_form_ap_ok vf f -> mu_form_ap_ok vf g -> mu_form_ap_ok vf (mu_iff f g) | mu_all_ok : forall (t : ad) (f : mu_form), mu_form_ap_ok vf f -> mu_form_ap_ok vf (mu_all t f) | mu_ex_ok : forall (t : ad) (f : mu_form), mu_form_ap_ok vf f -> mu_form_ap_ok vf (mu_ex t f) | mu_mu_ok : forall (P : ad) (f : mu_form), mu_form_ap_ok vf f -> mu_form_ap_ok vf (mu_mu P f). Lemma mu_ap_ok_inv : forall (vf : ad -> bool) (p : ad), mu_form_ap_ok vf (mu_ap p) -> vf p = true. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H. assumption. Qed. (* (f_P_even P f true) means that all free occurrences of the relational variable P in f are under an even number of negations. (f_P_even P f false) means that all free occurrences of the relational variable P in f are under an odd number of negations. *) Inductive f_P_even (P : ad) : mu_form -> bool -> Prop := | mu_0_even : f_P_even P mu_0 true | mu_0_odd : f_P_even P mu_0 false | mu_1_even : f_P_even P mu_1 true | mu_1_odd : f_P_even P mu_1 false | mu_ap_even : forall p : ad, f_P_even P (mu_ap p) true | mu_ap_odd : forall p : ad, f_P_even P (mu_ap p) false | mu_rel_var_even : forall Q : ad, f_P_even P (mu_rel_var Q) true (* one new clause added ... *) | mu_rel_var_odd : forall Q : ad, Neqb P Q = false -> f_P_even P (mu_rel_var Q) false | mu_neg_odd : forall f : mu_form, f_P_even P f true -> f_P_even P (mu_neg f) false | mu_neg_even : forall f : mu_form, f_P_even P f false -> f_P_even P (mu_neg f) true | mu_and_even : forall f g : mu_form, f_P_even P f true -> f_P_even P g true -> f_P_even P (mu_and f g) true | mu_and_odd : forall f g : mu_form, f_P_even P f false -> f_P_even P g false -> f_P_even P (mu_and f g) false | mu_or_even : forall f g : mu_form, f_P_even P f true -> f_P_even P g true -> f_P_even P (mu_or f g) true | mu_or_odd : forall f g : mu_form, f_P_even P f false -> f_P_even P g false -> f_P_even P (mu_or f g) false | mu_impl_even : forall f g : mu_form, f_P_even P f false -> f_P_even P g true -> f_P_even P (mu_impl f g) true | mu_impl_odd : forall f g : mu_form, f_P_even P f true -> f_P_even P g false -> f_P_even P (mu_impl f g) false | mu_iff_even : forall f g : mu_form, f_P_even P f true -> f_P_even P g true -> f_P_even P f false -> f_P_even P g false -> f_P_even P (mu_iff f g) true | mu_iff_odd : forall f g : mu_form, f_P_even P f true -> f_P_even P g true -> f_P_even P f false -> f_P_even P g false -> f_P_even P (mu_iff f g) false | mu_all_even : forall (t : ad) (f : mu_form), f_P_even P f true -> f_P_even P (mu_all t f) true | mu_all_odd : forall (t : ad) (f : mu_form), f_P_even P f false -> f_P_even P (mu_all t f) false | mu_ex_even : forall (t : ad) (f : mu_form), f_P_even P f true -> f_P_even P (mu_ex t f) true | mu_ex_odd : forall (t : ad) (f : mu_form), f_P_even P f false -> f_P_even P (mu_ex t f) false | mu_mu_P_even : forall f : mu_form, f_P_even P (mu_mu P f) true | mu_mu_P_odd : forall f : mu_form, f_P_even P (mu_mu P f) false | mu_mu_Q_even : forall (Q : ad) (f : mu_form), Neqb P Q = false -> f_P_even P f true -> f_P_even P (mu_mu Q f) true | mu_mu_Q_odd : forall (Q : ad) (f : mu_form), Neqb P Q = false -> f_P_even P f false -> f_P_even P (mu_mu Q f) false. Inductive f_ok : mu_form -> Prop := | mu_0_f_ok : f_ok mu_0 | mu_1_f_ok : f_ok mu_1 | mu_ap_f_ok : forall p : ad, f_ok (mu_ap p) | mu_rel_var_f_ok : forall P : ad, f_ok (mu_rel_var P) | mu_neg_f_ok : forall f : mu_form, f_ok f -> f_ok (mu_neg f) | mu_and_f_ok : forall f g : mu_form, f_ok f -> f_ok g -> f_ok (mu_and f g) | mu_or_f_ok : forall f g : mu_form, f_ok f -> f_ok g -> f_ok (mu_or f g) | mu_impl_f_ok : forall f g : mu_form, f_ok f -> f_ok g -> f_ok (mu_impl f g) | mu_iff_f_ok : forall f g : mu_form, f_ok f -> f_ok g -> f_ok (mu_iff f g) | mu_all_f_ok : forall (t : ad) (f : mu_form), f_ok f -> f_ok (mu_all t f) | mu_ex_f_ok : forall (t : ad) (f : mu_form), f_ok f -> f_ok (mu_ex t f) | mu_mu_f_ok : forall (P : ad) (f : mu_form), f_ok f -> f_P_even P f true -> f_ok (mu_mu P f). Definition cfg_ul_bre_ok (cfg : BDDconfig) (ul : list ad) (bre : Brel_env) := forall P node : ad, MapGet _ bre P = Some node -> used_node' cfg ul node. Definition cfg_ul_bte_ok (cfg : BDDconfig) (ul : list ad) (bte : Btrans_env) := forall t node : ad, MapGet _ bte t = Some node -> used_node' cfg ul node. Definition cfg_re_bre_ok (cfg : BDDconfig) (re : rel_env) (bre : Brel_env) := forall P node : ad, MapGet _ bre P = Some node -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr (re P)). Definition cfg_te_bte_ok (cfg : BDDconfig) (te : trans_env) (bte : Btrans_env) := forall t node : ad, MapGet _ bte t = Some node -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr (te t)). Definition f_bre_ok (f : mu_form) (bre : Brel_env) := forall P : ad, mu_rel_free P f = true -> in_dom _ P bre = true. Definition f_bte_ok (f : mu_form) (bte : Btrans_env) := forall t : ad, mu_t_free t f = true -> in_dom _ t bte = true. Lemma mu_and_bre_ok : forall (g h : mu_form) (bre : Brel_env), f_bre_ok (mu_and g h) bre -> f_bre_ok g bre /\ f_bre_ok h bre. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bre_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_or_bre_ok : forall (g h : mu_form) (bre : Brel_env), f_bre_ok (mu_or g h) bre -> f_bre_ok g bre /\ f_bre_ok h bre. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bre_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_impl_bre_ok : forall (g h : mu_form) (bre : Brel_env), f_bre_ok (mu_impl g h) bre -> f_bre_ok g bre /\ f_bre_ok h bre. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bre_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_iff_bre_ok : forall (g h : mu_form) (bre : Brel_env), f_bre_ok (mu_iff g h) bre -> f_bre_ok g bre /\ f_bre_ok h bre. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bre_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_and_bte_ok : forall (g h : mu_form) (bte : Btrans_env), f_bte_ok (mu_and g h) bte -> f_bte_ok g bte /\ f_bte_ok h bte. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bte_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_or_bte_ok : forall (g h : mu_form) (bte : Btrans_env), f_bte_ok (mu_or g h) bte -> f_bte_ok g bte /\ f_bte_ok h bte. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bte_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_impl_bte_ok : forall (g h : mu_form) (bte : Btrans_env), f_bte_ok (mu_impl g h) bte -> f_bte_ok g bte /\ f_bte_ok h bte. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bte_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_iff_bte_ok : forall (g h : mu_form) (bte : Btrans_env), f_bte_ok (mu_iff g h) bte -> f_bte_ok g bte /\ f_bte_ok h bte. Proof. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold f_bte_ok in |- *. simpl in |- *. auto with bool. Qed. Lemma mu_all_bre_ok : forall (t : ad) (g : mu_form) (bre : Brel_env), f_bre_ok (mu_all t g) bre -> f_bre_ok g bre. Proof. (* Goal: @eq bool (orb (mu_rel_free x m) true) true *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) auto with bool. Qed. Lemma mu_all_bte_ok : forall (t : ad) (g : mu_form) (bte : Btrans_env), f_bte_ok (mu_all t g) bte -> f_bte_ok g bte. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold f_bte_ok in |- *. intros. apply H. simpl in |- *. rewrite H0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (Neqb t0 t); reflexivity. Qed. Lemma mu_ex_bre_ok : forall (t : ad) (g : mu_form) (bre : Brel_env), f_bre_ok (mu_ex t g) bre -> f_bre_ok g bre. Proof. (* Goal: @eq bool (orb (mu_rel_free x m) true) true *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) auto with bool. Qed. Lemma mu_ex_bte_ok : forall (t : ad) (g : mu_form) (bte : Btrans_env), f_bte_ok (mu_ex t g) bte -> f_bte_ok g bte. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold f_bte_ok in |- *. intros. apply H. simpl in |- *. rewrite H0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (Neqb t0 t); reflexivity. Qed. Lemma mu_mu_bre_ok : forall (P node : ad) (g : mu_form) (bre : Brel_env), f_bre_ok (mu_mu P g) bre -> f_bre_ok g (MapPut _ bre P node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold f_bre_ok in |- *. unfold in_dom in |- *. intro. (* Goal: forall _ : @eq (option ad) (MapGet ad (MapPut ad bre P node) P0) (@Some ad node0), bool_fun_eq (bool_fun_of_BDD cfg node0) (bool_fun_of_bool_expr (if N.eqb P P0 then be else re P0)) *) rewrite (MapPut_semantics ad bre P node P0). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool (Neqb P P0)). intro y. rewrite y. reflexivity. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. rewrite y. intro. unfold f_bre_ok in H. unfold in_dom in H. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H. simpl in |- *. rewrite (Neqb_comm P0 P). rewrite y. rewrite H0. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) reflexivity. Qed. Lemma cfg_ul_re_bre_ok_preserved : forall (cfg cfg1 : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> BDDconfig_OK cfg1 -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> used_nodes_preserved cfg cfg1 ul -> cfg_ul_bre_ok cfg1 ul bre /\ cfg_re_bre_ok cfg1 re bre. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold cfg_ul_bre_ok, cfg_re_bre_ok in |- *. intros. split. intros. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H2 with (P := P) (node := node). assumption. intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 node) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD cfg1 node1) *) (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply H2 with (P := P) (node := node). assumption. (* Goal: BDDconfig_OK cfg *) apply H3. assumption. Qed. Lemma cfg_ul_te_bte_ok_preserved : forall (cfg cfg1 : BDDconfig) (ul : list ad) (te : trans_env) (bte : Btrans_env), BDDconfig_OK cfg -> BDDconfig_OK cfg1 -> used_list_OK cfg ul -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> used_nodes_preserved cfg cfg1 ul -> cfg_ul_bte_ok cfg1 ul bte /\ cfg_te_bte_ok cfg1 te bte. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold cfg_ul_bte_ok, cfg_te_bte_ok in |- *. intros. split. intros. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H2 with (t := t) (node := node). assumption. intros. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 node) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD cfg1 node1) *) (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply H2 with (t := t) (node := node). assumption. (* Goal: BDDconfig_OK cfg *) apply H3. assumption. Qed. Lemma cfg_ul_bre_cons_ok : forall (cfg : BDDconfig) (ul : list ad) (bre : Brel_env) (node : ad), cfg_ul_bre_ok cfg ul bre -> cfg_ul_bre_ok cfg (node :: ul) bre. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold cfg_ul_bre_ok in |- *. intros. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) apply H with (P := P) (node := node0). assumption. Qed. Lemma cfg_ul_bte_cons_ok : forall (cfg : BDDconfig) (ul : list ad) (bte : Btrans_env) (node : ad), cfg_ul_bte_ok cfg ul bte -> cfg_ul_bte_ok cfg (node :: ul) bte. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold cfg_ul_bte_ok in |- *. intros. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) apply H with (t := t) (node := node0). assumption. Qed. Lemma cfg_re_bre_ok_put : forall (cfg : BDDconfig) (re : rel_env) (bre : Brel_env) (be : bool_expr) (P node : ad), cfg_re_bre_ok cfg re bre -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be) -> cfg_re_bre_ok cfg (re_put re P be) (MapPut _ bre P node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold cfg_re_bre_ok in |- *. unfold re_put in |- *. intros P0 node0. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite (MapPut_semantics ad bre P node P0). elim (Neqb P P0). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) inversion H1. rewrite <- H3. assumption. intro. apply H. assumption. Qed. Lemma cfg_ul_bre_ok_put : forall (cfg : BDDconfig) (ul : list ad) (bre : Brel_env) (P node : ad), cfg_ul_bre_ok cfg ul bre -> cfg_ul_bre_ok cfg (node :: ul) (MapPut _ bre P node). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold cfg_ul_bre_ok in |- *. intros P0 node0. (* Goal: forall _ : @eq (option ad) (if N.eqb P P0 then @Some ad node else MapGet ad bre P0) (@Some ad node0), used_node' cfg (@cons ad node ul) node0 *) rewrite (MapPut_semantics _ bre P node). elim (sumbool_of_bool (Neqb P P0)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro y. rewrite y. intros. injection H0. intros. rewrite <- H1. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. intro y. rewrite y. intro. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node'_ul. apply H with (P := P0). assumption. Qed. Lemma BDDiter2n_lemma2 : forall (te : trans_env) (bte : Btrans_env) (g : mu_form) (Bf : mu_form -> BDDconfig -> list ad -> Brel_env -> BDDconfig * ad) (f : mu_form -> rel_env -> bool_expr), (forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> f_bre_ok g bre -> f_bte_ok g bte -> BDDconfig_OK (fst (Bf g cfg ul bre)) /\ config_node_OK (fst (Bf g cfg ul bre)) (snd (Bf g cfg ul bre)) /\ used_nodes_preserved cfg (fst (Bf g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (Bf g cfg ul bre)) (snd (Bf g cfg ul bre))) (bool_fun_of_bool_expr (f g re))) -> forall (n : nat) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> config_node_OK cfg node -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> (forall x : ad, f_bre_ok g (MapPut _ bre P x)) -> f_bte_ok g bte -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be) -> BDDconfig_OK (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) /\ config_node_OK (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) (snd (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) /\ used_nodes_preserved cfg (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) (snd (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (fst (iter2n _ be_eq_dec (fun be : bool_expr => f g (re_put re P be)) be n))) /\ snd (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n) = snd (iter2n _ be_eq_dec (fun be : bool_expr => f g (re_put re P be)) be n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros te bte g Bf f H. simple induction n. simpl in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (@snd (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (prod_sum _ _ (Bf g cfg (node :: ul) (MapPut ad bre P node))). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (Bf g cfg (@cons ad node ul) (MapPut ad bre P node)) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))))) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (@snd (prod BDDconfig ad) bool (let (cfg1, node1) := Bf g cfg (@cons ad node ul) (MapPut ad bre P node) in @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) (N.eqb node node1))) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) intros cfg1 H11. elim H11; clear H11. intros node1 H11. rewrite H11. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) simpl in |- *. cut (used_list_OK cfg (node :: ul)). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfg (node :: ul) (MapPut _ bre P node)). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfg (node :: ul) bte). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_re_bre_ok cfg (re_put re P be) (MapPut _ bre P node)). intro. elim (H cfg (node :: ul) (re_put re P be) (MapPut _ bre P node) H0 H10 H12 H14 H13 H6 (H7 node) H8). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H11. simpl in |- *. intros. (* Goal: and (BDDconfig_OK cfg1) (and (config_node_OK cfg1 node1) (and (used_nodes_preserved cfg cfg1 ul) (and (bool_fun_eq (bool_fun_of_BDD cfg1 node1) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim H16; intros H18 H17; elim H17; clear H17; intros H17 H20. (* Goal: and (BDDconfig_OK cfg1) (and (config_node_OK cfg1 node1) (and (used_nodes_preserved cfg cfg1 ul) (and (bool_fun_eq (bool_fun_of_BDD cfg1 node1) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) clear H16. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_nodes_preserved cfg cfg1 ul). intro. (* Goal: and (BDDconfig_OK cfg1) (and (config_node_OK cfg1 node1) (and (used_nodes_preserved cfg cfg1 ul) (and (bool_fun_eq (bool_fun_of_BDD cfg1 node1) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (cfg_ul_re_bre_ok_preserved cfg cfg1 ul re bre H0 H15 H2 H3 H4 H16). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. (* Goal: and (BDDconfig_OK cfg1) (and (config_node_OK cfg1 node1) (and (used_nodes_preserved cfg cfg1 ul) (and (bool_fun_eq (bool_fun_of_BDD cfg1 node1) (bool_fun_of_bool_expr (f g (re_put re P be)))) (@eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))))))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (cfg_ul_te_bte_ok_preserved cfg cfg1 ul te bte H0 H15 H2 H5 H6 H16). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. split. assumption. split. assumption. split. assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split. assumption. elim (sumbool_of_bool (Neqb node node1)). intro y. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y. symmetry in |- *. apply be_eq_dec_correct. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 node) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD cfg1 node1) *) (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node). (* Goal: BDDconfig_OK cfg *) apply bool_fun_eq_sym; assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr (f g (re_put re P be))) *) (* Goal: forall _ : @eq bool (N.eqb node node1) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1). (* Goal: @eq bool (N.eqb a x) false *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) rewrite <- (Neqb_complete _ _ y). apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := node :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. intro y. (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) elim (sumbool_of_bool (be_eq_dec be (f g (re_put re P be)))). intro y0. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (Neqb node node1 = true). intro. rewrite H24 in y. discriminate. (* Goal: BDDconfig_OK cfg *) apply BDDunique with (cfg := cfg1). assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_OK with (ul := node :: ul). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 node) (bool_fun_of_BDD cfg1 node1) *) (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_bool_expr be). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 node) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD cfg1 node1) *) (* Goal: forall _ : @eq bool (be_eq_dec be (f g (re_put re P be))) false, @eq bool (N.eqb node node1) (be_eq_dec be (f g (re_put re P be))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: cfg_re_bre_ok cfg (re_put re P be) (MapPut ad bre P node) *) (* Goal: cfg_ul_bte_ok cfg (@cons ad node ul) bte *) (* Goal: cfg_ul_bre_ok cfg (@cons ad node ul) (MapPut ad bre P node) *) (* Goal: used_list_OK cfg (@cons ad node ul) *) (* Goal: forall (n : nat) (_ : forall (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n))))))) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : config_node_OK cfg node) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : forall x : ad, f_bre_ok g (MapPut ad bre P x)) (_ : f_bte_ok g bte) (_ : bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be)), and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n)))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node (S n))) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be (S n))))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg node). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := node :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_of_bool_expr (f g (re_put re P be))). (* Goal: BDDconfig_OK cfg *) apply be_eq_dec_complete. assumption. apply bool_fun_eq_sym. assumption. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y0. rewrite y. rewrite y0. reflexivity. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := node). assumption. (* Goal: BDDconfig_OK cfg *) apply cfg_re_bre_ok_put. assumption. assumption. apply cfg_ul_bte_cons_ok. (* Goal: BDDconfig_OK cfg *) assumption. apply cfg_ul_bre_ok_put. assumption. apply node_OK_list_OK. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. assumption. simpl in |- *. intros. elim (prod_sum _ _ (iter2n bool_expr be_eq_dec (fun be0 : bool_expr => f g (re_put re P be0)) be n0)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H11; clear H11. elim (prod_sum _ _ (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n0)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H11. elim (prod_sum _ _ x1). intros. inversion H14. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) b n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (let (p, b) := BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg node n0 in let (cfg1, node1) := p in if b then @pair (prod BDDconfig ad) bool (@pair BDDconfig ad cfg1 node1) true else BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) cfg1 node1 n0)) (@snd bool_expr bool (let (b, b0) := iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) be n0 in if b0 then @pair bool_expr bool b true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) b n0)))))) *) clear H11 H14. elim (H0 P cfg node ul be re bre H1 H2 H3 H4 H5 H6 H7 H8 H9 H10). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. rewrite H12. rewrite H13. simpl in |- *. rewrite H15. simpl in |- *. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool x2). intro y. rewrite y. simpl in |- *. rewrite H12 in H14. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)) (@snd bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))))) *) rewrite H13 in H14. rewrite H13 in H11. simpl in H11, H14. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)) (@snd bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))))) *) rewrite H15 in H11. rewrite H15 in H14. simpl in H11, H14. elim H14; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: BDDconfig_OK cfg *) split. assumption. split. assumption. split. (* Goal: BDDconfig_OK cfg *) assumption. rewrite <- H20. rewrite y. split. assumption. reflexivity. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) intro y; rewrite y. rewrite H12 in H14. rewrite H13 in H11. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)) (@snd bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))))) *) rewrite H13 in H14. rewrite H15 in H14. rewrite H15 in H11. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)) (@snd bool_expr bool (if x0 then @pair bool_expr bool x true else iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))))) *) simpl in H11, H14. elim H14; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite <- H20. rewrite y. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK x3 ul). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (config_node_OK (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) ul) (and (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0))) (@snd BDDconfig ad (@fst (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)))) (bool_fun_of_bool_expr (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))) (@eq bool (@snd (prod BDDconfig ad) bool (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (@cons ad node0 ul) (MapPut ad bre P node0)) x3 x4 n0)) (@snd bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => f g (re_put re P be)) x n0)))))) *) (* Goal: used_list_OK x3 ul *) elim (cfg_ul_re_bre_ok_preserved cfg x3 ul re bre H1 H11 H3 H4 H5 H16). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (cfg_ul_te_bte_ok_preserved cfg x3 ul te bte H1 H11 H3 H6 H7 H16). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (H0 P x3 x4 ul x re bre H11 H17 H19 H21 H22 H23 H24 H8 H9 H18). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. split. assumption. decompose [and] H26. split. assumption. (* Goal: BDDconfig_OK cfg *) split. apply used_nodes_preserved_trans with (cfg2 := x3). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. split. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. Qed. Lemma BDDiter2n_lemma1 : forall (te : trans_env) (bte : Btrans_env) (g : mu_form) (Bf : mu_form -> BDDconfig -> list ad -> Brel_env -> BDDconfig * ad) (f : mu_form -> rel_env -> bool_expr), (forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> f_bre_ok g bre -> f_bte_ok g bte -> BDDconfig_OK (fst (Bf g cfg ul bre)) /\ config_node_OK (fst (Bf g cfg ul bre)) (snd (Bf g cfg ul bre)) /\ used_nodes_preserved cfg (fst (Bf g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (Bf g cfg ul bre)) (snd (Bf g cfg ul bre))) (bool_fun_of_bool_expr (f g re))) -> forall (n : nat) (P : ad) (cfg : BDDconfig) (node : ad) (ul : list ad) (be : bool_expr) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> config_node_OK cfg node -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> (forall x : ad, f_bre_ok g (MapPut _ bre P x)) -> f_bte_ok g bte -> bool_fun_eq (bool_fun_of_BDD cfg node) (bool_fun_of_bool_expr be) -> BDDconfig_OK (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) /\ config_node_OK (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) (snd (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) /\ used_nodes_preserved cfg (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n))) (snd (fst (BDDiter2n (fun (cfg0 : BDDconfig) (node0 : ad) => Bf g cfg0 (node0 :: ul) (MapPut ad bre P node0)) cfg node n)))) (bool_fun_of_bool_expr (fst (iter2n _ be_eq_dec (fun be : bool_expr => f g (re_put re P be)) be n))). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (BDDiter2n_lemma2 te bte g Bf f H n P cfg node ul be re bre). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. decompose [and] H11. split. assumption. split. assumption. (* Goal: BDDconfig_OK cfg *) split. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Section MuEval. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Variable te : trans_env. Variable bte : Btrans_env. (* semantics for mu_calculus formulae; but the fixpoint operator is instead interpreted as iteration of a function atmost 2^n times *) Fixpoint mu_eval (f : mu_form) : rel_env -> bool_expr := fun re => match f with | mu_0 => Zero | mu_1 => One | mu_ap p => Var p | mu_rel_var P => re P | mu_neg g => Neg (mu_eval g re) | mu_and g h => ANd (mu_eval g re) (mu_eval h re) | mu_or g h => Or (mu_eval g re) (mu_eval h re) | mu_impl g h => Impl (mu_eval g re) (mu_eval h re) | mu_iff g h => Iff (mu_eval g re) (mu_eval h re) | mu_all t g => mu_all_eval N (te t) (mu_eval g re) | mu_ex t g => mu_ex_eval N (te t) (mu_eval g re) | mu_mu P g => fst (iter2n _ be_eq_dec (fun be => mu_eval g (re_put re P be)) Zero N) end. Definition re_to_be_inc (f : rel_env -> bool_expr) (P : ad) := forall (re : rel_env) (be1 be2 : bool_expr), be_le be1 be2 -> be_le (f (re_put re P be1)) (f (re_put re P be2)). Definition re_to_be_dec (f : rel_env -> bool_expr) (P : ad) := forall (re : rel_env) (be1 be2 : bool_expr), be_le be1 be2 -> be_le (f (re_put re P be2)) (f (re_put re P be1)). Definition ad_to_be_ok (vf : ad -> bool) (abe : ad -> bool_expr) := forall x : ad, be_ok vf (abe x). Definition ad_to_be_eq (f1 f2 : ad -> bool_expr) := forall x : ad, be_eq (f1 x) (f2 x). Hypothesis te_ok : ad_to_be_ok (var_lu 0 (2 * N)) te. Lemma mu_all_eval_lu : forall t be : bool_expr, be_ok (var_lu 0 (2 * N)) t -> be_ok (var_lu 0 N) be -> be_ok (var_lu 0 N) (mu_all_eval N t be). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply be_x_free_be_ok. intros. elim (mu_all_x_free _ _ _ _ H1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim H3. intro. cut (var_lu 0 (2 * N) x = true). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_lu in H5. elim (andb_prop _ _ H5). intros. unfold var_lu in |- *. (* Goal: @eq bool (andb (Nat.leb O (N.to_nat x)) (Nat.leb (S (N.to_nat x)) N)) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@List.In BDDvar x (lx N))), @eq bool (var_lu O N x) true *) rewrite H6. unfold andb in |- *. unfold ifb in |- *. apply not_false_is_true. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold not in |- *; intro. apply H2. replace x with (N_of_nat (nat_of_N x)). (* Goal: le x0 n0 *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) apply in_lx'. apply le_S_n. fold (N < S (nat_of_N x)) in |- *. (* Goal: BDDconfig_OK cfg *) apply leb_complete_conv. assumption. apply leb_complete. assumption. (* Goal: BDDconfig_OK cfg *) apply N_of_nat_of_N. apply be_ok_be_x_free with (be := t). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. intros. decompose [and] H4. apply be_ok_be_x_free with (be := be). (* Goal: BDDconfig_OK cfg *) assumption. assumption. Qed. Lemma mu_ex_eval_lu : forall t be : bool_expr, be_ok (var_lu 0 (2 * N)) t -> be_ok (var_lu 0 N) be -> be_ok (var_lu 0 N) (mu_ex_eval N t be). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply be_x_free_be_ok. intros. elim (mu_ex_x_free _ _ _ _ H1). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim H3. intro. cut (var_lu 0 (2 * N) x = true). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold var_lu in H5. elim (andb_prop _ _ H5). intros. unfold var_lu in |- *. (* Goal: @eq bool (andb (Nat.leb O (N.to_nat x)) (Nat.leb (S (N.to_nat x)) N)) true *) (* Goal: @eq bool (var_lu O (Init.Nat.mul (S (S O)) N) x) true *) (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@List.In BDDvar x (lx N))), @eq bool (var_lu O N x) true *) rewrite H6. unfold andb in |- *. unfold ifb in |- *. apply not_false_is_true. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold not in |- *; intro. apply H2. replace x with (N_of_nat (nat_of_N x)). (* Goal: le x0 n0 *) (* Goal: be_eq (be_iter1 bef (bef be) x0) (be_iter1 bef (bef (bef be)) x0) *) (* Goal: forall _ : @eq nat O x, @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) apply in_lx'. apply le_S_n. fold (N < S (nat_of_N x)) in |- *. (* Goal: BDDconfig_OK cfg *) apply leb_complete_conv. assumption. apply leb_complete. assumption. (* Goal: BDDconfig_OK cfg *) apply N_of_nat_of_N. apply be_ok_be_x_free with (be := t). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. intros. decompose [and] H4. apply be_ok_be_x_free with (be := be). (* Goal: BDDconfig_OK cfg *) assumption. assumption. Qed. Definition ad_to_be_eq1 (f : mu_form) (f1 f2 : ad -> bool_expr) := forall x : ad, mu_rel_free x f = true -> be_eq (f1 x) (f2 x). Lemma mu_eval_lemma2 : forall f : mu_form, f_ok f -> mu_form_ap_ok (var_lu 0 N) f -> (forall re : rel_env, ad_to_be_ok (var_lu 0 N) re -> be_ok (var_lu 0 N) (mu_eval f re)) /\ (forall P : ad, f_P_even P f true -> re_to_be_inc (mu_eval f) P) /\ (forall P : ad, f_P_even P f false -> re_to_be_dec (mu_eval f) P) /\ (forall re1 re2 : rel_env, ad_to_be_eq1 f re1 re2 -> be_eq (mu_eval f re1) (mu_eval f re2)). Proof. (* Goal: forall (f : mu_form) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok f bre) (_ : f_bte_ok f bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval f cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval f cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval f cfg ul bre))) (bool_fun_of_bool_expr (mu_eval f re))))) *) simple induction f. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. intros. apply zero_ok. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. apply be_le_refl. split. unfold re_to_be_dec in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply be_le_refl. intros. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. intros. apply one_ok. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. apply be_le_refl. split. unfold re_to_be_dec in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply be_le_refl. intros. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. intros. apply var_ok. apply mu_ap_ok_inv. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. unfold re_to_be_inc in |- *. split. intros. apply be_le_refl. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. apply be_le_refl. intros. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. intros. apply H1. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. unfold re_put in |- *. elim (Neqb P a). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_le_refl. split. intros. inversion H1. unfold re_to_be_dec in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_put in |- *. rewrite H3. intros. apply be_le_refl. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H1. simpl in |- *. apply Neqb_correct. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. elim H. clear H. intros. split. intros. apply neg_ok. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. split. unfold re_to_be_inc in |- *. intros. (* Goal: be_le (Neg (mu_eval m (re_put re P be2))) (Neg (mu_eval m (re_put re P be1))) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_neg m) re1 re2), be_eq (Neg (mu_eval m re1)) (Neg (mu_eval m re2)) *) (* Goal: f_ok m *) (* Goal: mu_form_ap_ok (var_lu O N) m *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_and m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_and m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_and m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) true), re_to_be_inc (mu_eval (mu_and m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_and m m0) false), re_to_be_dec (mu_eval (mu_and m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_and m m0) re1 re2), be_eq (mu_eval (mu_and m m0) re1) (mu_eval (mu_and m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_or m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_or m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_or m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) true), re_to_be_inc (mu_eval (mu_or m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_or m m0) false), re_to_be_dec (mu_eval (mu_or m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_or m m0) re1 re2), be_eq (mu_eval (mu_or m m0) re1) (mu_eval (mu_or m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_impl m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_impl m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_impl m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) true), re_to_be_inc (mu_eval (mu_impl m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_impl m m0) false), re_to_be_dec (mu_eval (mu_impl m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_impl m m0) re1 re2), be_eq (mu_eval (mu_impl m m0) re1) (mu_eval (mu_impl m m0) re2)))) *) (* Goal: forall (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (m0 : mu_form) (_ : forall (_ : f_ok m0) (_ : mu_form_ap_ok (var_lu O N) m0), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m0 re)) (and (forall (P : ad) (_ : f_P_even P m0 true), re_to_be_inc (mu_eval m0) P) (and (forall (P : ad) (_ : f_P_even P m0 false), re_to_be_dec (mu_eval m0) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m0 re1 re2), be_eq (mu_eval m0 re1) (mu_eval m0 re2))))) (_ : f_ok (mu_iff m m0)) (_ : mu_form_ap_ok (var_lu O N) (mu_iff m m0)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_iff m m0) re)) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (mu_eval (mu_iff m m0)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (mu_eval (mu_iff m m0)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (mu_eval (mu_iff m m0) re1) (mu_eval (mu_iff m m0) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) apply be_le_not_1. unfold re_to_be_dec in H2. (* Goal: BDDconfig_OK cfg *) apply (proj1 (proj2 H2)). inversion H3. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. unfold re_to_be_dec in |- *. intros. unfold re_to_be_inc in H2. (* Goal: BDDconfig_OK cfg *) apply be_le_not_1. apply (proj1 H2). inversion H3. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. intros. apply eq_neg_eq. apply (proj2 (proj2 H2)). (* Goal: BDDconfig_OK cfg *) assumption. inversion H0. assumption. inversion H1. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H1. clear H3 H4. clear f0 g. inversion H2. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (Iff (mu_eval m re) (mu_eval m0 re))) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (Iff (mu_eval m re1) (mu_eval m0 re1)) (Iff (mu_eval m re2) (mu_eval m0 re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H3 H4. clear f0 g. elim (H H5 H7); clear H; intros H4 H3; elim H3; clear H3; intros H3 H9; elim H9; clear H9; intros H9 H11. elim (H0 H6 H8); clear H0; intros H10 H; elim H; clear H; intros H H12; elim H12; clear H12; intros H12 H14. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. apply and_ok. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H4. assumption. apply H10. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply and_le. unfold re_to_be_inc in H3. apply H3. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in H. apply H. assumption. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply and_le. unfold re_to_be_dec in H9. apply H9. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in H12. apply H12. assumption. assumption. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply and_eq. apply H11. unfold ad_to_be_eq1 in |- *. intros. apply H0. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H13. reflexivity. apply H14. unfold ad_to_be_eq1 in |- *. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. simpl in |- *. rewrite H13. auto with bool. (* end and *) (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H1. clear H3 H4. clear f0 g. inversion H2. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (Iff (mu_eval m re) (mu_eval m0 re))) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (Iff (mu_eval m re1) (mu_eval m0 re1)) (Iff (mu_eval m re2) (mu_eval m0 re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H3 H4. clear f0 g. elim (H H5 H7); clear H; intros H4 H3; elim H3; clear H3; intros H3 H9; elim H9; clear H9; intros H9 H11. elim (H0 H6 H8); clear H0; intros H10 H; elim H; clear H; intros H H12; elim H12; clear H12; intros H12 H14. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. apply or_ok. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H4. assumption. apply H10. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply or_le. unfold re_to_be_inc in H3. apply H3. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in H. apply H. assumption. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply or_le. unfold re_to_be_dec in H9. apply H9. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in H12. apply H12. assumption. assumption. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply or_eq. apply H11. unfold ad_to_be_eq1 in |- *. intros. apply H0. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H13. reflexivity. apply H14. unfold ad_to_be_eq1 in |- *. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. simpl in |- *. rewrite H13. auto with bool. (* end or *) (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H1. clear H3 H4. clear f0 g. inversion H2. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (Iff (mu_eval m re) (mu_eval m0 re))) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (Iff (mu_eval m re1) (mu_eval m0 re1)) (Iff (mu_eval m re2) (mu_eval m0 re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H3 H4. clear f0 g. elim (H H5 H7); clear H; intros H4 H3; elim H3; clear H3; intros H3 H9; elim H9; clear H9; intros H9 H11. elim (H0 H6 H8); clear H0; intros H10 H; elim H; clear H; intros H H12; elim H12; clear H12; intros H12 H14. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. apply impl_ok. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H4. assumption. apply H10. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply impl_le. unfold re_to_be_dec in H9. apply H9. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in H. apply H. assumption. assumption. split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. inversion H0. clear H15 H16. clear f0 g. (* Goal: BDDconfig_OK cfg *) apply impl_le. unfold re_to_be_inc in H3. apply H3. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in H12. apply H12. assumption. assumption. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply impl_eq. apply H11. unfold ad_to_be_eq1 in |- *. intros. apply H0. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H13. reflexivity. apply H14. unfold ad_to_be_eq1 in |- *. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. simpl in |- *. rewrite H13. auto with bool. (*end impl*) (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H1. clear H3 H4. clear f0 g. inversion H2. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (Iff (mu_eval m re) (mu_eval m0 re))) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) true), re_to_be_inc (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_iff m m0) false), re_to_be_dec (fun re : rel_env => Iff (mu_eval m re) (mu_eval m0 re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_iff m m0) re1 re2), be_eq (Iff (mu_eval m re1) (mu_eval m0 re1)) (Iff (mu_eval m re2) (mu_eval m0 re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_all a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_all a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_all a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) true), re_to_be_inc (mu_eval (mu_all a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_all a m) false), re_to_be_dec (mu_eval (mu_all a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_all a m) re1 re2), be_eq (mu_eval (mu_all a m) re1) (mu_eval (mu_all a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_ex a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_ex a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_ex a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (mu_eval (mu_ex a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (mu_eval (mu_ex a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_eval (mu_ex a m) re1) (mu_eval (mu_ex a m) re2)))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H3 H4. clear f0 g. elim (H H5 H7); clear H; intros H4 H3; elim H3; clear H3; intros H3 H9; elim H9; clear H9; intros H9 H11. elim (H0 H6 H8); clear H0; intros H10 H; elim H; clear H; intros H H12; elim H12; clear H12; intros H12 H14. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. apply iff_ok. (* Goal: BDDconfig_OK cfg *) apply H4. assumption. apply H10. assumption. unfold re_to_be_inc in |- *. (* Goal: re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) unfold re_to_be_dec in |- *. unfold re_to_be_inc in H3. unfold re_to_be_inc in H. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in H9. unfold re_to_be_dec in H12. split. intros. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) inversion H0. clear H15 H16 f0 g. apply be_eq_le. apply iff_eq. (* Goal: BDDconfig_OK cfg *) apply be_le_antisym. apply H3. assumption. assumption. apply H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. assumption. apply be_le_antisym. apply H. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. apply H12. assumption. assumption. split. intros. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) inversion H0. clear H15 H16 f0 g. apply be_eq_le. apply iff_eq. (* Goal: BDDconfig_OK cfg *) apply be_le_antisym. apply H9. assumption. assumption. apply H3. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply be_le_antisym. apply H12. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. apply H. assumption. assumption. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply iff_eq. apply H11. unfold ad_to_be_eq1 in |- *. intros. apply H0. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H13. reflexivity. apply H14. unfold ad_to_be_eq1 in |- *. intros. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. simpl in |- *. rewrite H13. auto with bool. (* end iff *) (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H0. clear H2 H4 t f0. inversion H1. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_ex_eval N (te a) (mu_eval m re))) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H2 H5 t f0. elim (H H3 H4); clear H; intros H5 H2; elim H2; clear H2; intros H2 H6; elim H6; clear H6; intros H6 H8. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply mu_all_eval_lu. apply te_ok. apply H5. assumption. split. intros. (* Goal: lfp (fun be : bool_expr => mu_eval f (re_put re P be)) (mu_eval (mu_mu P f) re) *) inversion H. (* Goal: re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H7 H10 t f0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. (* Goal: BDDconfig_OK cfg *) apply mu_all_le. unfold re_to_be_inc in H2. apply H2. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. split. intros. inversion H. (* Goal: re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H7 H10 t f0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. apply mu_all_le. unfold re_to_be_dec in H6. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H6. assumption. assumption. intros. apply mu_all_eq. apply H8. (* Goal: BDDconfig_OK cfg *) assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H0. clear H2 H4 t f0. inversion H1. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_ex_eval N (te a) (mu_eval m re))) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) true), re_to_be_inc (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P) (and (forall (P : ad) (_ : f_P_even P (mu_ex a m) false), re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H2 H5 t f0. elim (H H3 H4); clear H; intros H5 H2; elim H2; clear H2; intros H2 H6; elim H6; clear H6; intros H6 H8. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply mu_ex_eval_lu. apply te_ok. apply H5. assumption. split. intros. (* Goal: lfp (fun be : bool_expr => mu_eval f (re_put re P be)) (mu_eval (mu_mu P f) re) *) inversion H. (* Goal: re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H7 H10 t f0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_inc in |- *. intros. (* Goal: BDDconfig_OK cfg *) apply mu_ex_le. unfold re_to_be_inc in H2. apply H2. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. split. intros. inversion H. (* Goal: re_to_be_dec (fun re : rel_env => mu_ex_eval N (te a) (mu_eval m re)) P *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_ex a m) re1 re2), be_eq (mu_ex_eval N (te a) (mu_eval m re1)) (mu_ex_eval N (te a) (mu_eval m re2)) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (_ : f_ok m) (_ : mu_form_ap_ok (var_lu O N) m), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval m re)) (and (forall (P : ad) (_ : f_P_even P m true), re_to_be_inc (mu_eval m) P) (and (forall (P : ad) (_ : f_P_even P m false), re_to_be_dec (mu_eval m) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 m re1 re2), be_eq (mu_eval m re1) (mu_eval m re2))))) (_ : f_ok (mu_mu a m)) (_ : mu_form_ap_ok (var_lu O N) (mu_mu a m)), and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval (mu_mu a m) re)) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (mu_eval (mu_mu a m)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (mu_eval (mu_mu a m)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (mu_eval (mu_mu a m) re1) (mu_eval (mu_mu a m) re2)))) *) clear H7 H10 t f0. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_to_be_dec in |- *. intros. apply mu_ex_le. unfold re_to_be_dec in H6. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H6. assumption. assumption. intros. apply mu_ex_eq. apply H8. (* Goal: BDDconfig_OK cfg *) assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. inversion H0. clear H2 H3 P f0. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N))) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) true), re_to_be_inc (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N))))) *) inversion H1. clear H2 H6 P f0. elim (H H4 H3); clear H; intros H6 H2; elim H2; clear H2; intros H2 H7; elim H7; clear H7; intros H7 H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N) in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter2n_prop_preserved. apply zero_ok. intros. apply H6. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_put in |- *. unfold ad_to_be_ok in |- *. intros. elim (Neqb a x). assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold re_to_be_inc in |- *. intros. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be1) a be)) Zero N) in |- *. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be2) a be)) Zero N) in |- *. (* Goal: lfp (fun be : bool_expr => mu_eval f (re_put re P be)) (mu_eval (mu_mu P f) re) *) unfold re_to_be_inc in H2. inversion H. clear H12 H11 f0. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_eq_le. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter2n_eq_preserved_2. apply be_eq_refl. intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H9. unfold ad_to_be_eq in |- *. unfold re_put in |- *. intro. elim (Neqb a x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. assumption. intros. apply be_eq_refl. intros. apply H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold ad_to_be_eq1 in |- *. intros. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold re_put in |- *. intro. elim (Neqb a x). apply H10. reflexivity. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply H9. unfold ad_to_be_eq1 in |- *. unfold re_put in |- *. intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (Neqb a x). intros. assumption. intros. apply be_eq_refl. (* Goal: be_le (@fst bool_expr bool (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be1) a be)) Zero N)) (@fst bool_expr bool (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be2) a be)) Zero N)) *) (* Goal: and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N))) *) rename H13 into H14. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be n)) (@fst bool_expr bool (be_iter2n bef be' n)) *) (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_iter2n_le_preserved. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_le_refl. intros. apply H9. unfold re_put at 1 3 in |- *. unfold ad_to_be_eq1 in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. elim (Neqb a x). intros. assumption. intros. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply H9. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_put at 1 3 in |- *. unfold ad_to_be_eq1 in |- *. intro. elim (Neqb a x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. assumption. intros. apply be_eq_refl. intros. (* Goal: be_le (mu_eval m (re_put (re_put re P be1) a be1')) (mu_eval m (re_put (re_put re P be2) a be2')) *) (* Goal: and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N))) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re P be1) a be2')). (* Goal: BDDconfig_OK cfg *) apply H2. assumption. assumption. (* Goal: be_le (mu_eval m (re_put (re_put re a be2') P be2)) (mu_eval m (re_put (re_put re P be1) a be2')) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re a be2') P be1)). (* Goal: be_le (mu_eval m (re_put (re_put re P be1) a be2')) (mu_eval m (re_put (re_put re a be2') P be1)) *) (* Goal: be_le (mu_eval m (re_put (re_put re a be2') P be1)) (mu_eval m (re_put (re_put re P be2) a be2')) *) (* Goal: and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N))) *) rename H13 into H15. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_eq_le. apply H9. unfold ad_to_be_eq1 in |- *. intro. unfold re_put in |- *. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) elim (sumbool_of_bool (Neqb P x)). intros y H16. rewrite y. (* Goal: be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) cut (Neqb a x = false). (* Goal: forall _ : @eq bool (N.eqb a x) false, be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: @eq bool (N.eqb a x) false *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) intro H17. (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) rewrite H17. apply be_eq_refl. (* Goal: BDDconfig_OK cfg *) rewrite <- (Neqb_complete _ _ y). rewrite (Neqb_comm a P). assumption. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) intros y H16. rewrite y. apply be_eq_refl. (* Goal: be_le (mu_eval m (re_put (re_put re P be2) a be2')) (mu_eval m (re_put (re_put re P be1) a be2')) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re a be2') P be2)). (* Goal: BDDconfig_OK cfg *) apply H2. assumption. assumption. apply be_eq_le. apply H9. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold ad_to_be_eq1 in |- *. intro. unfold re_put in |- *. (* Goal: be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) elim (sumbool_of_bool (Neqb P x)). (* Goal: forall (_ : @eq bool (N.eqb P x) false) (_ : @eq bool (mu_rel_free x m) true), be_eq (if N.eqb P x then be2 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be2 else re x) *) (* Goal: and (forall (P : ad) (_ : f_P_even P (mu_mu a m) false), re_to_be_dec (fun re : rel_env => @fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re a be)) Zero N)) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N))) *) intros y H16. (* Goal: lfp_be bef be (if be_eq_dec be (bef be) then bef be else iter bool_expr be_eq_dec bef (bef be) n0) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) rewrite y. (* Goal: be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) cut (Neqb a x = false). (* Goal: forall _ : @eq bool (N.eqb a x) false, be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: @eq bool (N.eqb a x) false *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) intro H17. (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) rewrite H17. apply be_eq_refl. (* Goal: BDDconfig_OK cfg *) rewrite <- (Neqb_complete _ _ y). rewrite (Neqb_comm a P). assumption. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros y H16. rewrite y. apply be_eq_refl. split. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold re_to_be_dec in |- *. intros. (* Goal: lfp (fun be : bool_expr => mu_eval f (re_put re P be)) (mu_eval (mu_mu P f) re) *) unfold re_to_be_dec in H7. inversion H. clear H12 H11 f0. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_eq_le. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re a be2) a be)) Zero N) in |- *. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re a be1) a be)) Zero N) in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter2n_eq_preserved_2. apply be_eq_refl. intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H9. unfold ad_to_be_eq1 in |- *. unfold re_put in |- *. intro. elim (Neqb a x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. assumption. intros. apply be_eq_refl. intros. apply H9. (* Goal: ad_to_be_eq1 f re1 re2 *) unfold ad_to_be_eq1 in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_put in |- *. intros. elim (Neqb a x). assumption. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply H9. unfold ad_to_be_eq1 in |- *. unfold re_put in |- *. intros. (* Goal: BDDconfig_OK cfg *) elim (Neqb a x). assumption. apply be_eq_refl. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be2) a be)) Zero N) in |- *. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put (re_put re P be1) a be)) Zero N) in |- *. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be n)) (@fst bool_expr bool (be_iter2n bef be' n)) *) (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_iter2n_le_preserved. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_le_refl. intros. apply H9. unfold re_put at 1 3 in |- *. unfold ad_to_be_eq1 in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (Neqb a x). assumption. apply be_eq_refl. intros. apply H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold re_put at 1 3 in |- *. unfold ad_to_be_eq1 in |- *. intros. elim (Neqb a x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. apply be_eq_refl. intros. (* Goal: be_le (mu_eval m (re_put (re_put re P be2) a be1')) (mu_eval m (re_put (re_put re P be1) a be2')) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re P be2) a be2')). (* Goal: BDDconfig_OK cfg *) unfold re_to_be_inc in H2. apply H2. assumption. assumption. (* Goal: be_le (mu_eval m (re_put (re_put re P be2) a be2')) (mu_eval m (re_put (re_put re P be1) a be2')) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re a be2') P be2)). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_eq_le. apply H9. unfold ad_to_be_eq1 in |- *. intros. unfold re_put in |- *. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool (Neqb P x)). intro y. rewrite y. (* Goal: be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) cut (Neqb a x = false). (* Goal: forall _ : @eq bool (N.eqb a x) false, be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: @eq bool (N.eqb a x) false *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) intro H17. (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) rewrite H17. apply be_eq_refl. (* Goal: BDDconfig_OK cfg *) rewrite <- (Neqb_complete _ _ y). rewrite (Neqb_comm a P). assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. rewrite y. apply be_eq_refl. (* Goal: be_le (mu_eval m (re_put (re_put re a be2') P be2)) (mu_eval m (re_put (re_put re P be1) a be2')) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) apply be_le_trans with (be2 := mu_eval m (re_put (re_put re a be2') P be1)). (* Goal: BDDconfig_OK cfg *) apply H7. assumption. assumption. apply be_eq_le. apply H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold ad_to_be_eq1 in |- *. intros. unfold re_put in |- *. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool (Neqb P x)). intro y. rewrite y. (* Goal: be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) cut (Neqb a x = false). (* Goal: forall _ : @eq bool (N.eqb a x) false, be_eq be1 (if N.eqb a x then be2' else be1) *) (* Goal: @eq bool (N.eqb a x) false *) (* Goal: forall _ : @eq bool (N.eqb P x) false, be_eq (if N.eqb P x then be1 else if N.eqb a x then be2' else re x) (if N.eqb a x then be2' else if N.eqb P x then be1 else re x) *) (* Goal: forall (re1 re2 : rel_env) (_ : ad_to_be_eq1 (mu_mu a m) re1 re2), be_eq (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N)) (@fst bool_expr bool (iter2n bool_expr be_eq_dec (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N)) *) intro H17. (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) rewrite H17. apply be_eq_refl. (* Goal: BDDconfig_OK cfg *) rewrite <- (Neqb_complete _ _ y). rewrite (Neqb_comm a P). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro y. rewrite y. apply be_eq_refl. intros. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put re1 a be)) Zero N) in |- *. fold (be_iter2n (fun be : bool_expr => mu_eval m (re_put re2 a be)) Zero N) in |- *. (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) apply be_iter2n_eq_preserved_2. apply be_eq_refl. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply H9. unfold ad_to_be_eq1, re_put in |- *. intros. elim (Neqb a x). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. apply be_eq_refl. intros. apply H9. unfold ad_to_be_eq1, re_put in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (Neqb a x). assumption. apply be_eq_refl. intros. apply H9. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold ad_to_be_eq1, re_put in |- *. intros. elim (sumbool_of_bool (Neqb a x)). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro y. rewrite y. assumption. intro y. rewrite y. apply H. simpl in |- *. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite (Neqb_comm x a). rewrite y. rewrite H10. reflexivity. Qed. Lemma mu_eval_lemma1 : forall f : mu_form, f_ok f -> mu_form_ap_ok (var_lu 0 N) f -> (forall re : rel_env, ad_to_be_ok (var_lu 0 N) re -> be_ok (var_lu 0 N) (mu_eval f re)) /\ (forall P : ad, f_P_even P f true -> re_to_be_inc (mu_eval f) P) /\ (forall P : ad, f_P_even P f false -> re_to_be_dec (mu_eval f) P) /\ (forall re1 re2 : rel_env, ad_to_be_eq re1 re2 -> be_eq (mu_eval f re1) (mu_eval f re2)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (mu_eval_lemma2 f H H0). intros. (* Goal: and (forall (re : rel_env) (_ : ad_to_be_ok (var_lu O N) re), be_ok (var_lu O N) (mu_eval f re)) (and (forall (P : ad) (_ : f_P_even P f true), re_to_be_inc (mu_eval f) P) (and (forall (P : ad) (_ : f_P_even P f false), re_to_be_dec (mu_eval f) P) (forall (re1 re2 : rel_env) (_ : ad_to_be_eq re1 re2), be_eq (mu_eval f re1) (mu_eval f re2)))) *) elim H2; intros H4 H3; elim H3; clear H3; intros H3 H6. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. assumption. split. assumption. split. assumption. intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H6. unfold ad_to_be_eq1 in |- *. intros. apply H5. Qed. Lemma lfp_be_lfp : forall (bef : bool_expr -> bool_expr) (be : bool_expr), lfp bef be <-> lfp_be bef Zero be. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold lfp, lfp_be in |- *. intros. unfold be_le in |- *. unfold eval_be' in |- *. simpl in |- *. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold bool_fun_zero in |- *. split. intro. (* Goal: and (fp bef be) (and (forall (ve : var_env') (_ : @eq bool false true), @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true) (forall (be' : bool_expr) (_ : fp bef be') (_ : forall (ve : var_env') (_ : @eq bool false true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true) (ve : var_env') (_ : @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true)) *) (* Goal: forall _ : and (fp bef be) (and (forall (ve : var_env') (_ : @eq bool false true), @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true) (forall (be' : bool_expr) (_ : fp bef be') (_ : forall (ve : var_env') (_ : @eq bool false true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true) (ve : var_env') (_ : @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true)), and (fp bef be) (forall (be' : bool_expr) (_ : fp bef be') (ve : var_env') (_ : @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true) *) elim H; intros H1 H2. (* Goal: BDDconfig_OK cfg *) split. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. intros. discriminate. intros. apply H2. assumption. assumption. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. (* Goal: and (fp bef be) (forall (be' : bool_expr) (_ : fp bef be') (ve : var_env') (_ : @eq bool (bool_fun_of_bool_expr be (var_env'_to_env ve)) true), @eq bool (bool_fun_of_bool_expr be' (var_env'_to_env ve)) true) *) elim H; intros H1 H0; elim H0; clear H0; intros H0 H3. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) split. assumption. intros. apply H3. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) assumption. intros. discriminate. assumption. Qed. Lemma be_iter_is_lfp_be : forall (bef : bool_expr -> bool_expr) (n : nat) (be : bool_expr), be_le be (bef be) -> (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (bef be1) (bef be2)) -> (forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (bef be1) (bef be2)) -> (exists m : nat, m <= n /\ be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))) -> lfp_be bef be (be_iter bef be n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro. simple induction n. intros be H01 H02 H00 H. elim H. intros. (* Goal: lfp_be bef be (be_iter bef be O) *) (* Goal: forall (n : nat) (_ : forall (be : bool_expr) (_ : be_le be (bef be)) (_ : forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : @ex nat (fun m : nat => and (le m n) (be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))))), lfp_be bef be (be_iter bef be n)) (be : bool_expr) (_ : be_le be (bef be)) (_ : forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2)) (_ : forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2)) (_ : @ex nat (fun m : nat => and (le m (S n)) (be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))))), lfp_be bef be (be_iter bef be (S n)) *) elim H0; intros H2 H3. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (x = 0). intro. rewrite H1 in H3. simpl in H3. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold lfp_be in |- *. split. unfold fp in |- *. unfold be_iter in |- *. simpl in |- *. assumption. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) split. unfold be_iter in |- *. simpl in |- *. apply be_le_refl. unfold be_iter in |- *. simpl in |- *. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) trivial. symmetry in |- *. apply le_n_O_eq. assumption. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros n0 H be H01 H02 H00 H0. elim H0. intros. (* Goal: lfp_be bef be (be_iter bef be (S n0)) *) elim H1; intros H3 H4. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (H (bef be)). intros. (* Goal: lfp_be bef be (be_iter bef be (S n0)) *) (* Goal: be_le (bef be) (bef (bef be)) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (bef be1) (bef be2) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: @ex nat (fun m : nat => and (le m n0) (be_eq (be_iter1 bef (bef be) m) (be_iter1 bef (bef (bef be)) m))) *) elim H5; intros H7 H8. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) unfold be_iter in |- *. simpl in |- *. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (sumbool_of_bool (be_eq_dec be (bef be))). intro y. rewrite y. split. (* Goal: BDDconfig_OK cfg *) unfold fp in |- *. apply H02. apply be_eq_dec_eq. assumption. split. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply be_le_trans with (be2 := be). apply be_eq_le. apply be_eq_sym. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply be_eq_dec_eq. assumption. assumption. intro y. rewrite y. split. (* Goal: BDDconfig_OK cfg *) exact H2. split. apply be_le_trans with (be2 := bef be). assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) exact H7. intros. apply H8. assumption. (* Goal: BDDconfig_OK cfg *) apply be_le_trans with (be2 := bef be'). apply H00. assumption. (* Goal: BDDconfig_OK cfg *) apply be_eq_le. unfold fp in H6. apply be_eq_sym. assumption. apply H00. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. assumption. assumption. elim (O_or_S x). intro y. elim y. (* Goal: BDDconfig_OK cfg *) intros x0 y0. split with x0. split. apply le_S_n. rewrite y0. assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite <- y0 in H4. simpl in H4. assumption. intro y. split with 0. split. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply le_O_n. simpl in |- *. rewrite <- y in H4. simpl in H4. apply H02. (* Goal: BDDconfig_OK cfg *) assumption. Qed. Lemma be_iter1_n_le : forall (n : nat) (be : bool_expr) (bef : bool_expr -> bool_expr), n <> 0 -> (forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (bef be1) (bef be2)) -> be_le be (bef be) -> be_le be (be_iter1 bef be n). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simple induction n. intros. elim (H (refl_equal _)). intro. elim n0. simpl in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) trivial. intros. apply be_le_trans with (be2 := be_iter1 bef be (S n1)). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply H0. auto with arith. assumption. simpl in |- *. assumption. simpl in |- *. (* Goal: BDDconfig_OK cfg *) apply be_iter1_le_preserved. apply H2. assumption. assumption. Qed. Lemma be_iter2n_is_lfp_be : forall (bef : bool_expr -> bool_expr) (n : nat) (be : bool_expr), be_le be (bef be) -> (forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (bef be1) (bef be2)) -> (forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (bef be1) (bef be2)) -> (exists m : nat, m <= two_power n /\ be_eq (be_iter1 bef be m) (be_iter1 bef be (S m))) -> lfp_be bef be (fst (be_iter2n bef be n)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H2. inversion H3. clear H2 H3. split. unfold fp in |- *. (* Goal: be_eq (@fst bool_expr bool (be_iter2n bef be n)) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_eq_trans with (be2 := be_iter1 bef be (two_power n)). (* Goal: BDDconfig_OK cfg *) apply be_iter2n_2n. assumption. (* Goal: be_eq (be_iter1 bef be (two_power n)) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_eq_trans with (be2 := bef (be_iter1 bef be (two_power n))). apply be_eq_trans with (be2 := be_iter1 bef (be_iter1 bef be x) (two_power n - x)). (* Goal: be_eq (be_iter1 bef be (two_power n)) (be_iter1 bef (be_iter1 bef be x) (Init.Nat.sub (two_power n) x)) *) (* Goal: be_eq (be_iter1 bef (be_iter1 bef be x) (Init.Nat.sub (two_power n) x)) (bef (be_iter1 bef be (two_power n))) *) (* Goal: be_eq (bef (be_iter1 bef be (two_power n))) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_eq_trans with (be2 := be_iter1 bef be (x + (two_power n - x))). (* Goal: BDDconfig_OK cfg *) rewrite <- (le_plus_minus x (two_power n)). apply be_eq_refl. assumption. (* Goal: be_eq (@fst bool_expr bool (be_iter2n bef be' n)) be' *) apply be_eq_sym. apply be_iter1_plus1. apply be_eq_trans with (be2 := be_iter1 bef (be_iter1 bef be (S x)) (two_power n - x)). (* Goal: BDDconfig_OK cfg *) apply be_iter1_preserves_eq. assumption. assumption. (* Goal: be_eq (be_iter1 bef (be_iter1 bef be (S x)) (Init.Nat.sub (two_power n) x)) (bef (be_iter1 bef be (two_power n))) *) (* Goal: be_eq (bef (be_iter1 bef be (two_power n))) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_eq_trans with (be2 := be_iter1 bef be (S x + (two_power n - x))). (* Goal: be_eq (be_iter1 bef (be_iter1 bef be (two_power n)) (S O)) (be_iter1 bef be (Init.Nat.add (two_power n) (S O))) *) (* Goal: be_eq (be_iter1 bef (be_iter1 bef be (two_power n)) (S O)) (bef (be_iter1 bef be (two_power n))) *) (* Goal: le x (two_power n) *) (* Goal: be_eq (bef (be_iter1 bef be (two_power n))) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_iter1_plus1. rewrite <- (Splus_nm x (two_power n - x)). (* Goal: be_eq (be_iter1 bef be (S (Init.Nat.add x (Init.Nat.sub (two_power n) x)))) (bef (be_iter1 bef be (two_power n))) *) (* Goal: be_eq (bef (be_iter1 bef be (two_power n))) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) rewrite <- (le_plus_minus x (two_power n)). apply be_eq_trans with (be2 := be_iter1 bef (be_iter1 bef be (two_power n)) 1). (* Goal: be_eq (be_iter1 bef be (S (two_power n))) (be_iter1 bef (be_iter1 bef be (two_power n)) (S O)) *) (* Goal: be_eq (be_iter1 bef (be_iter1 bef be (two_power n)) (S O)) (bef (be_iter1 bef be (two_power n))) *) (* Goal: le x (two_power n) *) (* Goal: be_eq (bef (be_iter1 bef be (two_power n))) (bef (@fst bool_expr bool (be_iter2n bef be n))) *) (* Goal: and (be_le be (@fst bool_expr bool (be_iter2n bef be n))) (forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be') *) apply be_eq_trans with (be2 := be_iter1 bef be (two_power n + 1)). (* Goal: be_eq (re x) (re x) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) rewrite (plus_comm (two_power n) 1). apply be_eq_refl. apply be_eq_sym. (* Goal: BDDconfig_OK cfg *) apply be_iter1_plus1. apply be_eq_refl. assumption. apply H0. (* Goal: BDDconfig_OK cfg *) apply be_eq_sym. apply be_iter2n_2n. assumption. split. (* Goal: be_le be (@fst bool_expr bool (be_iter2n bef be n)) *) (* Goal: forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be' *) apply be_le_trans with (be2 := be_iter1 bef be (two_power n)). (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter1_n_le. unfold not in |- *; intro. apply (lt_irrefl 0). (* Goal: @eq Prop (lt O (two_power n)) (lt O O) *) (* Goal: forall (be1 be2 : bool_expr) (_ : be_le be1 be2), be_le (bef be1) (bef be2) *) (* Goal: be_le be (bef be) *) (* Goal: be_le (be_iter1 bef be (two_power n)) (@fst bool_expr bool (be_iter2n bef be n)) *) (* Goal: forall (be' : bool_expr) (_ : fp bef be') (_ : be_le be be'), be_le (@fst bool_expr bool (be_iter2n bef be n)) be' *) replace (0 < 0) with (0 < two_power n). apply zero_lt_pow. rewrite H2. (* Goal: BDDconfig_OK cfg *) reflexivity. assumption. assumption. apply be_eq_le. apply be_eq_sym. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter2n_2n. assumption. intros. (* Goal: be_le (@fst bool_expr bool (be_iter2n bef be n)) be' *) apply be_le_trans with (be2 := fst (be_iter2n bef be' n)). (* Goal: BDDconfig_OK cfg *) apply be_iter2n_le_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply be_eq_le. apply be_eq_sym. apply be_iter2n_0. (* Goal: BDDconfig_OK cfg *) assumption. assumption. Qed. Lemma be_le_zero : forall be : bool_expr, be_le Zero be. Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold be_le in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_zero in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) discriminate. Qed. Section Mu_eval_as_fix. Variable P : ad. Variable f : mu_form. Variable re : rel_env. Hypothesis f_is_ok : f_ok f. Hypothesis f_ap_ok : mu_form_ap_ok (var_lu 0 N) f. Hypothesis f_even : f_P_even P f true. Hypothesis re_ok : ad_to_be_ok (var_lu 0 N) re. Definition mf (be : bool_expr) := mu_eval f (re_put re P be). Definition mfs (n : nat) := fst (be_iter2n mf Zero n). Lemma mf_inc : be_to_be_inc mf. Proof. (* Goal: forall (be1 be2 : bool_expr) (_ : be_eq be1 be2), be_eq (mf be1) (mf be2) *) unfold mf in |- *. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. unfold be_to_be_inc in |- *. intros. elim (mu_eval_lemma1 f). intros. (* Goal: be_le (mu_eval f (re_put re P be1)) (mu_eval f (re_put re P be2)) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) elim H1; intros H3 H2; elim H2; clear H2; intros H2 H5. (* Goal: BDDconfig_OK cfg *) unfold re_to_be_inc in H3. apply H3. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. Qed. Lemma mf_be_ok : forall be : bool_expr, be_ok (var_lu 0 N) be -> be_ok (var_lu 0 N) (mf be). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold mf in |- *. intros. elim (mu_eval_lemma1 f). intros. apply H0. (* Goal: BDDconfig_OK cfg *) unfold ad_to_be_ok, re_put in |- *. intro. elim (Neqb P x). assumption. (* Goal: BDDconfig_OK cfg *) apply re_ok. assumption. assumption. Qed. Lemma mf_preserves_eq : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (mf be1) (mf be2). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) unfold mf in |- *. elim (mu_eval_lemma1 f). intros. (* Goal: be_eq (mu_eval f (re_put re P be1)) (mu_eval f (re_put re P be2)) *) (* Goal: f_ok f *) (* Goal: mu_form_ap_ok (var_lu O N) f *) elim H0; intros H3 H2; elim H2; clear H2; intros H2 H5. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H5. unfold ad_to_be_eq in |- *. unfold re_put in |- *. intro. elim (Neqb P x). (* Goal: BDDconfig_OK cfg *) assumption. apply be_eq_refl. assumption. assumption. Qed. Lemma mf_fix_ex : exists m : nat, m <= two_power N /\ be_eq (be_iter1 mf Zero m) (be_iter1 mf Zero (S m)). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter1_fix_ex. exact mf_inc. intros. apply mf_be_ok. assumption. (* Goal: be_ok (var_lu O N) Zero *) (* Goal: be_le Zero (mf Zero) *) apply zero_ok. apply be_le_zero. Qed. Lemma mf_lfp : lfp mf (fst (be_iter2n mf Zero N)). Proof. (* Goal: lfp mf (@fst bool_expr bool (be_iter2n mf Zero N)) *) apply (proj2 (lfp_be_lfp mf (fst (be_iter2n mf Zero N)))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply be_iter2n_is_lfp_be. apply be_le_zero. intros. apply mf_preserves_eq. (* Goal: BDDconfig_OK cfg *) assumption. exact mf_inc. exact mf_fix_ex. Qed. End Mu_eval_as_fix. Lemma mu_eval_mu_is_lfp : forall (P : ad) (f : mu_form) (re : rel_env), f_ok (mu_mu P f) -> mu_form_ap_ok (var_lu 0 N) (mu_mu P f) -> ad_to_be_ok (var_lu 0 N) re -> lfp (fun be : bool_expr => mu_eval f (re_put re P be)) (mu_eval (mu_mu P f) re). Proof. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. inversion H. inversion H0. elim (mf_lfp P f re). intros. (* Goal: BDDconfig_OK cfg *) split; assumption. assumption. assumption. assumption. assumption. Qed. Fixpoint BDDmu_eval (f : mu_form) : BDDconfig -> list ad -> Brel_env -> BDDconfig * ad := fun cfg ul bre => match f with | mu_0 => (cfg, BDDzero) | mu_1 => (cfg, BDDone) | mu_ap p => BDDvar_make gc cfg ul p | mu_rel_var P => match MapGet _ bre P with | None => (cfg, BDDzero) | Some node => (cfg, node) end | mu_neg g => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => BDDneg gc cfgg (nodeg :: ul) nodeg end | mu_and g h => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => match BDDmu_eval h cfgg (nodeg :: ul) bre with | (cfgh, nodeh) => BDDand gc cfgh (nodeh :: nodeg :: ul) nodeg nodeh end end | mu_or g h => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => match BDDmu_eval h cfgg (nodeg :: ul) bre with | (cfgh, nodeh) => BDDor gc cfgh (nodeh :: nodeg :: ul) nodeg nodeh end end | mu_impl g h => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => match BDDmu_eval h cfgg (nodeg :: ul) bre with | (cfgh, nodeh) => BDDimpl gc cfgh (nodeh :: nodeg :: ul) nodeg nodeh end end | mu_iff g h => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => match BDDmu_eval h cfgg (nodeg :: ul) bre with | (cfgh, nodeh) => BDDiff gc cfgh (nodeh :: nodeg :: ul) nodeg nodeh end end | mu_all t g => match MapGet _ bte t with | None => (cfg, BDDzero) | Some nodet => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => BDDmu_all N gc cfgg (nodeg :: ul) nodet nodeg end end | mu_ex t g => match MapGet _ bte t with | None => (cfg, BDDzero) | Some nodet => match BDDmu_eval g cfg ul bre with | (cfgg, nodeg) => BDDmu_ex N gc cfgg (nodeg :: ul) nodet nodeg end end | mu_mu P g => fst (BDDiter2n (fun cfg node => BDDmu_eval g cfg (node :: ul) (MapPut _ bre P node)) cfg BDDzero N) end. Lemma BDDmu_eval_ok : forall (f : mu_form) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env), BDDconfig_OK cfg -> used_list_OK cfg ul -> cfg_ul_bre_ok cfg ul bre -> cfg_re_bre_ok cfg re bre -> cfg_ul_bte_ok cfg ul bte -> cfg_te_bte_ok cfg te bte -> f_bre_ok f bre -> f_bte_ok f bte -> BDDconfig_OK (fst (BDDmu_eval f cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval f cfg ul bre)) (snd (BDDmu_eval f cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval f cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval f cfg ul bre)) (snd (BDDmu_eval f cfg ul bre))) (bool_fun_of_bool_expr (mu_eval f re)). Proof. (* Goal: forall (f : mu_form) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok f bre) (_ : f_bte_ok f bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval f cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval f cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval f cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval f cfg ul bre))) (bool_fun_of_bool_expr (mu_eval f re))))) *) simple induction f. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. assumption. split. apply zero_OK. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_refl. apply bool_fun_of_BDD_zero. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros. split. assumption. split. apply one_OK. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_refl. apply bool_fun_of_BDD_one. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro p. simpl in |- *. intros. split. apply BDDvar_make_config_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. split. apply BDDvar_make_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. split. apply BDDvar_make_used_nodes_preserved. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply BDDvar_make_is_var. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro P. simpl in |- *. unfold f_bre_ok in |- *. unfold in_dom in |- *. intros. simpl in H5. cut (match MapGet ad bre P with | None => false | Some _ => true end = true). (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intro. elim (option_sum _ (MapGet ad bre P)). intro y. elim y; clear y. (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros node H8. rewrite H8. simpl in |- *. split. assumption. split. (* Goal: BDDconfig_OK cfg *) apply used_node'_OK with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) unfold cfg_ul_bre_ok in H1. apply H1 with (P := P). assumption. split. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_refl. apply H2. assumption. intro y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite y in H7. discriminate. apply H5. apply Neqb_correct. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intro g. simpl in |- *. intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDmu_eval g cfg ul bre) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg))) (and (config_node_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in BDDneg gc cfgg (@cons ad nodeg ul) nodeg))) (bool_fun_neg (bool_fun_of_bool_expr (mu_eval g re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_and m m0) bre) (_ : f_bte_ok (mu_and m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_and m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros cfgg H8. elim H8; clear H8. intros nodeg H8. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H8. simpl in |- *. intro. elim H9; clear H9; intros H11 H10; elim H10; clear H10; intros H10 H12; elim H12; clear H12; intros H12 H14. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDneg_config_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDneg_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg gc cfgg (@cons ad nodeg ul) nodeg)) (@snd BDDconfig ad (BDDneg gc cfgg (@cons ad nodeg ul) nodeg))) (bool_fun_neg (bool_fun_of_bool_expr (mu_eval g re))) *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_and m m0) bre) (_ : f_bte_ok (mu_and m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_and m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_and m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_trans with (bool_fun_neg (bool_fun_of_BDD cfgg nodeg)). (* Goal: BDDconfig_OK cfg *) apply BDDneg_is_neg. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. apply bool_fun_neg_preserves_eq. assumption. (* Goal: BDDconfig_OK cfg *) apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros g H h. intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDmu_eval g cfg ul bre) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros cfgg H9. elim H9; clear H9. intros nodeg H9. rewrite H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (prod_sum _ _ (BDDmu_eval h cfgg (nodeg :: ul) bre)). intros cfgh H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeh H10. rewrite H10. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_and (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_and_bre_ok _ _ _ H7); intros H12 H13. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDand gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_and (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_or m m0) bre) (_ : f_bte_ok (mu_or m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_or m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_or m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_and_bte_ok _ _ _ H8); intros H14 H15. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H9. simpl in |- *. intros. elim H11; clear H11; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. cut (BDDconfig_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ config_node_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ used_nodes_preserved cfgg (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (nodeg :: ul) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H26; clear H26; intros H28 H27; elim H27; clear H27; intros H27 H29; elim H29; clear H29; intros H29 H31. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgh (nodeh :: nodeg :: ul)). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDand_config_OK. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDand_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgh). assumption. assumption. (* Goal: used_nodes_preserved cfgh (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@cons ad nodeg ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeh). (* Goal: BDDconfig_OK cfg *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)). (* Goal: BDDconfig_OK cfg *) apply BDDand_is_and. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_and_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_bool_expr (mu_eval g re)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeh) (bool_fun_of_bool_expr (mu_eval h re)) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgg nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodeg :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfgg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply H0. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply cfg_ul_bte_cons_ok. assumption. (* Goal: BDDconfig_OK cfg *) apply cfg_ul_bre_cons_ok. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros g H h. intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDmu_eval g cfg ul bre) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros cfgg H9. elim H9; clear H9. intros nodeg H9. rewrite H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (prod_sum _ _ (BDDmu_eval h cfgg (nodeg :: ul) bre)). intros cfgh H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeh H10. rewrite H10. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_or (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_or_bre_ok _ _ _ H7); intros H12 H13. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDor gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_or (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_impl m m0) bre) (_ : f_bte_ok (mu_impl m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_impl m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_impl m m0) re))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_or_bte_ok _ _ _ H8); intros H14 H15. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H9. simpl in |- *. intros. elim H11; clear H11; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. cut (BDDconfig_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ config_node_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ used_nodes_preserved cfgg (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (nodeg :: ul) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H26; clear H26; intros H28 H27; elim H27; clear H27; intros H27 H29; elim H29; clear H29; intros H29 H31. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgh (nodeh :: nodeg :: ul)). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDor_config_OK. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDor_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgh). assumption. assumption. (* Goal: used_nodes_preserved cfgh (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@cons ad nodeg ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeh). (* Goal: BDDconfig_OK cfg *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)). (* Goal: BDDconfig_OK cfg *) apply BDDor_is_or. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_bool_expr (mu_eval g re)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeh) (bool_fun_of_bool_expr (mu_eval h re)) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgg nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodeg :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfgg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply H0. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply cfg_ul_bte_cons_ok. assumption. (* Goal: BDDconfig_OK cfg *) apply cfg_ul_bre_cons_ok. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros g H h. intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDmu_eval g cfg ul bre) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros cfgg H9. elim H9; clear H9. intros nodeg H9. rewrite H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (prod_sum _ _ (BDDmu_eval h cfgg (nodeg :: ul) bre)). intros cfgh H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeh H10. rewrite H10. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_impl (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_impl_bre_ok _ _ _ H7); intros H12 H13. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDimpl gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_impl (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (m0 : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m0 bre) (_ : f_bte_ok m0 bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m0 cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m0 cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m0 re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_iff m m0) bre) (_ : f_bte_ok (mu_iff m m0) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_iff m m0) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_iff m m0) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_impl_bte_ok _ _ _ H8); intros H14 H15. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H9. simpl in |- *. intros. elim H11; clear H11; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. cut (BDDconfig_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ config_node_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ used_nodes_preserved cfgg (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (nodeg :: ul) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H26; clear H26; intros H28 H27; elim H27; clear H27; intros H27 H29; elim H29; clear H29; intros H29 H31. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgh (nodeh :: nodeg :: ul)). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDimpl_config_OK. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDimpl_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgh). assumption. assumption. (* Goal: used_nodes_preserved cfgh (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@cons ad nodeg ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeh). (* Goal: BDDconfig_OK cfg *) apply BDDimpl_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)). (* Goal: BDDconfig_OK cfg *) apply BDDimpl_is_impl. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_impl_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_bool_expr (mu_eval g re)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeh) (bool_fun_of_bool_expr (mu_eval h re)) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgg nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodeg :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfgg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply H0. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply cfg_ul_bte_cons_ok. assumption. (* Goal: BDDconfig_OK cfg *) apply cfg_ul_bre_cons_ok. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros g H h. intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDmu_eval g cfg ul bre) (@pair BDDconfig ad x b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgg, nodeg) := BDDmu_eval g cfg ul bre in let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros cfgg H9. elim H9; clear H9. intros nodeg H9. rewrite H9. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (let (cfgh, nodeh) := BDDmu_eval h cfgg (@cons ad nodeg ul) bre in BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (prod_sum _ _ (BDDmu_eval h cfgg (nodeg :: ul) bre)). intros cfgh H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeh H10. rewrite H10. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_iff_bre_ok _ _ _ H7); intros H12 H13. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re)))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (mu_iff_bte_ok _ _ _ H8); intros H14 H15. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) rewrite H9. simpl in |- *. intros. elim H11; clear H11; intros H17 H16; elim H16; clear H16; intros H16 H18; elim H18; clear H18; intros H18 H20. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. cut (BDDconfig_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ config_node_OK (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre)) /\ used_nodes_preserved cfgg (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (nodeg :: ul) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval h cfgg (nodeg :: ul) bre)) (snd (BDDmu_eval h cfgg (nodeg :: ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H26; clear H26; intros H28 H27; elim H27; clear H27; intros H27 H29; elim H29; clear H29; intros H29 H31. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgh (nodeh :: nodeg :: ul)). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDiff_config_OK. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDiff_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgh). assumption. assumption. (* Goal: used_nodes_preserved cfgh (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@cons ad nodeg ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh)) (@snd BDDconfig ad (BDDiff gc cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg nodeh))) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeh). (* Goal: BDDconfig_OK cfg *) apply BDDiff_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)). (* Goal: BDDconfig_OK cfg *) apply BDDiff_is_iff. assumption. assumption. assumption. (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeg *) (* Goal: used_node' cfgh (@cons ad nodeh (@cons ad nodeg ul)) nodeh *) (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_BDD cfgh nodeh)) (bool_fun_iff (bool_fun_of_bool_expr (mu_eval g re)) (bool_fun_of_bool_expr (mu_eval h re))) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_iff_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeg) (bool_fun_of_bool_expr (mu_eval g re)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgh nodeh) (bool_fun_of_bool_expr (mu_eval h re)) *) (* Goal: used_list_OK cfgh (@cons ad nodeh (@cons ad nodeg ul)) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (and (used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@cons ad nodeg ul)) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre)) (@snd BDDconfig ad (BDDmu_eval h cfgg (@cons ad nodeg ul) bre))) (bool_fun_of_bool_expr (mu_eval h re))))) *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_all a m) bre) (_ : f_bte_ok (mu_all a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_all a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_all a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_ex a m) bre) (_ : f_bte_ok (mu_ex a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_ex a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_ex a m) re))))) *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgg nodeg). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodeg :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfgg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply H0. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply cfg_ul_bte_cons_ok. assumption. (* Goal: BDDconfig_OK cfg *) apply cfg_ul_bre_cons_ok. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros t g. intros. cut (f_bre_ok g bre). cut (f_bte_ok g bte). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). intros cfgg H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeg H10. rewrite H10. unfold f_bte_ok in H7. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in H7. cut (in_dom _ t bte = true). unfold in_dom in |- *. intro. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (option_sum _ (MapGet ad bte t)). clear H11. intro y. elim y; clear y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros nodet H11. rewrite H11. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H12; clear H12; intros H14 H13; elim H13; clear H13; intros H13 H15; elim H15; clear H15; intros H15 H17. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_node' cfgg (nodeg :: ul) nodet). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDmu_all_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDmu_all_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply BDDmu_all_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_all N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)). (* Goal: BDDconfig_OK cfg *) apply BDDmu_all_is_mu_all. assumption. assumption. assumption. assumption. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_all N (bool_fun_of_bool_expr (te t)) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: BDDconfig_OK cfg *) apply bool_fun_mu_all_preserves_eq. apply H20. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_bool_expr (te t)) (bool_fun_of_bool_expr (mu_eval g re))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_sym. apply mu_all_eval_ok. apply H22 with (t := t). (* Goal: BDDconfig_OK cfg *) assumption. apply cfg_ul_bte_cons_ok. assumption. apply cfg_ul_bre_cons_ok. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. assumption. assumption. intro y. rewrite y in H11. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) discriminate. apply H7. rewrite (Neqb_correct t). reflexivity. (* Goal: BDDconfig_OK cfg *) apply mu_all_bte_ok with (t := t). assumption. apply mu_all_bre_ok with (t := t). (* Goal: BDDconfig_OK cfg *) assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros t g. intros. cut (f_bre_ok g bre). cut (f_bte_ok g bte). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. elim (prod_sum _ _ (BDDmu_eval g cfg ul bre)). intros cfgg H10. (* Goal: forall _ : and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim H10; clear H10. intros nodeg H10. rewrite H10. unfold f_bte_ok in H7. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in H7. cut (in_dom _ t bte = true). unfold in_dom in |- *. intro. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) elim (option_sum _ (MapGet ad bte t)). clear H11. intro y. elim y; clear y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) intros nodet H11. rewrite H11. cut (BDDconfig_OK (fst (BDDmu_eval g cfg ul bre)) /\ config_node_OK (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre)) /\ used_nodes_preserved cfg (fst (BDDmu_eval g cfg ul bre)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_eval g cfg ul bre)) (snd (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) rewrite H10. simpl in |- *. intro. elim H12; clear H12; intros H14 H13; elim H13; clear H13; intros H13 H15; elim H15; clear H15; intros H15 H17. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_list_OK cfgg (nodeg :: ul)). intro. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_re_bre_ok_preserved cfg cfgg ul re bre). intros. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) elim (cfg_ul_te_bte_ok_preserved cfg cfgg ul te bte). intros. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bre_ok cfgg (nodeg :: ul) bre). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (cfg_ul_bte_ok cfgg (nodeg :: ul) bte). intro. (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) cut (used_node' cfgg (nodeg :: ul) nodet). intro. split. (* Goal: BDDconfig_OK cfg *) apply BDDmu_ex_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. split. apply BDDmu_ex_node_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgg). assumption. assumption. (* Goal: used_nodes_preserved cfgg (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg)) (@snd BDDconfig ad (BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_nodes_preserved_cons with (node := nodeg). (* Goal: BDDconfig_OK cfg *) apply BDDmu_ex_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)). (* Goal: BDDconfig_OK cfg *) apply BDDmu_ex_is_mu_ex. assumption. assumption. assumption. assumption. (* Goal: used_node' cfgg (@cons ad nodeg ul) nodeg *) (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_BDD cfgg nodet) (bool_fun_of_BDD cfgg nodeg)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_ex N (bool_fun_of_bool_expr (te t)) (bool_fun_of_bool_expr (mu_eval g re))). (* Goal: BDDconfig_OK cfg *) apply bool_fun_mu_ex_preserves_eq. apply H20. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_mu_ex N (bool_fun_of_bool_expr (te t)) (bool_fun_of_bool_expr (mu_eval g re))) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re))) *) (* Goal: used_node' cfgg (@cons ad nodeg ul) nodet *) (* Goal: cfg_ul_bte_ok cfgg (@cons ad nodeg ul) bte *) (* Goal: cfg_ul_bre_ok cfgg (@cons ad nodeg ul) bre *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: BDDconfig_OK cfg *) (* Goal: BDDconfig_OK cfgg *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: used_nodes_preserved cfg cfgg ul *) (* Goal: used_list_OK cfgg (@cons ad nodeg ul) *) (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) apply bool_fun_eq_sym. apply mu_ex_eval_ok. apply H22 with (t := t). (* Goal: BDDconfig_OK cfg *) assumption. apply cfg_ul_bte_cons_ok. assumption. apply cfg_ul_bre_cons_ok. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (and (used_nodes_preserved cfg0 (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) ul0) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0)) (@snd BDDconfig ad (BDDmu_eval g cfg0 ul0 bre0))) (bool_fun_of_bool_expr (mu_eval g re0))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) apply H. assumption. assumption. assumption. assumption. assumption. (* Goal: forall _ : @eq (option ad) (MapGet ad bte t) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end) (@snd BDDconfig ad match MapGet ad bte t with | Some nodet => BDDmu_ex N gc cfgg (@cons ad nodeg ul) nodet nodeg | None => @pair BDDconfig BinNums.N cfg BDDzero end)) (bool_fun_of_bool_expr (mu_ex_eval N (te t) (mu_eval g re)))))) *) (* Goal: @eq bool (in_dom ad t bte) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) assumption. assumption. assumption. intro y. rewrite y in H11. (* Goal: @eq bool (orb true (mu_t_free t g)) true *) (* Goal: f_bte_ok g bte *) (* Goal: f_bre_ok g bre *) (* Goal: forall (a : ad) (m : mu_form) (_ : forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok m bre) (_ : f_bte_ok m bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval m cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval m cfg ul bre))) (bool_fun_of_bool_expr (mu_eval m re)))))) (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok (mu_mu a m) bre) (_ : f_bte_ok (mu_mu a m) bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval (mu_mu a m) cfg ul bre))) (bool_fun_of_bool_expr (mu_eval (mu_mu a m) re))))) *) discriminate. apply H7. rewrite (Neqb_correct t). reflexivity. (* Goal: BDDconfig_OK cfg *) apply mu_ex_bte_ok with (t := t). assumption. apply mu_ex_bre_ok with (t := t). (* Goal: BDDconfig_OK cfg *) assumption. (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) simpl in |- *. intros P g. intros. apply BDDiter2n_lemma1 with (te := te) (bte := bte). (* Goal: forall (cfg : BDDconfig) (ul : list ad) (re : rel_env) (bre : Brel_env) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : cfg_ul_bre_ok cfg ul bre) (_ : cfg_re_bre_ok cfg re bre) (_ : cfg_ul_bte_ok cfg ul bte) (_ : cfg_te_bte_ok cfg te bte) (_ : f_bre_ok g bre) (_ : f_bte_ok g bte), and (BDDconfig_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (config_node_OK (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDmu_eval g cfg ul bre)) (@snd BDDconfig ad (BDDmu_eval g cfg ul bre))) (bool_fun_of_bool_expr (mu_eval g re))))) *) (* Goal: BDDconfig_OK cfg *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: used_list_OK cfg ul *) (* Goal: cfg_ul_bre_ok cfg ul bre *) (* Goal: cfg_re_bre_ok cfg re bre *) (* Goal: cfg_ul_bte_ok cfg ul bte *) (* Goal: cfg_te_bte_ok cfg te bte *) (* Goal: forall x : ad, f_bre_ok g (MapPut ad bre P x) *) (* Goal: f_bte_ok g bte *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_of_bool_expr Zero) *) intros. apply H. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply zero_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. intro. apply mu_mu_bre_ok. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_zero. assumption. Qed. End MuEval. End Nsec.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Section BDD_make. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. (* The arguments for the make function *) Variable cfg : BDDconfig. Variable x : BDDvar. Variable l r : ad. Variable ul : list ad. (* Conditions on the arguments for the make function *) Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis l_used' : used_node' cfg ul l. Hypothesis r_used' : used_node' cfg ul r. Hypothesis xl_lt_x : forall (xl : BDDvar) (ll rl : ad), MapGet _ (bs_of_cfg cfg) l = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt. Hypothesis xr_lt_x : forall (xr : BDDvar) (lr rr : ad), MapGet _ (bs_of_cfg cfg) r = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt. Lemma no_dup : MapGet3 ad (fst (snd cfg)) l r x = None -> forall (x' : BDDvar) (l' r' a : ad), MapGet (BDDvar * (ad * ad)) (bs_of_cfg cfg) a = Some (x', (l', r')) -> (x, (l, r)) <> (x', (l', r')). Proof. (* Goal: forall (_ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad)) (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) unfold not in |- *. intros. injection H1. intros. rewrite <- H2 in H0. (* Goal: False *) rewrite <- H3 in H0. rewrite <- H4 in H0. (* Goal: False *) rewrite (proj2 (proj1 (proj2 cfg_OK) x l r a) H0) in H. (* Goal: False *) discriminate. Qed. Definition BDDmake := if Neqb l r then (cfg, l) else match MapGet3 _ (fst (snd cfg)) l r x with | Some y => (cfg, y) | None => BDDalloc gc cfg x l r ul end. Lemma BDDmake_keeps_config_OK : BDDconfig_OK (fst BDDmake). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) unfold BDDmake in |- *. elim (sumbool_of_bool (Neqb l r)). intro y. rewrite y. (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. intro y. rewrite y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) elim (option_sum _ (MapGet3 ad (fst (snd cfg)) l r x)). intro y0. elim y0. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) clear y0. intros node y0. rewrite y0. assumption. intro y0. rewrite y0. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply BDDalloc_keeps_config_OK. assumption. assumption. assumption. (* Goal: forall (x' : BDDvar) (l' r' a : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (bs_of_cfg cfg) a) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r')))), not (@eq (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) x (@pair ad ad l r)) (@pair BDDvar (prod ad ad) x' (@pair ad ad l' r'))) *) assumption. assumption. assumption. assumption. assumption. intros. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply no_dup with (a := a). assumption. assumption. Qed. Lemma BDDmake_preserves_used_nodes : used_nodes_preserved cfg (fst BDDmake) ul. Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) unfold BDDmake in |- *. elim (sumbool_of_bool (Neqb l r)). intro y. rewrite y. (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply used_nodes_preserved_refl. intro y. rewrite y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) elim (option_sum _ (MapGet3 ad (fst (snd cfg)) l r x)). intro y0. elim y0. (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (@None (prod BDDvar (prod ad ad))), @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) clear y0. intros node y0. rewrite y0. apply used_nodes_preserved_refl. intro y0. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) rewrite y0. apply BDDalloc_preserves_used_nodes. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. Qed. Lemma BDDmake_node_OK : config_node_OK (fst BDDmake) (snd BDDmake). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) unfold BDDmake in |- *. elim (sumbool_of_bool (Neqb l r)). intro y. rewrite y. (* Goal: config_node_OK (@fst BDDconfig ad (@pair BDDconfig ad cfg l)) (@snd BDDconfig ad (@pair BDDconfig ad cfg l)) *) (* Goal: forall _ : @eq bool (N.eqb l r) false, config_node_OK (@fst BDDconfig ad (if N.eqb l r then @pair BDDconfig ad cfg l else match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (@snd BDDconfig ad (if N.eqb l r then @pair BDDconfig ad cfg l else match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) *) unfold config_node_OK in |- *. apply used_node'_OK_bs with (ul := ul). (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) exact (proj1 cfg_OK). assumption. assumption. intro y. rewrite y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) elim (option_sum _ (MapGet3 ad (fst (snd cfg)) l r x)). intro y0. elim y0. (* Goal: forall (x0 : ad) (_ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@Some ad x0)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: forall _ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) clear y0. intros x0 y0. rewrite y0. right. right. unfold in_dom in |- *. simpl in |- *. (* Goal: @eq bool match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) x0 with | Some a => true | None => false end true *) (* Goal: forall _ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad), config_node_OK (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) *) rewrite (proj1 (proj1 (proj2 cfg_OK) x l r x0) y0). reflexivity. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) intro y0. rewrite y0. apply BDDalloc_node_OK. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. assumption. assumption. assumption. assumption. Qed. Lemma BDDmake_bool_fun : bool_fun_eq (bool_fun_of_BDD (fst BDDmake) (snd BDDmake)) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) unfold BDDmake in |- *. elim (sumbool_of_bool (Neqb l r)). intro y. rewrite y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair BDDconfig ad cfg x0)) (@snd BDDconfig ad (@pair BDDconfig ad cfg x0))) (ad_S x)) true *) (* Goal: forall _ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad), @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) simpl in |- *. apply bool_fun_eq_sym. apply bool_fun_if_eq_2. (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) rewrite (Neqb_complete _ _ y). apply bool_fun_eq_refl. intro y. rewrite y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) elim (option_sum _ (MapGet3 ad (fst (snd cfg)) l r x)). intro y0. elim y0. (* Goal: forall (x0 : ad) (_ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@Some ad x0)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) (* Goal: forall _ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l)) *) clear y0. intros x0 y0. rewrite y0. unfold bool_fun_of_BDD in |- *. simpl in |- *. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) *) (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) *) (* Goal: used_nodes_preserved_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) ul *) (* Goal: used_list_OK_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul *) (* Goal: used_node'_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul l *) apply bool_fun_of_BDD_bs_int. exact (proj1 cfg_OK). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (@None (prod BDDvar (prod ad ad))), @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) exact (proj1 (proj1 (proj2 cfg_OK) x l r x0) y0). intro y0. (* Goal: @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) rewrite y0. unfold bool_fun_of_BDD in |- *. simpl in |- *. apply bool_fun_eq_trans with (bool_fun_if x (bool_fun_of_BDD_bs (fst (fst (BDDalloc gc cfg x l r ul))) r) (bool_fun_of_BDD_bs (fst (fst (BDDalloc gc cfg x l r ul))) l)). (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply bool_fun_of_BDD_bs_int. apply BDDalloc_keeps_state_OK. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. apply BDDallocGet. apply bool_fun_if_preserves_eq. (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) *) (* Goal: BDDstate_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) *) (* Goal: used_nodes_preserved_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) ul *) (* Goal: used_list_OK_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul *) (* Goal: used_node'_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul l *) apply used_nodes_preserved'_bs_bool_fun with (ul := ul). exact (proj1 cfg_OK). (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply BDDalloc_keeps_state_OK. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. assumption. assumption. assumption. (* Goal: used_nodes_preserved_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) ul *) (* Goal: used_list_OK_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul *) (* Goal: used_node'_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul l *) fold (used_nodes_preserved cfg (fst (BDDalloc gc cfg x l r ul)) ul) in |- *. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply BDDalloc_preserves_used_nodes. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. apply used_nodes_preserved'_bs_bool_fun with (ul := ul). (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) exact (proj1 cfg_OK). apply BDDalloc_keeps_state_OK. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. (* Goal: used_nodes_preserved_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) (@fst BDDconfig ad (BDDalloc gc cfg x l r ul))) ul *) (* Goal: used_list_OK_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul *) (* Goal: used_node'_bs (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) ul l *) fold (used_nodes_preserved cfg (fst (BDDalloc gc cfg x l r ul)) ul) in |- *. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply BDDalloc_preserves_used_nodes. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) assumption. assumption. Qed. Lemma BDDmake_node_height_eq : Neqb l r = false -> Neqb (node_height (fst BDDmake) (snd BDDmake)) (ad_S x) = true. Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) intro. unfold BDDmake in |- *. rewrite H. (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) elim (option_sum _ (MapGet3 ad (fst (snd cfg)) l r x)). intro y. elim y. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) clear y. intros x0 y. rewrite y. simpl in |- *. unfold node_height in |- *. unfold bs_node_height in |- *. (* Goal: @eq bool (N.eqb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) x0 with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: forall _ : @eq (option ad) (MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x) (@None ad), @eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end) (@snd BDDconfig ad match MapGet3 ad (@fst BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo)))) (@snd BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) l r x with | Some y => @pair BDDconfig ad cfg y | None => BDDalloc gc cfg x l r ul end)) (ad_S x)) true *) rewrite (proj1 (proj1 (proj2 cfg_OK) x l r x0) y). (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply Neqb_correct. intro y. rewrite y. unfold node_height in |- *. unfold bs_node_height in |- *. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair BDDconfig ad cfg l)) (@snd BDDconfig ad (@pair BDDconfig ad cfg l))) (node_height cfg l)) true *) rewrite (BDDallocGet gc cfg x l r ul). apply Neqb_correct. Qed. Lemma BDDmake_node_height_eq_1 : Neqb l r = true -> Neqb (node_height (fst BDDmake) (snd BDDmake)) (node_height cfg l) = true. Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) intro. unfold BDDmake in |- *. rewrite H. apply Neqb_correct. Qed. Lemma BDDmake_node_height_le : Nleb (node_height (fst BDDmake) (snd BDDmake)) (ad_S x) = true. Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) elim (sumbool_of_bool (Neqb l r)). intro y. rewrite (Neqb_complete (node_height (fst BDDmake) (snd BDDmake)) (node_height cfg l)). (* Goal: @eq bool (Nleb (node_height cfg l) (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) unfold node_height in |- *. unfold bs_node_height in |- *. elim (option_sum _ (MapGet _ (fst cfg) l)). (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (@None (prod BDDvar (prod ad ad))), @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) intro y0. elim y0. intro x0. elim x0. intro y1. intro y2. elim y2. intros y3 y4 y5. (* Goal: @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (@None (prod BDDvar (prod ad ad))), @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) rewrite y5. unfold Nleb in |- *. apply leb_correct. apply lt_le_weak. (* Goal: lt (N.to_nat (ad_S y1)) (N.to_nat (ad_S x)) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l) (@None (prod BDDvar (prod ad ad))), @eq bool (Nleb match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) l with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x)) true *) (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (node_height cfg l)) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply BDDcompare_lt. rewrite <- (ad_S_compare y1 x). (* Goal: @eq bool (N.eqb l r) true *) (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) apply xl_lt_x with (ll := y3) (rl := y4). assumption. intro y0. rewrite y0. (* Goal: forall _ : @eq bool (N.eqb l r) false, @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) reflexivity. apply BDDmake_node_height_eq_1. assumption. intro y. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad BDDmake) (@snd BDDconfig ad BDDmake)) (ad_S x)) true *) rewrite (Neqb_complete _ _ (BDDmake_node_height_eq y)). apply Nleb_refl. Qed. End BDD_make.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import neg. Require Import or. Section BDDop. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Section BDDneg_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Definition BDDneg := BDDneg_1 gc cfg ul node (S (nat_of_N (node_height cfg node))). Let lt_1 : nat_of_N (node_height cfg node) < S (nat_of_N (node_height cfg node)). Proof. (* Goal: lt (N.to_nat (node_height cfg node)) (S (N.to_nat (node_height cfg node))) *) unfold lt in |- *. apply le_n. Qed. Lemma BDDneg_config_OK : BDDconfig_OK (fst BDDneg). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDneg) (@snd BDDconfig ad BDDneg)) (node_height cfg node)) true *) unfold BDDneg in |- *. exact (proj1 (BDDneg_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul node lt_1 cfg_OK ul_OK used)). Qed. Lemma BDDneg_node_OK : config_node_OK (fst BDDneg) (snd BDDneg). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDneg) (@snd BDDconfig ad BDDneg)) (node_height cfg node)) true *) unfold BDDneg in |- *. exact (proj1 (proj2 (BDDneg_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul node lt_1 cfg_OK ul_OK used))). Qed. Lemma BDDneg_used_nodes_preserved : used_nodes_preserved cfg (fst BDDneg) ul. Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDneg) (@snd BDDconfig ad BDDneg)) (node_height cfg node)) true *) unfold BDDneg in |- *. exact (proj1 (proj2 (proj2 (BDDneg_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul node lt_1 cfg_OK ul_OK used)))). Qed. Lemma BDDneg_is_neg : bool_fun_eq (bool_fun_of_BDD (fst BDDneg) (snd BDDneg)) (bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDneg) (@snd BDDconfig ad BDDneg)) (node_height cfg node)) true *) unfold BDDneg in |- *. exact (proj2 (proj2 (proj2 (proj2 (BDDneg_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul node lt_1 cfg_OK ul_OK used))))). Qed. Lemma BDDneg_list_OK : used_list_OK (fst BDDneg) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDneg) ul *) exact BDDneg_used_nodes_preserved. Qed. Lemma BDDneg_list_OK_cons : used_list_OK (fst BDDneg) (snd BDDneg :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. exact BDDneg_node_OK. exact BDDneg_list_OK. Qed. Lemma BDDneg_var_eq : Neqb (node_height (fst BDDneg) (snd BDDneg)) (node_height cfg node) = true. Proof. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad BDDneg) (@snd BDDconfig ad BDDneg)) (node_height cfg node)) true *) unfold BDDneg in |- *. exact (proj1 (proj2 (proj2 (proj2 (BDDneg_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul node lt_1 cfg_OK ul_OK used))))). Qed. End BDDneg_results. Section BDDor_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node1 node2 : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used1 : used_node' cfg ul node1. Hypothesis used2 : used_node' cfg ul node2. Definition BDDor := BDDor_1 gc cfg ul node1 node2 (S (max (nat_of_N (node_height cfg node1)) (nat_of_N (node_height cfg node2)))). Let lt_1 : max (nat_of_N (node_height cfg node1)) (nat_of_N (node_height cfg node2)) < S (max (nat_of_N (node_height cfg node1)) (nat_of_N (node_height cfg node2))). Proof. (* Goal: lt (N.to_nat (node_height cfg node)) (S (N.to_nat (node_height cfg node))) *) unfold lt in |- *. apply le_n. Qed. Lemma BDDor_config_OK : BDDconfig_OK (fst BDDor). Proof. exact (proj1 (BDDor_1_lemma _ gc_is_OK _ _ _ _ _ lt_1 cfg_OK ul_OK used1 used2)). Qed. Lemma BDDor_node_OK : config_node_OK (fst BDDor) (snd BDDor). Proof. exact (proj1 (proj2 (BDDor_1_lemma _ gc_is_OK _ _ _ _ _ lt_1 cfg_OK ul_OK used1 used2))). Qed. Lemma BDDor_used_nodes_preserved : used_nodes_preserved cfg (fst BDDor) ul. Proof. exact (proj1 (proj2 (proj2 (BDDor_1_lemma _ gc_is_OK _ _ _ _ _ lt_1 cfg_OK ul_OK used1 used2)))). Qed. Lemma BDDor_is_or : bool_fun_eq (bool_fun_of_BDD (fst BDDor) (snd BDDor)) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. exact (proj2 (proj2 (proj2 (proj2 (BDDor_1_lemma _ gc_is_OK _ _ _ _ _ lt_1 cfg_OK ul_OK used1 used2))))). Qed. Lemma BDDor_list_OK : used_list_OK (fst BDDor) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDor) ul *) exact BDDor_used_nodes_preserved. Qed. Lemma BDDor_list_OK_cons : used_list_OK (fst BDDor) (snd BDDor :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. exact BDDor_node_OK. exact BDDor_list_OK. Qed. Lemma BDDor_var_le : Nleb (node_height (fst BDDor) (snd BDDor)) (BDDvar_max (node_height cfg node1) (node_height cfg node2)) = true. Proof. exact (proj1 (proj2 (proj2 (proj2 (BDDor_1_lemma _ gc_is_OK _ _ _ _ _ lt_1 cfg_OK ul_OK used1 used2))))). Qed. End BDDor_results. Section BDDimpl_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node1 node2 : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used1 : used_node' cfg ul node1. Hypothesis used2 : used_node' cfg ul node2. Definition BDDimpl := match BDDneg cfg ul node1 with | (cfg1, node1') => BDDor cfg1 (node1' :: ul) node1' node2 end. Lemma BDDimpl_config_OK : BDDconfig_OK (fst BDDimpl). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDimpl) (@snd BDDconfig ad BDDimpl)) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. apply BDDor_config_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). apply BDDneg_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H. reflexivity. assumption. Qed. Lemma BDDimpl_node_OK : config_node_OK (fst BDDimpl) (snd BDDimpl). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDimpl) (@snd BDDconfig ad BDDimpl)) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. apply BDDor_node_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). apply BDDneg_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H. reflexivity. assumption. Qed. Lemma BDDimpl_used_nodes_preserved : used_nodes_preserved cfg (fst BDDimpl) ul. Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDimpl) (@snd BDDconfig ad BDDimpl)) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. apply used_nodes_preserved_cons with (node := node1'). (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDor cfg ul node1 node2)) ul *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: BDDconfig_OK cfg1 *) apply BDDor_used_nodes_preserved. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). apply BDDneg_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H. reflexivity. assumption. Qed. Lemma BDDimpl_is_impl : bool_fun_eq (bool_fun_of_BDD (fst BDDimpl) (snd BDDimpl)) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDimpl) (@snd BDDconfig ad BDDimpl)) (bool_fun_impl (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDimpl in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg1 node1') (bool_fun_of_BDD cfg1 node2)). (* Goal: BDDconfig_OK cfg1 *) apply BDDor_is_or. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H. reflexivity. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_of_BDD cfg node2)). (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply bool_fun_or_preserves_eq. apply BDDneg_is_neg. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. apply used_nodes_preserved'_bool_fun with (ul := ul). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply BDDneg_config_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. rewrite H. reflexivity. rewrite H. reflexivity. (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply bool_fun_eq_sym. apply bool_fun_impl_lemma. Qed. Lemma BDDimpl_list_OK : used_list_OK (fst BDDimpl) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDimpl) ul *) exact BDDimpl_used_nodes_preserved. Qed. Lemma BDDimpl_list_OK_cons : used_list_OK (fst BDDimpl) (snd BDDimpl :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. apply BDDimpl_node_OK. exact BDDimpl_list_OK. Qed. End BDDimpl_results. Section BDDand_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node1 node2 : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used1 : used_node' cfg ul node1. Hypothesis used2 : used_node' cfg ul node2. Definition BDDand := match BDDneg cfg ul node1 with | (cfg1, node1') => match BDDneg cfg1 (node1' :: ul) node2 with | (cfg2, node2') => match BDDor cfg2 (node2' :: node1' :: ul) node1' node2' with | (cfg3, node3) => BDDneg cfg3 (node3 :: ul) node3 end end end. Lemma BDDand_config_OK : BDDconfig_OK (fst BDDand). Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDneg cfg1 (node1' :: ul) node2)). intros cfg2 H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H0. clear H0. intros node2' H0. rewrite H0. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2') (@pair BDDconfig ad x b))), @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) intros cfg3 H1. elim H1. clear H1. intros node3 H1. rewrite H1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). intros. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node1' :: ul) node2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node2' :: node1' :: ul)). intro. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) apply BDDneg_config_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_config_OK. assumption. assumption. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) apply used_node'_cons_node_ul. rewrite H1. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_node_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. apply cons_OK_list_OK with (node := node1'). (* Goal: used_list_OK (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) cfg3 *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply cons_OK_list_OK with (node := node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_list_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_list_OK_cons. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. Qed. Lemma BDDand_node_OK : config_node_OK (fst BDDand) (snd BDDand). Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDneg cfg1 (node1' :: ul) node2)). intros cfg2 H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H0. clear H0. intros node2' H0. rewrite H0. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2') (@pair BDDconfig ad x b))), @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) intros cfg3 H1. elim H1. clear H1. intros node3 H1. rewrite H1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). intros. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node1' :: ul) node2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node2' :: node1' :: ul)). intro. (* Goal: config_node_OK (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDneg_node_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_config_OK. assumption. assumption. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) apply used_node'_cons_node_ul. rewrite H1. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_node_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. apply cons_OK_list_OK with (node := node1'). (* Goal: used_list_OK (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) cfg3 *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply cons_OK_list_OK with (node := node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_list_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_list_OK_cons. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. Qed. Lemma BDDand_used_nodes_preserved : used_nodes_preserved cfg (fst BDDand) ul. Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDneg cfg1 (node1' :: ul) node2)). intros cfg2 H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H0. clear H0. intros node2' H0. rewrite H0. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2') (@pair BDDconfig ad x b))), @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) intros cfg3 H1. elim H1. clear H1. intros node3 H1. rewrite H1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). intros. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node1' :: ul) node2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node2' :: node1' :: ul)). intro. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg3). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: used_nodes_preserved cfg1 cfg3 ul *) (* Goal: used_nodes_preserved cfg3 (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) ul *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node1'). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. assumption. (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg3 (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) ul *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_used_nodes_preserved. assumption. assumption. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) apply used_node'_cons_node_ul. rewrite H1. reflexivity. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) ul *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node3). (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDneg cfg ul node1)) ul *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: BDDconfig_OK cfg1 *) apply BDDneg_used_nodes_preserved. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_config_OK. assumption. assumption. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) apply used_node'_cons_node_ul. rewrite H1. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_node_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. apply cons_OK_list_OK with (node := node1'). (* Goal: used_list_OK (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) cfg3 *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply cons_OK_list_OK with (node := node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_list_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_list_OK_cons. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. Qed. Lemma BDDand_is_and : bool_fun_eq (bool_fun_of_BDD (fst BDDand) (snd BDDand)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDneg cfg1 (node1' :: ul) node2)). intros cfg2 H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H0. clear H0. intros node2' H0. rewrite H0. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2') (@pair BDDconfig ad x b))), @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) intros cfg3 H1. elim H1. clear H1. intros node3 H1. rewrite H1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). intros. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node1' :: ul) node2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node2' :: node1' :: ul)). intro. cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDneg cfg3 (node3 :: ul) node3)) (snd (BDDneg cfg3 (node3 :: ul) node3))) (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) (bool_fun_neg (bool_fun_of_BDD cfg3 node3))). intro. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg3 node3)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_or (bool_fun_of_BDD cfg2 node1') (bool_fun_of_BDD cfg2 node2'))). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_neg_preserves_eq. replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_is_or. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))). (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_BDD cfg2 node1') (bool_fun_of_BDD cfg2 node2')) (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (bool_fun_neg (bool_fun_of_BDD cfg3 node3)) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_neg_preserves_eq. apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node1') (bool_fun_neg (bool_fun_of_BDD cfg node1)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2') (bool_fun_neg (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_or (bool_fun_neg (bool_fun_of_BDD cfg node1)) (bool_fun_neg (bool_fun_of_BDD cfg node2)))) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (bool_fun_neg (bool_fun_of_BDD cfg3 node3)) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1'). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_bool_fun with (ul := node1' :: ul). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_is_neg. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg1 node2)). (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_is_neg. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. apply bool_fun_neg_preserves_eq. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. rewrite H. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply bool_fun_eq_sym. apply bool_fun_and_lemma. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (bool_fun_neg (bool_fun_of_BDD cfg3 node3)) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDneg_is_neg. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_config_OK. assumption. assumption. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) apply used_node'_cons_node_ul. rewrite H1. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_node_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. apply cons_OK_list_OK with (node := node1'). (* Goal: used_list_OK (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) cfg3 *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply cons_OK_list_OK with (node := node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_list_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_list_OK_cons. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. Qed. Lemma BDDand_list_OK : used_list_OK (fst BDDand) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDand) ul *) exact BDDand_used_nodes_preserved. Qed. Lemma BDDand_list_OK_cons : used_list_OK (fst BDDand) (snd BDDand :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. apply BDDand_node_OK. exact BDDand_list_OK. Qed. Lemma BDDand_var_le : Nleb (node_height (fst BDDand) (snd BDDand)) (BDDvar_max (node_height cfg node1) (node_height cfg node2)) = true. Proof. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg1, node1') := BDDneg cfg ul node1 in let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) unfold BDDand in |- *. elim (prod_sum _ _ (BDDneg cfg ul node1)). intros cfg1 H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H. clear H. intros node1' H. rewrite H. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg2, node2') := BDDneg cfg1 (@cons ad node1' ul) node2 in let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDneg cfg1 (node1' :: ul) node2)). intros cfg2 H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim H0. clear H0. intros node2' H0. rewrite H0. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) elim (prod_sum _ _ (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2') (@pair BDDconfig ad x b))), @eq bool (Nleb (node_height (@fst BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (let (cfg3, node3) := BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2' in BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) intros cfg3 H1. elim H1. clear H1. intros node3 H1. rewrite H1. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). intros. (* Goal: @eq bool (Nleb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node1' :: ul) node2). intro. cut (BDDconfig_OK cfg2). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) intro. cut (used_nodes_preserved cfg1 cfg2 (node1' :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node2' :: node1' :: ul)). intro. replace (node_height (fst (BDDneg cfg3 (node3 :: ul) node3)) (snd (BDDneg cfg3 (node3 :: ul) node3))) with (node_height cfg3 node3). (* Goal: @eq bool (Nleb (node_height cfg3 node3) (BDDvar_max (node_height cfg node1) (node_height cfg node2))) true *) (* Goal: @eq N (node_height cfg3 node3) (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace (node_height cfg node1) with (node_height cfg2 node1'). (* Goal: @eq bool (Nleb (node_height cfg3 node3) (BDDvar_max (node_height cfg2 node1') (node_height cfg node2))) true *) (* Goal: @eq N (node_height cfg2 node1') (node_height cfg node1) *) (* Goal: @eq N (node_height cfg3 node3) (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace (node_height cfg node2) with (node_height cfg2 node2'). (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_var_le. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. (* Goal: @eq N (node_height cfg2 node2') (node_height cfg node2) *) (* Goal: @eq N (node_height cfg2 node1') (node_height cfg node1) *) (* Goal: @eq N (node_height cfg3 node3) (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) transitivity (node_height cfg1 node2). (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply Neqb_complete. apply BDDneg_var_eq. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg1 *) apply Neqb_complete. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. rewrite H. reflexivity. (* Goal: @eq N (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (node_height cfg3 node3) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) transitivity (node_height cfg1 node1'). apply Neqb_complete. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) node1') (node_height cfg1 node1')) true *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: @eq N (node_height cfg1 node1') (node_height cfg node1) *) (* Goal: @eq N (node_height cfg3 node3) (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved'_node_height_eq with (ul := node1' :: ul). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply BDDneg_config_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply Neqb_complete. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_var_eq. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) reflexivity. rewrite H. reflexivity. symmetry in |- *. apply Neqb_complete. (* Goal: @eq bool (N.eqb (node_height (@fst BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3)) (@snd BDDconfig ad (BDDneg cfg3 (@cons ad node3 ul) node3))) (node_height cfg3 node3)) true *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDneg_var_eq. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_config_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) reflexivity. apply node_OK_list_OK. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). replace node3 with (snd (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_node_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H1. reflexivity. (* Goal: used_list_OK cfg3 ul *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDor cfg2 (node2' :: node1' :: ul) node1' node2')). (* Goal: used_list_OK (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) ul *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg2 (@cons ad node2' (@cons ad node1' ul)) node1' node2')) cfg3 *) (* Goal: used_node' cfg3 (@cons ad node3 ul) node3 *) (* Goal: used_list_OK cfg2 (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply cons_OK_list_OK with (node := node1'). apply cons_OK_list_OK with (node := node2'). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_list_OK. assumption. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. rewrite H1. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) (@cons ad node2' (@cons ad node1' ul)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg1 (@cons ad node1' ul) node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node1' ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2' with (snd (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_list_OK_cons. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node1' ul) node2 *) (* Goal: used_list_OK cfg1 (@cons ad node1' ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDneg cfg1 (node1' :: ul) node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H0. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg cfg ul node1)) (@cons ad node1' ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg cfg ul node1)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1' with (snd (BDDneg cfg ul node1)). apply BDDneg_list_OK_cons. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. rewrite H. reflexivity. rewrite H. (* Goal: BDDconfig_OK cfg1 *) reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg cfg ul node1)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDneg_config_OK. assumption. assumption. assumption. rewrite H. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) reflexivity. Qed. End BDDand_results. Section BDDiff_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node1 node2 : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used1 : used_node' cfg ul node1. Hypothesis used2 : used_node' cfg ul node2. Definition BDDiff := match BDDor cfg ul node1 node2 with | (cfg1, node3) => match BDDand cfg1 (node3 :: ul) node1 node2 with | (cfg2, node4) => BDDimpl cfg2 (node4 :: node3 :: ul) node3 node4 end end. Lemma BDDiff_config_OK : BDDconfig_OK (fst BDDiff). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDiff) (@snd BDDconfig ad BDDiff)) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDiff in |- *. elim (prod_sum _ _ (BDDor cfg ul node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg ul node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg1 H. elim H. clear H. intros node3 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDand cfg1 (@cons ad node3 ul) node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg2 H0. elim H0. clear H0. intros node4 H0. rewrite H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). intro. cut (used_nodes_preserved cfg cfg1 ul). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) intro. cut (used_list_OK cfg1 (node3 :: ul)). intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node3 :: ul) node1). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) cut (used_node' cfg1 (node3 :: ul) node2). intros. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node3 :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node4 :: node3 :: ul)). intro. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDimpl_config_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H0. reflexivity. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) cfg2 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. assumption. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) (@snd BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDor cfg ul node1 node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: used_list_OK cfg1 ul *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDor cfg ul node1 node2)). apply BDDor_node_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) rewrite H. reflexivity. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). apply BDDor_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDiff_node_OK : config_node_OK (fst BDDiff) (snd BDDiff). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDiff) (@snd BDDconfig ad BDDiff)) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDiff in |- *. elim (prod_sum _ _ (BDDor cfg ul node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg ul node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg1 H. elim H. clear H. intros node3 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDand cfg1 (@cons ad node3 ul) node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg2 H0. elim H0. clear H0. intros node4 H0. rewrite H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). intro. cut (used_nodes_preserved cfg cfg1 ul). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) intro. cut (used_list_OK cfg1 (node3 :: ul)). intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node3 :: ul) node1). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) cut (used_node' cfg1 (node3 :: ul) node2). intros. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node3 :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node4 :: node3 :: ul)). intro. (* Goal: config_node_OK (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDimpl_node_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H0. reflexivity. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) cfg2 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. assumption. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) (@snd BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDor cfg ul node1 node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: used_list_OK cfg1 ul *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDor cfg ul node1 node2)). apply BDDor_node_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) rewrite H. reflexivity. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). apply BDDor_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDiff_used_nodes_preserved : used_nodes_preserved cfg (fst BDDiff) ul. Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDiff) (@snd BDDconfig ad BDDiff)) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDiff in |- *. elim (prod_sum _ _ (BDDor cfg ul node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg ul node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg1 H. elim H. clear H. intros node3 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDand cfg1 (@cons ad node3 ul) node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg2 H0. elim H0. clear H0. intros node4 H0. rewrite H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). intro. cut (used_nodes_preserved cfg cfg1 ul). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) intro. cut (used_list_OK cfg1 (node3 :: ul)). intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node3 :: ul) node1). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) cut (used_node' cfg1 (node3 :: ul) node2). intros. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node3 :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node4 :: node3 :: ul)). intro. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_cons with (node := node3). assumption. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) ul *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node3). (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@cons ad node3 ul) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node4). (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply BDDimpl_used_nodes_preserved. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H0. reflexivity. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) cfg2 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. assumption. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) (@snd BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDor cfg ul node1 node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: used_list_OK cfg1 ul *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDor cfg ul node1 node2)). apply BDDor_node_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) rewrite H. reflexivity. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). apply BDDor_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDiff_is_iff : bool_fun_eq (bool_fun_of_BDD (fst BDDiff) (snd BDDiff)) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDiff) (@snd BDDconfig ad BDDiff)) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) unfold BDDiff in |- *. elim (prod_sum _ _ (BDDor cfg ul node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDor cfg ul node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg1, node3) := BDDor cfg ul node1 node2 in let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg1 H. elim H. clear H. intros node3 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) elim (prod_sum _ _ (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDand cfg1 (@cons ad node3 ul) node1 node2) (@pair BDDconfig ad x b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (let (cfg2, node4) := BDDand cfg1 (@cons ad node3 ul) node1 node2 in BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) intros cfg2 H0. elim H0. clear H0. intros node4 H0. rewrite H0. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) cut (BDDconfig_OK cfg1). intro. cut (used_nodes_preserved cfg cfg1 ul). (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) intro. cut (used_list_OK cfg1 (node3 :: ul)). intro. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (node3 :: ul) node1). (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) cut (used_node' cfg1 (node3 :: ul) node2). intros. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (node3 :: ul)). intro. (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg2 (node4 :: node3 :: ul)). intro. cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDimpl cfg2 (node4 :: node3 :: ul) node3 node4)) (snd (BDDimpl cfg2 (node4 :: node3 :: ul) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (* Goal: forall _ : bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) (bool_fun_of_BDD cfg2 node4))). intro. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfg2 node3) (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) (bool_fun_of_BDD cfg2 node4)). assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))). (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_impl_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node4) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node3). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_bool_fun with (ul := node3 :: ul). assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDor cfg ul node1 node2)) (@snd BDDconfig ad (BDDor cfg ul node1 node2))) (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDor cfg ul node1 node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node4) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDor cfg ul node1 node2)). apply BDDor_is_or. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) rewrite H. reflexivity. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg1 node1) (bool_fun_of_BDD cfg1 node2)). (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) cfg2 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_is_and. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfg1 node1) (bool_fun_of_BDD cfg1 node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_and_preserves_eq. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_iff (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_impl (bool_fun_or (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2)) (bool_fun_and (bool_fun_of_BDD cfg node1) (bool_fun_of_BDD cfg node2))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4)) (@snd BDDconfig ad (BDDimpl cfg2 (@cons ad node4 (@cons ad node3 ul)) node3 node4))) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node4)) *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply bool_fun_iff_lemma. apply BDDimpl_is_impl. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite H0. reflexivity. assumption. apply used_node'_cons_node'_ul. (* Goal: used_node' cfg2 (@cons ad node4 (@cons ad node3 ul)) node4 *) (* Goal: used_list_OK cfg2 (@cons ad node4 (@cons ad node3 ul)) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply used_node'_cons_node_ul. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand cfg1 (@cons ad node3 ul) node1 node2)) cfg2 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. assumption. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H0. reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node2 *) (* Goal: used_node' cfg1 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node3 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDand cfg1 (node3 :: ul) node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq BDDconfig (@fst BDDconfig ad (@pair BDDconfig ad cfg1 node3)) cfg1 *) rewrite H0. reflexivity. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply node_OK_list_OK. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) (@snd BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDor cfg ul node1 node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) (* Goal: used_list_OK cfg1 ul *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDor cfg ul node1 node2)). apply BDDor_node_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) rewrite H. reflexivity. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. replace cfg1 with (fst (BDDor cfg ul node1 node2)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDor cfg ul node1 node2)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDor cfg ul node1 node2)) cfg1 *) replace cfg1 with (fst (BDDor cfg ul node1 node2)). apply BDDor_config_OK. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDiff_list_OK : used_list_OK (fst BDDiff) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDiff) ul *) exact BDDiff_used_nodes_preserved. Qed. Lemma BDDiff_list_OK_cons : used_list_OK (fst BDDiff) (snd BDDiff :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. apply BDDiff_node_OK. exact BDDiff_list_OK. Qed. End BDDiff_results. Section BDDvar_make_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable x : BDDvar. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Definition BDDvar_make := BDDmake gc cfg x BDDzero BDDone ul. Lemma BDDvar_make_config_OK : BDDconfig_OK (fst BDDvar_make). Proof. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) unfold BDDvar_make in |- *. apply BDDmake_keeps_config_OK. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used'_zero. apply used'_one. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_zero _ cfg_OK). intros. discriminate. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_one _ cfg_OK). intros. discriminate. Qed. Lemma BDDvar_make_node_OK : config_node_OK (fst BDDvar_make) (snd BDDvar_make). Proof. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) unfold BDDvar_make in |- *. apply BDDmake_node_OK. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used'_zero. apply used'_one. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_zero _ cfg_OK). intros. discriminate. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_one _ cfg_OK). intros. discriminate. Qed. Lemma BDDvar_make_used_nodes_preserved : used_nodes_preserved cfg (fst BDDvar_make) ul. Proof. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) unfold BDDvar_make in |- *. apply BDDmake_preserves_used_nodes. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. assumption. Qed. Lemma BDDvar_make_list_OK : used_list_OK (fst BDDvar_make) ul. Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) ul *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDvar_make) ul *) exact BDDvar_make_used_nodes_preserved. Qed. Lemma BDDvar_make_list_OK_cons : used_list_OK (fst BDDvar_make) (snd BDDvar_make :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad BDDvar_make) (@cons ad (@snd BDDconfig ad BDDvar_make) ul) *) apply node_OK_list_OK. exact BDDvar_make_node_OK. exact BDDvar_make_list_OK. Qed. Lemma BDDvar_make_is_var : bool_fun_eq (bool_fun_of_BDD (fst BDDvar_make) (snd BDDvar_make)) (bool_fun_var x). Proof. apply bool_fun_eq_trans with (bf2 := bool_fun_if x bool_fun_one bool_fun_zero). apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)). (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) unfold BDDvar_make in |- *. apply BDDmake_bool_fun. assumption. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) assumption. apply used'_zero. apply used'_one. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_zero _ cfg_OK). intros. discriminate. unfold bs_of_cfg in |- *. (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (@None (prod BDDvar (prod ad ad))) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfg BDDone) (bool_fun_of_BDD cfg BDDzero)) (bool_fun_if x bool_fun_one bool_fun_zero) *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) rewrite (config_OK_one _ cfg_OK). intros. discriminate. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply bool_fun_if_preserves_eq. apply bool_fun_of_BDD_one. assumption. (* Goal: BDDconfig_OK cfg *) (* Goal: bool_fun_eq (bool_fun_if x bool_fun_one bool_fun_zero) (bool_fun_var x) *) apply bool_fun_of_BDD_zero. assumption. apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_var x) (bool_fun_if x bool_fun_one bool_fun_zero) *) apply bool_fun_var_lemma. Qed. End BDDvar_make_results. End BDDop.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import neg. Require Import or. Require Import op. Section tauto. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Fixpoint BDDof_bool_expr (cfg : BDDconfig) (ul : list ad) (be : bool_expr) {struct be} : BDDconfig * ad := match be with | Zero => (cfg, BDDzero) | One => (cfg, BDDone) | Var x => BDDvar_make gc cfg ul x | Neg be1 => match BDDof_bool_expr cfg ul be1 with | (cfg1, node1) => BDDneg gc cfg1 (node1 :: ul) node1 end | Or be1 be2 => match BDDof_bool_expr cfg ul be1 with | (cfg1, node1) => match BDDof_bool_expr cfg1 (node1 :: ul) be2 with | (cfg2, node2) => BDDor gc cfg2 (node2 :: node1 :: ul) node1 node2 end end | ANd be1 be2 => match BDDof_bool_expr cfg ul be1 with | (cfg1, node1) => match BDDof_bool_expr cfg1 (node1 :: ul) be2 with | (cfg2, node2) => BDDand gc cfg2 (node2 :: node1 :: ul) node1 node2 end end | Impl be1 be2 => match BDDof_bool_expr cfg ul be1 with | (cfg1, node1) => match BDDof_bool_expr cfg1 (node1 :: ul) be2 with | (cfg2, node2) => BDDimpl gc cfg2 (node2 :: node1 :: ul) node1 node2 end end | Iff be1 be2 => match BDDof_bool_expr cfg ul be1 with | (cfg1, node1) => match BDDof_bool_expr cfg1 (node1 :: ul) be2 with | (cfg2, node2) => BDDiff gc cfg2 (node2 :: node1 :: ul) node1 node2 end end end. Lemma BDDof_bool_expr_correct : forall (be : bool_expr) (cfg : BDDconfig) (ul : list ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> BDDconfig_OK (fst (BDDof_bool_expr cfg ul be)) /\ used_nodes_preserved cfg (fst (BDDof_bool_expr cfg ul be)) ul /\ config_node_OK (fst (BDDof_bool_expr cfg ul be)) (snd (BDDof_bool_expr cfg ul be)) /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDof_bool_expr cfg ul be)) (snd (BDDof_bool_expr cfg ul be))) (bool_fun_of_bool_expr be). Proof. (* Goal: forall (be : bool_expr) (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul be))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul be)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul be)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul be))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul be)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul be))) (bool_fun_of_bool_expr be)))) *) simple induction be. intros. simpl in |- *. split. assumption. split. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_refl. split. apply zero_OK. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) apply bool_fun_of_BDD_zero. assumption. intros. simpl in |- *. split. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) split. apply used_nodes_preserved_refl. split. apply one_OK. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) apply bool_fun_of_BDD_one. assumption. intros. simpl in |- *. split. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDvar_make_config_OK. assumption. assumption. assumption. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDvar_make_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) split. apply BDDvar_make_node_OK. assumption. assumption. assumption. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) apply BDDvar_make_is_var. assumption. assumption. assumption. intros. (* Goal: forall (node : ad) (_ : @In ad node (@nil ad)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node *) simpl in |- *. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (_ : and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg ul b)). intros cfg1 H2. elim H2. (* Goal: forall (x : ad) (_ : @eq (prod BDDconfig ad) (BDDof_bool_expr cfg ul b) (@pair BDDconfig ad cfg1 x)), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in BDDneg gc cfg1 (@cons ad node1 ul) node1))) (bool_fun_neg (bool_fun_of_bool_expr b))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_of_bool_expr b0))))) (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0))) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Or b b0)))) (bool_fun_of_bool_expr (Or b b0))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_of_bool_expr b0))))) (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0))) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (ANd b b0)))) (bool_fun_of_bool_expr (ANd b b0))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_of_bool_expr b0))))) (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0))) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Impl b b0)))) (bool_fun_of_bool_expr (Impl b b0))))) *) (* Goal: forall (b : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b))))) (b0 : bool_expr) (_ : forall (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b0))) (bool_fun_of_bool_expr b0))))) (cfg : BDDconfig) (ul : list ad) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0)))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0))) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0)))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0))) (@snd BDDconfig ad (BDDof_bool_expr cfg ul (Iff b b0)))) (bool_fun_of_bool_expr (Iff b b0))))) *) clear H2. intros node1 H2. rewrite H2. elim (H cfg ul H0 H1). clear H. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) rewrite H2. simpl in |- *. intros. elim H3; clear H3; intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H4; clear H4; intros. cut (used_list_OK cfg1 (node1 :: ul)). intro. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) cut (used_node' cfg1 (node1 :: ul) node1). intro. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDneg_config_OK. assumption. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) split. apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_nodes_preserved_cons with (node := node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. split. apply BDDneg_node_OK. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg1 node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDneg_is_neg. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply bool_fun_neg_preserves_eq. assumption. apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply node_OK_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) intros. simpl in |- *. elim (H cfg ul H1 H2). clear H. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (_ : and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg ul b)). intros cfg1 H3. elim H3. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) clear H3. intros node1 H3. rewrite H3. simpl in |- *. intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg1 ul *) cut (used_list_OK cfg1 ul). intro. cut (used_list_OK cfg1 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_node' cfg1 (node1 :: ul) node1). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (H0 cfg1 (node1 :: ul) H H8). clear H0. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (prod_sum _ _ (BDDof_bool_expr cfg1 (node1 :: ul) b0)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0) (@pair BDDconfig ad x b))) (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) intros cfg2 H10. elim H10. clear H10. intros node2 H10. rewrite H10. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) simpl in |- *. intros. elim H11; clear H11; intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H12; clear H12; intros. cut (used_list_OK cfg2 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_list_OK cfg2 (node2 :: node1 :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) cut (used_node' cfg2 (node2 :: node1 :: ul) node2). (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) cut (used_node' cfg2 (node2 :: node1 :: ul) node1). intros. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDor_config_OK. assumption. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. split. apply used_nodes_preserved_trans with (cfg2 := cfg1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_cons with (node := node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. assumption. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@cons ad node1 ul) *) (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_nodes_preserved_cons with (node := node2). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDor_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. split. apply BDDor_node_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_of_BDD cfg2 node1) (bool_fun_of_BDD cfg2 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDor_is_or. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply bool_fun_or_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node1) (bool_fun_of_bool_expr b) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_of_bool_expr b0) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved'_bool_fun with (ul := node1 :: ul). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) intros. simpl in |- *. elim (H cfg ul H1 H2). clear H. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (_ : and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg ul b)). intros cfg1 H3. elim H3. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) clear H3. intros node1 H3. rewrite H3. simpl in |- *. intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg1 ul *) cut (used_list_OK cfg1 ul). intro. cut (used_list_OK cfg1 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_node' cfg1 (node1 :: ul) node1). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (H0 cfg1 (node1 :: ul) H H8). clear H0. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (prod_sum _ _ (BDDof_bool_expr cfg1 (node1 :: ul) b0)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0) (@pair BDDconfig ad x b))) (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) intros cfg2 H10. elim H10. clear H10. intros node2 H10. rewrite H10. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) simpl in |- *. intros. elim H11; clear H11; intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H12; clear H12; intros. cut (used_list_OK cfg2 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_list_OK cfg2 (node2 :: node1 :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) cut (used_node' cfg2 (node2 :: node1 :: ul) node2). (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) cut (used_node' cfg2 (node2 :: node1 :: ul) node1). intros. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDand_config_OK. assumption. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. split. apply used_nodes_preserved_trans with (cfg2 := cfg1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_cons with (node := node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. assumption. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@cons ad node1 ul) *) (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_nodes_preserved_cons with (node := node2). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDand_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. split. apply BDDand_node_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfg2 node1) (bool_fun_of_BDD cfg2 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDand_is_and. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply bool_fun_and_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node1) (bool_fun_of_bool_expr b) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_of_bool_expr b0) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved'_bool_fun with (ul := node1 :: ul). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) intros. simpl in |- *. elim (H cfg ul H1 H2). clear H. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (_ : and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg ul b)). intros cfg1 H3. elim H3. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) clear H3. intros node1 H3. rewrite H3. simpl in |- *. intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg1 ul *) cut (used_list_OK cfg1 ul). intro. cut (used_list_OK cfg1 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_node' cfg1 (node1 :: ul) node1). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (H0 cfg1 (node1 :: ul) H H8). clear H0. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (prod_sum _ _ (BDDof_bool_expr cfg1 (node1 :: ul) b0)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0) (@pair BDDconfig ad x b))) (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) intros cfg2 H10. elim H10. clear H10. intros node2 H10. rewrite H10. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) simpl in |- *. intros. elim H11; clear H11; intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H12; clear H12; intros. cut (used_list_OK cfg2 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_list_OK cfg2 (node2 :: node1 :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) cut (used_node' cfg2 (node2 :: node1 :: ul) node2). (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) cut (used_node' cfg2 (node2 :: node1 :: ul) node1). intros. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDimpl_config_OK. assumption. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. split. apply used_nodes_preserved_trans with (cfg2 := cfg1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_cons with (node := node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. assumption. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@cons ad node1 ul) *) (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_nodes_preserved_cons with (node := node2). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDimpl_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. split. apply BDDimpl_node_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfg2 node1) (bool_fun_of_BDD cfg2 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDimpl_is_impl. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply bool_fun_impl_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node1) (bool_fun_of_bool_expr b) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_of_bool_expr b0) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved'_bool_fun with (ul := node1 :: ul). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) intros. simpl in |- *. elim (H cfg ul H1 H2). clear H. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b))) (_ : and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg ul b)) (@snd BDDconfig ad (BDDof_bool_expr cfg ul b))) (bool_fun_of_bool_expr b)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg1, node1) := BDDof_bool_expr cfg ul b in let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) elim (prod_sum _ _ (BDDof_bool_expr cfg ul b)). intros cfg1 H3. elim H3. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) clear H3. intros node1 H3. rewrite H3. simpl in |- *. intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H4; clear H4; intros. elim H5; clear H5; intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg1 ul *) cut (used_list_OK cfg1 ul). intro. cut (used_list_OK cfg1 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_node' cfg1 (node1 :: ul) node1). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (H0 cfg1 (node1 :: ul) H H8). clear H0. (* Goal: forall (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) elim (prod_sum _ _ (BDDof_bool_expr cfg1 (node1 :: ul) b0)). (* Goal: forall (x : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0) (@pair BDDconfig ad x b))) (_ : BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (_ : and (used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@cons ad node1 ul)) (and (config_node_OK (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0)) (@snd BDDconfig ad (BDDof_bool_expr cfg1 (@cons ad node1 ul) b0))) (bool_fun_of_bool_expr b0)))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDof_bool_expr cfg1 (@cons ad node1 ul) b0 in BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) intros cfg2 H10. elim H10. clear H10. intros node2 H10. rewrite H10. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) simpl in |- *. intros. elim H11; clear H11; intros. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) elim H12; clear H12; intros. cut (used_list_OK cfg2 (node1 :: ul)). (* Goal: forall _ : bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be), @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. cut (used_list_OK cfg2 (node2 :: node1 :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) ul) (and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))))) *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) cut (used_node' cfg2 (node2 :: node1 :: ul) node2). (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) cut (used_node' cfg2 (node2 :: node1 :: ul) node1). intros. split. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDiff_config_OK. assumption. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. split. apply used_nodes_preserved_trans with (cfg2 := cfg1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_cons with (node := node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. assumption. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@cons ad node1 ul) *) (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2)) (@snd BDDconfig ad (BDDiff gc cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 node2))) (bool_fun_iff (bool_fun_of_bool_expr b) (bool_fun_of_bool_expr b0))) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_nodes_preserved_cons with (node := node2). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDiff_used_nodes_preserved. assumption. assumption. assumption. (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. split. apply BDDiff_node_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_iff (bool_fun_of_BDD cfg2 node1) (bool_fun_of_BDD cfg2 node2)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDiff_is_iff. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply bool_fun_iff_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node1) (bool_fun_of_bool_expr b) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_of_bool_expr b0) *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node1 *) (* Goal: used_node' cfg2 (@cons ad node2 (@cons ad node1 ul)) node2 *) (* Goal: used_list_OK cfg2 (@cons ad node2 (@cons ad node1 ul)) *) (* Goal: used_list_OK cfg2 (@cons ad node1 ul) *) (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg1 node1). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_nodes_preserved'_bool_fun with (ul := node1 :: ul). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: used_node' cfg1 (@cons ad node1 ul) node1 *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_list_OK cfg1 ul *) apply used_node'_cons_node'_ul. apply used_node'_cons_node_ul. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg1). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) assumption. assumption. Qed. Lemma init_list_OK : forall cfg : BDDconfig, used_list_OK cfg nil. Proof. (* Goal: forall (node : ad) (_ : @In ad node (@nil ad)), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node *) intro. unfold used_list_OK in |- *. unfold used_list_OK_bs in |- *. simpl in |- *. tauto. Qed. Definition is_tauto (be : bool_expr) := Neqb BDDone (snd (BDDof_bool_expr initBDDconfig nil be)). Lemma is_tauto_lemma : forall be : bool_expr, is_tauto be = true <-> bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be). Proof. (* Goal: forall be : bool_expr, iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) unfold is_tauto in |- *. intros. cut (bool_fun_eq (bool_fun_of_BDD (fst (BDDof_bool_expr initBDDconfig nil be)) (snd (BDDof_bool_expr initBDDconfig nil be))) (bool_fun_of_bool_expr be)). (* Goal: iff (@eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true) (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) intro. split. intro. rewrite <- (Neqb_complete _ _ H0) in H. apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD (fst (BDDof_bool_expr initBDDconfig nil be)) BDDone). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone) bool_fun_one *) (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_one. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) *) (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) refine (proj1 (BDDof_bool_expr_correct _ _ _ _ _)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply initBDDconfig_OK. apply init_list_OK. assumption. intro. (* Goal: @eq bool (N.eqb BDDone (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply BDDunique with (cfg := fst (BDDof_bool_expr initBDDconfig nil be)). (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) *) (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) refine (proj1 (BDDof_bool_expr_correct _ _ _ _ _)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone *) (* Goal: config_node_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply initBDDconfig_OK. apply init_list_OK. apply one_OK. (* Goal: config_node_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) refine (proj1 (proj2 (proj2 (BDDof_bool_expr_correct _ _ _ _ _)))). (* Goal: BDDconfig_OK initBDDconfig *) (* Goal: used_list_OK initBDDconfig (@nil ad) *) apply initBDDconfig_OK. apply init_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_bool_expr be). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) BDDone) bool_fun_one *) (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply bool_fun_eq_trans with (bf2 := bool_fun_one). apply bool_fun_of_BDD_one. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) *) (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be) (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) refine (proj1 (BDDof_bool_expr_correct _ _ _ _ _)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply initBDDconfig_OK. apply init_list_OK. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) apply bool_fun_eq_sym. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be)) (@snd BDDconfig ad (BDDof_bool_expr initBDDconfig (@nil ad) be))) (bool_fun_of_bool_expr be) *) refine (proj2 (proj2 (proj2 (BDDof_bool_expr_correct _ _ _ _ _)))). (* Goal: BDDconfig_OK initBDDconfig *) (* Goal: used_list_OK initBDDconfig (@nil ad) *) apply initBDDconfig_OK. apply init_list_OK. Qed. (* Goal: forall (node : ad) (_ : False), node_OK (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node *) End tauto.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Compare. Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Allmaps. Require Import List. Section BDDmisc. Definition BDDvar := ad. Definition BDDcompare (x y : BDDvar) := match x, y with | N0, N0 => Datatypes.Eq | N0, Npos _ => Datatypes.Lt | Npos _, N0 => Datatypes.Gt | Npos p1, Npos p2 => Pcompare p1 p2 Datatypes.Eq end. Definition ad_S (a : ad) := match a with | N0 => Npos 1 | Npos p => Npos (Psucc p) end. Definition max (m n : nat) := if leb m n then n else m. Definition BDDvar_max (x y : BDDvar) := if Nleb x y then y else x. Inductive no_dup_list (A : Set) : list A -> Prop := | no_dup_nil : no_dup_list A nil | no_dup_cons : forall (a : A) (l : list A), ~ In a l -> no_dup_list _ l -> no_dup_list _ (a :: l). Lemma ad_S_is_S : forall a : ad, nat_of_N (ad_S a) = S (nat_of_N a). Proof. (* Goal: forall a : ad, @eq nat (N.to_nat (ad_S a)) (S (N.to_nat a)) *) simple induction a. reflexivity. simpl in |- *. unfold nat_of_P in |- *. intro. (* Goal: @eq nat (Pos.iter_op nat Init.Nat.add (Pos.succ p) (S O)) (S (Pos.iter_op nat Init.Nat.add p (S O))) *) exact (Pmult_nat_succ_morphism p 1). Qed. Lemma relation_sum : forall r : Datatypes.comparison, {r = Datatypes.Eq} + {r = Datatypes.Lt} + {r = Datatypes.Gt}. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro. elim r. left; left; reflexivity. left; right; reflexivity. right; reflexivity. Qed. Lemma BDD_EGAL_complete : forall x y : BDDvar, BDDcompare x y = Datatypes.Eq -> x = y. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) double induction x y. reflexivity. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros; discriminate. simpl in |- *. intros. cut (p0 = p). intro. rewrite H0; reflexivity. (* Goal: @eq positive p0 p *) apply Pcompare_Eq_eq. assumption. Qed. Lemma BDDcompare_lt : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> nat_of_N x < nat_of_N y. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) double induction x y. simpl in |- *. intro. discriminate. simpl in |- *. intros. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) cut (exists h : nat, nat_of_P p = S h). intro. inversion H0. rewrite H1. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) apply lt_O_Sn. apply ZL4. simpl in |- *. intros. discriminate. simpl in |- *. intros. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply nat_of_P_lt_Lt_compare_morphism. assumption. Qed. Lemma BDDlt_compare : forall x y : BDDvar, nat_of_N x < nat_of_N y -> BDDcompare x y = Datatypes.Lt. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) double induction x y. simpl in |- *. intro. absurd (0 < 0). apply lt_n_O. assumption. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) simpl in |- *. reflexivity. simpl in |- *. intro. cut (exists h : nat, nat_of_P p = S h). intro. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) inversion H. rewrite H0. intro. absurd (S x0 < 0). apply lt_n_O. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) assumption. apply ZL4. simpl in |- *. intro. intros. apply nat_of_P_lt_Lt_compare_complement_morphism. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. Qed. Lemma BDDcompare_trans : forall x y z : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare y z = Datatypes.Lt -> BDDcompare x z = Datatypes.Lt. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) double induction x y. simpl in |- *. intros. discriminate H. simpl in |- *. intro. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) simple induction z. intros. discriminate H0. trivial. simpl in |- *. intros. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) discriminate H. intro. intro. simple induction z. simpl in |- *. trivial. intro. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) simpl in |- *. intros. cut (nat_of_P p0 < nat_of_P p). (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) cut (nat_of_P p < nat_of_P p1). intros. apply nat_of_P_lt_Lt_compare_complement_morphism. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply lt_trans with (m := nat_of_P p). assumption. assumption. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply nat_of_P_lt_Lt_compare_morphism. assumption. apply nat_of_P_lt_Lt_compare_morphism. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. Qed. Lemma BDDcompare_sup_inf : forall x y : BDDvar, BDDcompare x y = Datatypes.Gt -> BDDcompare y x = Datatypes.Lt. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) double induction x y. simpl in |- *. intro; discriminate. simpl in |- *. intro. intro; discriminate. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) simpl in |- *. reflexivity. unfold BDDcompare in |- *. intros. apply ZC1. assumption. Qed. Lemma lt_trans_1 : forall x y z : nat, x < y -> y < S z -> x < z. Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) intros. unfold lt in H0. unfold lt in H. unfold lt in |- *. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply le_trans with (m := y). assumption. apply le_S_n. assumption. Qed. Lemma BDDcompare_1 : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare (ad_S x) y = Datatypes.Lt \/ ad_S x = y. Proof. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) intros. elim (relation_sum (BDDcompare (ad_S x) y)). intro H0. elim H0; intro. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) right. apply BDD_EGAL_complete. assumption. left; assumption. intro. (* Goal: or (@eq comparison (BDDcompare (ad_S x) y) Lt) (@eq N (ad_S x) y) *) absurd (nat_of_N x < nat_of_N x). apply lt_irrefl. apply lt_trans_1 with (y := nat_of_N y). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply BDDcompare_lt. assumption. rewrite <- (ad_S_is_S x). apply BDDcompare_lt. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply BDDcompare_sup_inf. assumption. Qed. Lemma andb3_lemma : forall b1 b2 b3 : bool, b1 && (b2 && b3) = true -> b1 = true /\ b2 = true /\ b3 = true. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) intros b1 b2 b3. elim b1. simpl in |- *. elim b2. simpl in |- *. auto. simpl in |- *. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) intro; discriminate H. simpl in |- *. intro; discriminate H. Qed. Lemma andb3_lemma_1 : forall x x0 y y0 z z0 : ad, (x, (y, z)) <> (x0, (y0, z0)) -> Neqb x x0 && (Neqb y y0 && Neqb z z0) = false. Proof. (* Goal: forall _ : @eq bool (N.eqb x x0) false, @eq bool (andb (N.eqb x x0) (andb (N.eqb y y0) (N.eqb z z0))) false *) intros x x0 y y0 z z0 H. elim (sumbool_of_bool (Neqb x x0)). intro H0. (* Goal: @eq bool (andb (N.eqb x x0) (andb (N.eqb y y0) (N.eqb z z0))) false *) (* Goal: forall _ : @eq bool (N.eqb x x0) false, @eq bool (andb (N.eqb x x0) (andb (N.eqb y y0) (N.eqb z z0))) false *) elim (sumbool_of_bool (Neqb y y0)). intro H1. elim (sumbool_of_bool (Neqb z z0)). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro H2. absurd ((x, (y, z)) = (x0, (y0, z0))). assumption. rewrite (Neqb_complete _ _ H0). (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) rewrite (Neqb_complete _ _ H1). rewrite (Neqb_complete _ _ H2). reflexivity. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro H2. rewrite H0. rewrite H1. rewrite H2. reflexivity. intro H1. rewrite H0. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) rewrite H1. reflexivity. intro H0. rewrite H0. reflexivity. Qed. Lemma ad_S_le_then_neq : forall x y : ad, Nleb (ad_S x) y = true -> Neqb x y = false. Proof. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) intros. cut (Neqb x y = true \/ Neqb x y = false). intro. elim H0. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) clear H0. intro. cut (x = y). intro. rewrite H1 in H. unfold Nleb in H. (* Goal: @eq bool (N.eqb x y) false *) (* Goal: @eq ad x y *) (* Goal: forall _ : @eq bool (N.eqb x y) false, @eq bool (N.eqb x y) false *) (* Goal: or (@eq bool (N.eqb x y) true) (@eq bool (N.eqb x y) false) *) rewrite (ad_S_is_S y) in H. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) cut (leb (S (nat_of_N y)) (nat_of_N y) = false). rewrite H. intro. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) discriminate H2. cut (nat_of_N y < S (nat_of_N y)). intro. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply leb_correct_conv. assumption. unfold lt in |- *. trivial. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply Neqb_complete. assumption. trivial. elim (Neqb x y). auto. auto. Qed. Lemma BDD_EGAL_correct : forall x : BDDvar, BDDcompare x x = Datatypes.Eq. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) simple induction x. reflexivity. simpl in |- *. intros. apply Pcompare_refl. Qed. Lemma BDDcompare_inf_sup : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDcompare y x = Datatypes.Gt. Proof. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) double induction x y. simpl in |- *. intro; discriminate. simpl in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro; reflexivity. simpl in |- *. intros; discriminate. simpl in |- *. intros. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply ZC2. assumption. Qed. Lemma ad_S_compare : forall x y : ad, BDDcompare x y = BDDcompare (ad_S x) (ad_S y). Proof. (* Goal: forall x y : BDDvar, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) intros x y. elim (relation_sum (BDDcompare x y)). intro y0. elim y0; clear y0; intro y0. (* Goal: @eq comparison (BDDcompare x y) (BDDcompare (ad_S x) (ad_S y)) *) (* Goal: @eq comparison (BDDcompare x y) (BDDcompare (ad_S x) (ad_S y)) *) (* Goal: forall _ : @eq comparison (BDDcompare x y) Gt, @eq comparison (BDDcompare x y) (BDDcompare (ad_S x) (ad_S y)) *) rewrite (BDD_EGAL_complete x y y0). rewrite (BDD_EGAL_correct y). (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) rewrite (BDD_EGAL_correct (ad_S y)). reflexivity. rewrite y0. symmetry in |- *. (* Goal: @eq comparison (BDDcompare (ad_S y) (ad_S x)) Lt *) apply BDDlt_compare. rewrite (ad_S_is_S x). rewrite (ad_S_is_S y). (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) apply lt_n_S. apply BDDcompare_lt. assumption. intro y0. simpl in |- *. simpl in |- *. (* Goal: forall p : positive, @eq bool (N.eqb (ad_S (Npos p)) N0) false *) simpl in |- *. rewrite y0. symmetry in |- *. apply BDDcompare_inf_sup. apply BDDlt_compare. (* Goal: lt (N.to_nat x) (N.to_nat y) *) rewrite (ad_S_is_S x). rewrite (ad_S_is_S y). apply lt_n_S. apply BDDcompare_lt. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply BDDcompare_sup_inf. assumption. Qed. Lemma prod_sum : forall (A B : Set) (p : A * B), exists a : A, (exists b : B, p = (a, b)). Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros A B p. elim p. intros y y0. split with y. split with y0. reflexivity. Qed. Lemma lt_max_1_2 : forall x1 y1 x2 y2 : nat, x1 < x2 -> y1 < y2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 y2) (_ : lt y1 y2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (sumbool_of_bool (leb x2 y2)). (* Goal: forall _ : @eq bool (Nat.leb x2 y2) false, lt x1 (if Nat.leb x2 y2 then y2 else x2) *) intro y. rewrite y. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) elim (leb x1 y1). assumption. apply lt_le_trans with (m := x2). assumption. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply leb_complete. assumption. intro y. rewrite y. elim (leb x1 y1). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply lt_trans with (m := y2). assumption. apply leb_complete_conv. assumption. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. Qed. Lemma lt_max_1 : forall x1 y1 x2 y2 : nat, x1 < x2 -> y1 < x2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 y2) (_ : lt y1 y2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (leb x1 y1). (* Goal: lt x1 (if Nat.leb x2 y2 then y2 else x2) *) elim (sumbool_of_bool (leb x2 y2)); intro y; rewrite y. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply lt_le_trans with (m := x2). assumption. apply leb_complete; assumption. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. elim (sumbool_of_bool (leb x2 y2)). intro y. rewrite y. apply lt_le_trans with (m := x2). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. apply leb_complete; assumption. intro y; rewrite y. assumption. Qed. Lemma lt_max_2 : forall x1 y1 x2 y2 : nat, x1 < y2 -> y1 < y2 -> max x1 y1 < max x2 y2. Proof. (* Goal: forall (x1 y1 x2 y2 : nat) (_ : lt x1 y2) (_ : lt y1 y2), lt (max x1 y1) (max x2 y2) *) intros x1 y1 x2 y2 H H0. unfold max in |- *. elim (leb x1 y1). elim (sumbool_of_bool (leb x2 y2)). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro y. rewrite y. assumption. intro y. rewrite y. apply lt_trans with (m := y2). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. apply leb_complete_conv. assumption. elim (sumbool_of_bool (leb x2 y2)). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro y. rewrite y. assumption. intro y. rewrite y. apply lt_trans with (m := y2). (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. apply leb_complete_conv. assumption. Qed. Lemma max_x_x_eq_x : forall x : nat, max x x = x. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) unfold max in |- *. intro. elim (leb x x). reflexivity. reflexivity. Qed. Lemma BDDvar_le_max_2 : forall x y : BDDvar, Nleb x (BDDvar_max y x) = true. Proof. (* Goal: forall x y : BDDvar, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) unfold BDDvar_max in |- *. intros x y. elim (sumbool_of_bool (Nleb y x)). (* Goal: forall _ : @eq bool (Nleb x y) false, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) intro y0. rewrite y0. apply Nleb_refl. intro y0. rewrite y0. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply Nltb_leb_weak. assumption. Qed. Lemma BDDvar_max_max : forall x y : BDDvar, nat_of_N (BDDvar_max x y) = max (nat_of_N x) (nat_of_N y). Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) unfold BDDvar_max, max in |- *. intros. unfold Nleb in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) elim (leb (nat_of_N x) (nat_of_N y)). reflexivity. reflexivity. Qed. Lemma BDDvar_le_max_1 : forall x y : BDDvar, Nleb x (BDDvar_max x y) = true. Proof. (* Goal: forall x y : BDDvar, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) intros x y. elim (sumbool_of_bool (Nleb x y)); unfold BDDvar_max in |- *. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intro y0. rewrite y0. assumption. intro y0. rewrite y0. apply Nleb_refl. Qed. Lemma BDDvar_max_inf : forall x y : BDDvar, BDDcompare x y = Datatypes.Lt -> BDDvar_max x y = y. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros. unfold BDDvar_max in |- *. replace (Nleb x y) with true. reflexivity. (* Goal: @eq bool (Nleb (ad_S b) a) true *) symmetry in |- *. unfold Nleb in |- *. apply leb_correct. apply lt_le_weak. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply BDDcompare_lt. assumption. Qed. Lemma BDDvar_max_comm : forall x y : BDDvar, BDDvar_max x y = BDDvar_max y x. Proof. (* Goal: forall x y : BDDvar, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) unfold BDDvar_max in |- *. intros x y. elim (sumbool_of_bool (Nleb x y)). (* Goal: forall _ : @eq bool (Nleb x y) false, @eq BDDvar (if Nleb x y then y else x) (if Nleb y x then x else y) *) intro y0. rewrite y0. elim (sumbool_of_bool (Nleb y x)). intro y1. rewrite y1. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply Nleb_antisym. assumption. assumption. intro y1. rewrite y1. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) reflexivity. intro y0. rewrite y0. elim (sumbool_of_bool (Nleb y x)). intro y1. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) rewrite y1. reflexivity. intro y1. rewrite y1. apply Nleb_antisym. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply Nltb_leb_weak. assumption. apply Nltb_leb_weak. assumption. Qed. Lemma nat_gt_1_lemma : forall n : nat, n <> 0 -> n <> 1 -> 2 <= n. Proof. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) intros. cut (1 <= n). intro. elim (le_le_S_eq _ _ H1). tauto. intro. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) absurd (n = 1). assumption. symmetry in |- *. assumption. fold (0 < n) in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply neq_O_lt. unfold not in |- *. intro. apply H. rewrite H1; reflexivity. Qed. Lemma ad_gt_1_lemma : forall x : ad, x <> N0 -> x <> Npos 1 -> Nleb (Npos 2) x = true. Proof. (* Goal: @eq bool (Nat.leb (Pos.to_nat (xO xH)) (N.to_nat x)) true *) intros. unfold Nleb in |- *. unfold nat_of_N at 1 in |- *. unfold nat_of_P in |- *. (* Goal: @eq bool (Nat.leb (S (N.to_nat b)) (N.to_nat a)) true *) unfold Pos.iter_op in |- *. unfold plus in |- *. apply leb_correct. (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) apply nat_gt_1_lemma. unfold not in |- *. intro. apply H. (* Goal: @eq ad x N0 *) (* Goal: not (@eq nat (N.to_nat x) (S O)) *) replace N0 with (N_of_nat 0). rewrite <- H1. symmetry in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply N_of_nat_of_N. reflexivity. unfold not in |- *. intro. apply H0. (* Goal: @eq ad x (N.of_nat (S O)) *) (* Goal: @eq N (N.of_nat (S O)) (Npos xH) *) replace (Npos 1) with (N_of_nat 1). rewrite <- H1. symmetry in |- *. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply N_of_nat_of_N. reflexivity. Qed. Lemma Nltb_lebmma : forall a b : ad, Nleb a b = false -> Nleb (ad_S b) a = true. Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) intros. unfold Nleb in |- *. rewrite (ad_S_is_S b). apply leb_correct. (* Goal: lt (N.to_nat b) (N.to_nat a) *) fold (nat_of_N b < nat_of_N a) in |- *. apply leb_complete_conv. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) assumption. Qed. Lemma eq_ad_S_eq : forall a b : ad, Neqb (ad_S a) (ad_S b) = true -> Neqb a b = true. Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) intros. cut (ad_S a = ad_S b). rewrite <- (N_of_nat_of_N (ad_S a)). (* Goal: forall _ : @eq N (N.of_nat (N.to_nat (ad_S a))) (ad_S b), @eq bool (N.eqb a b) true *) (* Goal: @eq N (ad_S a) (ad_S b) *) rewrite <- (N_of_nat_of_N (ad_S b)). rewrite (ad_S_is_S a). (* Goal: forall _ : @eq nat (N.to_nat a) (N.to_nat b), @eq bool (N.eqb a b) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) rewrite (ad_S_is_S b). intro. cut (nat_of_N a = nat_of_N b). intro. (* Goal: @eq bool (N.eqb (N.of_nat (N.to_nat a)) (N.of_nat (N.to_nat b))) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) rewrite <- (N_of_nat_of_N a). rewrite <- (N_of_nat_of_N b). rewrite H1. (* Goal: @eq bool (N.eqb (N.of_nat (N.to_nat b)) (N.of_nat (N.to_nat b))) true *) (* Goal: @eq nat (N.to_nat a) (N.to_nat b) *) (* Goal: @eq N (ad_S a) (ad_S b) *) apply Neqb_correct. apply eq_add_S. (* Goal: @eq nat (N.to_nat (N.of_nat (S (N.to_nat a)))) (S (N.to_nat b)) *) (* Goal: @eq N (ad_S a) (ad_S b) *) rewrite <- (nat_of_N_of_nat (S (nat_of_N a))). rewrite H0. (* Goal: no_dup_list A l0 *) (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) apply nat_of_N_of_nat. apply Neqb_complete. assumption. Qed. Lemma ad_S_neq_N0 : forall a : ad, Neqb (ad_S a) N0 = false. Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros. elim a. reflexivity. simpl in |- *. reflexivity. Qed. Lemma list_sum : forall (A : Set) (l : list A), l = nil \/ (exists a : A, (exists l' : list A, l = a :: l')). Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros. elim l. left; reflexivity. intros. right. split with a. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) split with l0. reflexivity. Qed. Lemma no_dup_sum : forall (A : Set) (l : list A) (H : no_dup_list _ l), l = nil \/ (exists a : A, (exists l0 : list A, ~ In a l0 /\ no_dup_list _ l0 /\ l = a :: l0)). Proof. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) intros. elim H. left; reflexivity. intros. right. split with a. (* Goal: @eq (list A) (@cons A a l0) (@cons A a l0) *) split with l0. split. assumption. split. assumption. reflexivity. Qed. Lemma no_dup_cons_no_dup : forall (A : Set) (l : list A) (a : A), no_dup_list _ (a :: l) -> no_dup_list _ l. Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) intros. elim (no_dup_sum _ _ H). intro; discriminate. intros. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) elim H0; intros. elim H1; intros. elim H2; intros. elim H4; intros. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) injection H6. intros. rewrite H7; assumption. Qed. Lemma no_dup_cons_no_in : forall (A : Set) (l : list A) (a : A), no_dup_list _ (a :: l) -> ~ In a l. Proof. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) intros. elim (no_dup_sum _ _ H). intro; discriminate. intros. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) elim H0; intros. elim H1; intros. elim H2; intros. elim H4; intros. (* Goal: forall (_ : @eq (list A) l x0) (_ : @eq A a x), not (@In A a l) *) injection H6. intros. rewrite H7; rewrite H8; assumption. Qed. End BDDmisc.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import Relation_Definitions. Require Import List. Require Import misc. Section my_MapFold. Variable M : Set. Variable neutral : M. Variable op : M -> M -> M. Variable R : relation M. Definition F (A : Set) (f : ad -> A -> M) (r : ad * A) (m : M) := let (a, y) := r in op (f a y) m. Hypothesis eq_R : equiv _ R. Hypothesis op_assoc : forall a b c : M, R (op (op a b) c) (op a (op b c)). Hypothesis op_neutral_left : forall a : M, R (op neutral a) a. Hypothesis op_neutral_right : forall a : M, R (op a neutral) a. Hypothesis op_eq : forall a b a1 b1 : M, R a a1 -> R b b1 -> R (op a b) (op a1 b1). Lemma op_eq_2 : forall a b b1 : M, R b b1 -> R (op a b) (op a b1). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. apply op_eq. apply (proj1 eq_R). assumption. Qed. Lemma my_fold_right_aapp : forall (A : Set) (f : ad -> A -> M) (l l' : alist A), R (fold_right (F A f) neutral (aapp _ l l')) (op (fold_right (F A f) neutral l) (fold_right (F A f) neutral l')). Proof. (* Goal: forall (A B : Set) (f : forall (_ : ad) (_ : A), Map B) (l : alist A) (_ : f_OK A B f) (_ : no_dup_alist A l) (a : ad) (y : B), iff (@eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l) a) (@Some B y)) (@ex ad (fun a1 : ad => @ex A (fun y1 : A => and (@In (prod ad A) (@pair ad A a1 y1) l) (@eq (option B) (MapGet B (f a1 y1) a) (@Some B y))))) *) simple induction l. unfold F in |- *. simpl in |- *. intro. apply (proj2 (proj2 eq_R)). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) apply op_neutral_left. intros r l0 H1 l'. elim r. intros a y. simpl in |- *. apply (proj1 (proj2 eq_R)) with (y := op (f a y) (op (fold_right (F A f) neutral l0) (fold_right (F A f) neutral l'))). (* Goal: R (op (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0)) (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) (@fold_right M (prod ad A) (F A f) neutral (aapp A (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0) (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) *) apply op_eq_2. apply H1. apply (proj2 (proj2 eq_R)). apply op_assoc. Qed. Lemma myMapFold_as_fold_1 : forall (A : Set) (f : ad -> A -> M) (m : Map A) (pf : ad -> ad), R (MapFold1 _ M neutral op f pf m) (fold_right (fun (r : ad * A) (m : M) => let (a, y) := r in op (f a y) m) neutral (MapFold1 _ (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons _ (a, y) (anil _)) pf m)). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. trivial. intros. simpl in |- *. apply (proj1 eq_R). intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simpl in |- *. apply (proj2 (proj2 eq_R)). apply op_neutral_right. intros. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simpl in |- *. fold (F A f) in |- *. fold (F A f) in H. fold (F A f) in H0. apply (proj1 (proj2 eq_R)) with (y := op (fold_right (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (a, y) (anil A)) (fun a0 : ad => pf (Ndouble a0)) m0)) (fold_right (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (a, y) (anil A)) (fun a0 : ad => pf (Ndouble_plus_one a0)) m1))). (* Goal: R (op (MapFold1 A M neutral op f (fun a0 : ad => pf (N.double a0)) m0) (MapFold1 A M neutral op f (fun a0 : ad => pf (N.succ_double a0)) m1)) (op (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0)) (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) *) (* Goal: R (op (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0)) (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) (@fold_right M (prod ad A) (F A f) neutral (aapp A (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0) (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) *) apply op_eq. apply H. apply H0. apply (proj2 (proj2 eq_R)). (* Goal: R (@fold_right M (prod ad A) (F A f) neutral (aapp A (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0) (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) (op (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.double a0)) m0)) (@fold_right M (prod ad A) (F A f) neutral (MapFold1 A (alist A) (anil A) (aapp A) (fun (a : ad) (y : A) => acons A (@pair ad A a y) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1))) *) apply my_fold_right_aapp. Qed. Lemma myMapFold_as_fold : forall (A : Set) (f : ad -> A -> M) (m : Map A), R (MapFold _ M neutral op f m) (fold_right (fun (r : ad * A) (m : M) => let (a, y) := r in op (f a y) m) neutral (alist_of_Map _ m)). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. exact (myMapFold_as_fold_1 A f m (fun a0 : ad => a0)). Qed. End my_MapFold. (* Next we show the assumptions in the previous section are satisfied if M is a set of maps, neutral is the empty map, op is MapMerge and R is eqmap *) (* eqmap is an equivalence relation *) Lemma eqmap_equiv : forall A : Set, equiv _ (eqmap A). Proof. (* Goal: forall A : Set, equiv (Map A) (eqmap A) *) unfold equiv, eqmap in |- *. unfold reflexive, symmetric, transitive in |- *. split. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold eqm in |- *. reflexivity. split. unfold eqm in |- *. intros. rewrite H. apply H0. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold eqm in |- *. intros. rewrite (H a). reflexivity. Qed. (* MapMerge is associative *) Lemma MapMerge_assoc : forall (A : Set) (a b c : Map A), eqmap _ (MapMerge _ (MapMerge _ a b) c) (MapMerge _ a (MapMerge _ b c)). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold eqmap in |- *. unfold eqm in |- *. intros. rewrite (MapMerge_semantics A (MapMerge A a b) c a0). (* Goal: @eq (option A) match MapGet A c a0 with | Some y' => @Some A y' | None => MapGet A (MapMerge A a b) a0 end (MapGet A (MapMerge A a (MapMerge A b c)) a0) *) rewrite (MapMerge_semantics A a (MapMerge A b c) a0). rewrite (MapMerge_semantics A a b a0). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite (MapMerge_semantics A b c a0). elim (MapGet A c a0). reflexivity. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. Qed. (* M0 is the left identity *) Lemma MapMerge_neutral_left : forall (A : Set) (m : Map A), eqmap _ (MapMerge _ (M0 A) m) m. Proof. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) unfold eqmap, eqm, MapMerge in |- *. reflexivity. Qed. (* M0 is the right identity *) Lemma MapMerge_neutral_right : forall (A : Set) (m : Map A), eqmap _ (MapMerge _ m (M0 _)) m. Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold eqmap in |- *. unfold eqm in |- *. unfold MapMerge in |- *. intros. elim m. reflexivity. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. reflexivity. Qed. (* MapMerge preserves the eqmap relation *) Lemma MapMerge_eq : forall (A : Set) (a a1 b b1 : Map A), eqmap _ a a1 -> eqmap _ b b1 -> eqmap _ (MapMerge _ a b) (MapMerge _ a1 b1). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold eqmap in |- *. unfold eqm in |- *. intros. rewrite (MapMerge_semantics A a b a0). (* Goal: @eq (option A) match MapGet A b a0 with | Some y' => @Some A y' | None => MapGet A a a0 end (MapGet A (MapMerge A a1 b1) a0) *) rewrite (MapMerge_semantics A a1 b1 a0). rewrite (H a0). rewrite (H0 a0). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. Qed. (* The net result : a semantics for MapCollect in terms of lists *) Lemma myMapFold_as_fold_2 : forall (A B : Set) (f : ad -> A -> Map B) (m : Map A), eqmap _ (MapFold _ (Map B) (M0 _) (MapMerge _) f m) (fold_right (fun (r : ad * A) (m : Map B) => let (a, y) := r in MapMerge _ (f a y) m) (M0 _) (alist_of_Map _ m)). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. apply myMapFold_as_fold. exact (eqmap_equiv B). intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply MapMerge_assoc. intros. apply MapMerge_neutral_left. intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply MapMerge_neutral_right. intros. apply MapMerge_eq. assumption. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. Qed. Lemma my_alist_of_map_lemma_1 : forall (A : Set) (m : Map A) (a : ad) (y : A), MapGet _ m a = Some y -> In (a, y) (alist_of_Map _ m). Proof. (* Goal: forall (A : Set) (m : Map A) (a : ad) (y : A) (_ : @eq (option A) (MapGet A m a) (@Some A y)), @In (prod ad A) (@pair ad A a y) (alist_of_Map A m) *) intros A m a y. rewrite (alist_of_Map_semantics _ m a). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) generalize (alist_of_Map A m). simple induction a0. simpl in |- *. intro; discriminate. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simpl in |- *. intro a1. elim a1. intros a2 b l H H0. elim (sumbool_of_bool (Neqb a2 a)). (* Goal: forall _ : @eq ad (pf a) a1, or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp a1) m') false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall _ : @In ad a1 l, or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp a1) m') false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m0 m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m0) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m m0) m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m m0)) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a))) *) intro H1. left. rewrite H1 in H0. injection H0; intro H2. rewrite H2. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite (Neqb_complete _ _ H1). reflexivity. intro H1. rewrite H1 in H0. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) right. apply H. assumption. Qed. Lemma my_alist_of_map_lemma_2 : forall (A : Set) (m : Map A) (pf fp : ad -> ad), (forall a : ad, fp (pf a) = a) -> forall (a : ad) (y : A), In (a, y) (MapFold1 _ _ (anil _) (aapp _) (fun (a : ad) (y : A) => acons _ (a, y) (anil _)) pf m) -> MapGet _ m (fp a) = Some y /\ pf (fp a) = a. Proof. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simple induction m. simpl in |- *. tauto. simpl in |- *. intros a a0 pf fp H a1 y H0. elim H0. intro H1. (* Goal: and (@eq bool (in_dom A (fp (pf a)) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp (pf a)) m') false) (@eq ad (pf (fp (pf a))) (pf a))) *) (* Goal: forall _ : @In ad a1 l, or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp a1) m') false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m0 m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m0) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m m0) m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m m0)) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a))) *) injection H1; intros H2 H3. rewrite <- H3. rewrite (H a). rewrite (Neqb_correct a). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite H2. split; reflexivity. tauto. intros m0 H m1 H0 pf fp H1 a y H2. simpl in H2. unfold aapp in H2. elim (in_app_or (MapFold1 A (list (ad * A)) (anil A) (app (A:=ad * A)) (fun (a0 : ad) (y0 : A) => acons A (a0, y0) (anil A)) (fun a0 : ad => pf (Ndouble a0)) m0) (MapFold1 A (list (ad * A)) (anil A) (app (A:=ad * A)) (fun (a0 : ad) (y0 : A) => acons A (a0, y0) (anil A)) (fun a0 : ad => pf (Ndouble_plus_one a0)) m1) (a, y) H2). (* Goal: forall _ : and (@eq bool (in_dom A (fp a1) (MapRemove A (M2 A m0 m1) a)) true) (@eq ad (pf (fp a1)) a1), or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a1) (M1 B a a0)) false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m) false) (@eq ad (pf (fp a)) a)))) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m2) false) (@eq ad (pf (fp a)) a)))) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2))), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m m2)) false) (@eq ad (pf (fp a)) a))) *) intro H3. fold (aapp A) in H3. rewrite (MapGet_M2_bit_0_if A m0 m1 (fp a)). (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble a))) = a). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intro H4. elim (H (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) H4 a y H3). (* Goal: forall (_ : @eq (option A) (MapGet A m1 (N.div2 (fp a))) (@Some A y)) (_ : @eq ad (pf (N.succ_double (N.div2 (fp a)))) a), and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intros H5 H6. elim (sumbool_of_bool (Nbit0 (fp a))). intro H7. (* Goal: and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a y) (MapFold1 A (list (prod ad A)) (anil A) (@app (prod ad A)) (fun (a0 : ad) (y0 : A) => acons A (@pair ad A a0 y0) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1), and (@eq (option A) (MapGet A (M2 A m0 m1) (fp a)) (@Some A y)) (@eq ad (pf (fp a)) a) *) cut (Neqb (Ndouble (Ndiv2 (fp a))) (fp a) = false). intro H8. (* Goal: and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: @eq bool (N.eqb (N.double (N.div2 (fp a))) (fp a)) false *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a y) (MapFold1 A (list (prod ad A)) (anil A) (@app (prod ad A)) (fun (a0 : ad) (y0 : A) => acons A (@pair ad A a0 y0) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1), and (@eq (option A) (MapGet A (M2 A m0 m1) (fp a)) (@Some A y)) (@eq ad (pf (fp a)) a) *) cut (fp (pf (Ndouble (Ndiv2 (fp a)))) = fp a). rewrite (H1 (Ndouble (Ndiv2 (fp a)))). (* Goal: forall _ : @eq ad (N.double (N.div2 (fp a))) (fp a), and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: @eq ad (fp (pf (N.double (N.div2 (fp a))))) (fp a) *) (* Goal: @eq bool (N.eqb (N.double (N.div2 (fp a))) (fp a)) false *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a y) (MapFold1 A (list (prod ad A)) (anil A) (@app (prod ad A)) (fun (a0 : ad) (y0 : A) => acons A (@pair ad A a0 y0) (anil A)) (fun a0 : ad => pf (N.succ_double a0)) m1), and (@eq (option A) (MapGet A (M2 A m0 m1) (fp a)) (@Some A y)) (@eq ad (pf (fp a)) a) *) intro H9. rewrite H9 in H8. rewrite (Neqb_correct (fp a)) in H8. discriminate. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite H6. reflexivity. apply Nodd_not_double. assumption. intro H7. (* Goal: @eq (option B) match MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0 with | Some y' => @Some B y' | None => MapGet B (f a y) a0 end (@Some B y0) *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a1 y1) l0, @eq (option B) (MapGet B (MapMerge B (f a y) (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l0)) a0) (@Some B y0) *) (* Goal: no_dup_alist A l0 *) rewrite H7. cut (MapGet A m0 ((fun a0 : ad => Ndiv2 (fp a0)) a) = Some y /\ (fun a0 : ad => pf (Ndouble a0)) ((fun a0 : ad => Ndiv2 (fp a0)) a) = a). (* Goal: and (@eq bool match MapGet B m3 (N.div2 (fp a)) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro H8. split. exact (proj1 H8). replace (fp a) with (fp (pf (Ndouble (Ndiv2 (fp a))))). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (H1 (Ndouble (Ndiv2 (fp a)))). assumption. rewrite (proj2 H8). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. exact (H (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) H4 a y H3). (* Goal: forall _ : and (@eq bool (in_dom A (fp a1) (MapRemove A (M2 A m0 m1) a)) true) (@eq ad (pf (fp a1)) a1), or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a1) (M1 B a a0)) false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m) false) (@eq ad (pf (fp a)) a)))) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m2) false) (@eq ad (pf (fp a)) a)))) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2))), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m m2)) false) (@eq ad (pf (fp a)) a))) *) intro a0. rewrite (H1 (Ndouble a0)). apply Ndouble_div2. intro H3. (* Goal: and (@eq (option A) (MapGet A (M2 A m0 m1) (fp a)) (@Some A y)) (@eq ad (pf (fp a)) a) *) fold (aapp A) in H3. rewrite (MapGet_M2_bit_0_if A m0 m1 (fp a)). (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble_plus_one a))) = a). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intro H4. elim (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (fun a0 : ad => Ndiv2 (fp a0)) H4 a y H3). (* Goal: forall (_ : @eq (option A) (MapGet A m1 (N.div2 (fp a))) (@Some A y)) (_ : @eq ad (pf (N.succ_double (N.div2 (fp a)))) a), and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intros H5 H6. elim (sumbool_of_bool (Nbit0 (fp a))). intro H7. rewrite H7. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) split. assumption. rewrite (Ndiv2_double_plus_one (fp a) H7) in H6. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intro H7. cut (Neqb (Ndouble_plus_one (Ndiv2 (fp a))) (fp a) = false). (* Goal: forall _ : @eq bool (N.eqb (N.succ_double (N.div2 (fp a))) (fp a)) false, and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: @eq bool (N.eqb (N.succ_double (N.div2 (fp a))) (fp a)) false *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) cut (fp (pf (Ndouble_plus_one (Ndiv2 (fp a)))) = fp a). rewrite (H1 (Ndouble_plus_one (Ndiv2 (fp a)))). (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros H8 H9. rewrite H8 in H9. rewrite (Neqb_correct (fp a)) in H9. discriminate. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite H6. reflexivity. apply Neven_not_double_plus_one. assumption. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro a0. rewrite (H1 (Ndouble_plus_one a0)). apply Ndouble_plus_one_div2. Qed. Lemma my_alist_of_map_lemma_3 : forall (A : Set) (m : Map A) (a : ad) (y : A), In (a, y) (alist_of_Map _ m) -> MapGet _ m a = Some y. Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold alist_of_Map in |- *. unfold MapFold in |- *. intros. cut (forall a : ad, (fun a0 : ad => a0) ((fun a0 : ad => a0) a) = a). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro. elim (my_alist_of_map_lemma_2 A _ (fun a0 : ad => a0) (fun a0 : ad => a0) H0 _ _ H). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros; assumption. reflexivity. Qed. Definition f_OK (A B : Set) (f : ad -> A -> Map B) := forall (a a1 a2 : ad) (y1 y2 : A), in_dom _ a (f a1 y1) = true -> in_dom _ a (f a2 y2) = true -> a1 = a2. Definition no_dup_alist (A : Set) (l : alist A) := forall (a : ad) (y1 y2 : A), In (a, y1) l -> In (a, y2) l -> y1 = y2. Lemma no_dup_alist_of_Map : forall (A : Set) (m : Map A), no_dup_alist _ (alist_of_Map _ m). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold no_dup_alist in |- *. intros. cut (MapGet _ m a = Some y1). intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (MapGet _ m a = Some y2). intros. rewrite H1 in H2. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) injection H2; intros; assumption. apply my_alist_of_map_lemma_3. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. apply my_alist_of_map_lemma_3. assumption. Qed. Lemma my_fold_right_lemma : forall (A B : Set) (f : ad -> A -> Map B) (l : alist A), f_OK _ _ f -> no_dup_alist _ l -> forall (a : ad) (y : B), MapGet _ (fold_right (fun (r : ad * A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l) a = Some y <-> (exists a1 : ad, (exists y1 : A, In (a1, y1) l /\ MapGet _ (f a1 y1) a = Some y)). Proof. (* Goal: forall (A B : Set) (f : forall (_ : ad) (_ : A), Map B) (l : alist A) (_ : f_OK A B f) (_ : no_dup_alist A l) (a : ad) (y : B), iff (@eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l) a) (@Some B y)) (@ex ad (fun a1 : ad => @ex A (fun y1 : A => and (@In (prod ad A) (@pair ad A a1 y1) l) (@eq (option B) (MapGet B (f a1 y1) a) (@Some B y))))) *) simple induction l. simpl in |- *. split. intro; discriminate. intro H1. inversion H1. (* Goal: forall (a : ad) (b : A), R (@fold_right M (prod ad A) (F A f) neutral (aapp A (@cons (prod ad A) (@pair ad A a b) l0) l')) (op (@fold_right M (prod ad A) (F A f) neutral (@cons (prod ad A) (@pair ad A a b) l0)) (@fold_right M (prod ad A) (F A f) neutral l')) *) inversion H2. elim H3; tauto. intro a. elim a. clear a; intros a y. (* Goal: and (@eq bool match MapGet B m3 (N.div2 (fp a)) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros l0 H H0 H1 a0 y0. cut (no_dup_alist _ l0). intro H2. split. intro H3. simpl in H3. rewrite (MapMerge_semantics B (f a y) (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0) in H3. elim (option_sum _ (MapGet B (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0)). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intro H4. elim H4; clear H4. intros x H4. elim (proj1 (H H0 H2 a0 x) H4). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros x0 H5. elim H5; clear H5; intros. split with x0. split with x1. split. (* Goal: @In (prod ad A) (@pair ad A a1 y2) (@cons (prod ad A) (@pair ad A a y) l0) *) apply in_cons. exact (proj1 H5). rewrite H4 in H3. injection H3; intro H6. (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) rewrite <- H6. exact (proj2 H5). intro H4. rewrite H4 in H3. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) split with a. split with y. split. apply in_eq. assumption. intro H3. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) elim H3; clear H3. intros a1 H3. elim H3; clear H3. intros y1 H3. simpl in |- *. (* Goal: @eq (option B) (MapGet B (MapMerge B (f a y) (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l0)) a0) (@Some B y0) *) (* Goal: no_dup_alist A l0 *) elim H3; clear H3; intros H3 H4. elim (in_inv H3). intro H5. (* Goal: forall (_ : @eq (option A) (MapGet A m1 (N.div2 (fp a))) (@Some A y)) (_ : @eq ad (pf (N.succ_double (N.div2 (fp a)))) a), and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) injection H5; clear H5; intros H5 H6. rewrite (MapMerge_semantics B (f a y) (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0). elim (option_sum _ (MapGet B (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0)). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp (pf (N.succ_double a)))) m0) true) (@eq ad (pf (N.double (N.div2 (fp (pf (N.succ_double a)))))) (pf (N.succ_double a))), False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro H7. elim H7. clear H7. intros x H7. rewrite H7. elim (proj1 (H H0 H2 a0 x) H7). (* Goal: forall (_ : @eq ad (N.succ_double (N.div2 (fp a))) (fp a)) (_ : @eq bool (N.eqb (N.succ_double (N.div2 (fp a))) (fp a)) false), and (@eq (option A) (if N.odd (fp a) then MapGet A m1 (N.div2 (fp a)) else MapGet A m0 (N.div2 (fp a))) (@Some A y)) (@eq ad (pf (fp a)) a) *) (* Goal: @eq ad (fp (pf (N.succ_double (N.div2 (fp a))))) (fp a) *) (* Goal: @eq bool (N.eqb (N.succ_double (N.div2 (fp a))) (fp a)) false *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intros x0 H8. elim H8; clear H8; intros x1 H8. elim H8; clear H8; intros H8 H9. (* Goal: @eq (option B) (@Some B x) (@Some B y0) *) (* Goal: forall _ : @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0) (@None B), @eq (option B) match MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0 with | Some y' => @Some B y' | None => MapGet B (f a y) a0 end (@Some B y0) *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a1 y1) l0, @eq (option B) (MapGet B (MapMerge B (f a y) (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l0)) a0) (@Some B y0) *) (* Goal: no_dup_alist A l0 *) unfold f_OK in H0. cut (a1 = x0). intro H10. rewrite <- H10 in H8. (* Goal: @eq (option B) (@Some B x) (@Some B y0) *) (* Goal: @eq ad a1 x0 *) (* Goal: forall _ : @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0) (@None B), @eq (option B) match MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0 with | Some y' => @Some B y' | None => MapGet B (f a y) a0 end (@Some B y0) *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a1 y1) l0, @eq (option B) (MapGet B (MapMerge B (f a y) (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l0)) a0) (@Some B y0) *) (* Goal: no_dup_alist A l0 *) cut (In (a1, x1) ((a, y) :: l0)). intro H11. unfold no_dup_alist in H1. (* Goal: @eq (option B) (@Some B x) (@Some B y0) *) (* Goal: @In (prod ad A) (@pair ad A a1 x1) (@cons (prod ad A) (@pair ad A a y) l0) *) (* Goal: @eq ad a1 x0 *) (* Goal: forall _ : @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0) (@None B), @eq (option B) match MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0 with | Some y' => @Some B y' | None => MapGet B (f a y) a0 end (@Some B y0) *) (* Goal: forall _ : @In (prod ad A) (@pair ad A a1 y1) l0, @eq (option B) (MapGet B (MapMerge B (f a y) (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) l0)) a0) (@Some B y0) *) (* Goal: no_dup_alist A l0 *) rewrite <- (H1 _ _ _ H3 H11) in H9. rewrite <- H10 in H9. rewrite H4 in H9. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) symmetry in |- *; assumption. apply in_cons. assumption. apply H0 with (a := a0) (y1 := y1) (y2 := x1). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) unfold in_dom in |- *. rewrite H4. reflexivity. unfold in_dom in |- *. rewrite H9. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) reflexivity. intro H7. rewrite H7. rewrite H5. rewrite H6. assumption. intro H5. rewrite (MapMerge_semantics B (f a y) (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0). cut (MapGet B (fold_right (fun (r : ad * A) (m0 : Map B) => let (a1, y1) := r in MapMerge B (f a1 y1) m0) (M0 B) l0) a0 = Some y0). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) intro H6. rewrite H6. reflexivity. apply (proj2 (H H0 H2 a0 y0)). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) split with a1. split with y1. split; assumption. unfold no_dup_alist in |- *. (* Goal: @In (prod ad A) (@pair ad A a1 y2) (@cons (prod ad A) (@pair ad A a y) l0) *) intros a1 y1 y2 H2 H3. unfold no_dup_alist in H1. refine (H1 a1 y1 y2 _ _). apply in_cons. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. apply in_cons. assumption. Qed. (* Finally, the semantics of MapFold which we will be using *) Lemma myMapFold_lemma : forall (A B : Set) (f : ad -> A -> Map B) (m : Map A), f_OK _ _ f -> forall (a : ad) (y : B), MapGet _ (MapFold _ _ (M0 _) (MapMerge _) f m) a = Some y <-> (exists a1 : ad, (exists y1 : A, MapGet _ m a1 = Some y1 /\ MapGet _ (f a1 y1) a = Some y)). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. rewrite (myMapFold_as_fold_2 _ _ f m a). cut (no_dup_alist _ (alist_of_Map _ m)). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro. split. intro. elim (proj1 (my_fold_right_lemma _ _ f (alist_of_Map _ m) H H0 a y)). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. inversion H2. split with x. split with x0. split. (* Goal: @eq (option A) (MapGet A m x) (@Some A x0) *) (* Goal: @eq (option B) (MapGet B (f x x0) a) (@Some B y) *) (* Goal: @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m0 : Map B) => let (a0, y0) := r in MapMerge B (f a0 y0) m0) (M0 B) (alist_of_Map A m)) a) (@Some B y) *) (* Goal: forall _ : @ex ad (fun a1 : ad => @ex A (fun y1 : A => and (@eq (option A) (MapGet A m a1) (@Some A y1)) (@eq (option B) (MapGet B (f a1 y1) a) (@Some B y)))), @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m : Map B) => let (a, y) := r in MapMerge B (f a y) m) (M0 B) (alist_of_Map A m)) a) (@Some B y) *) (* Goal: no_dup_alist A (alist_of_Map A m) *) apply my_alist_of_map_lemma_3. exact (proj1 H3). exact (proj2 H3). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intro. inversion H1. inversion H2. (* Goal: @eq (option B) (MapGet B (@fold_right (Map B) (prod ad A) (fun (r : prod ad A) (m : Map B) => let (a, y) := r in MapMerge B (f a y) m) (M0 B) (alist_of_Map A m)) a) (@Some B y) *) (* Goal: no_dup_alist A (alist_of_Map A m) *) elim (proj2 (my_fold_right_lemma _ _ f (alist_of_Map _ m) H H0 a y)). (* Goal: and (@eq bool match MapGet B m3 (N.div2 (fp a)) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) reflexivity. split with x. split with x0. split. apply my_alist_of_map_lemma_1. (* Goal: @eq (option A) (MapGet A m x) (@Some A x0) *) (* Goal: @eq (option B) (MapGet B (f x x0) a) (@Some B y) *) (* Goal: no_dup_alist A (alist_of_Map A m) *) exact (proj1 H3). exact (proj2 H3). apply no_dup_alist_of_Map. Qed. Section My_Map. Variable A B : Set. Fixpoint Mapn (n : nat) : Set := match n with | O => A | S m => Map (Mapn m) end. (* Left to define MapGetn, MapPutn, MapPutn_semantics ... *) Definition MapGet2 (m : Map (Map A)) (a b : ad) := match MapGet _ m a with | None => None | Some m' => MapGet _ m' b end. Definition MapGet3 (m : Map (Map (Map A))) (a b c : ad) := match MapGet _ m a with | None => None | Some m' => MapGet2 m' b c end. Definition MapPut2 (m : Map (Map A)) (a b : ad) (c : A) := match MapGet _ m a with | Some m' => MapPut _ m a (MapPut _ m' b c) | None => MapPut _ m a (M1 _ b c) end. Definition MapPut3 (m : Map (Map (Map A))) (a b c : ad) (d : A) := match MapGet _ m a with | Some m' => MapPut _ m a (MapPut2 m' b c d) | None => MapPut _ m a (M1 _ b (M1 _ c d)) end. Lemma MapPut2_semantics : forall (m : Map (Map A)) (a b a1 b1 : ad) (c : A), MapGet2 (MapPut2 m a b c) a1 b1 = (if Neqb a a1 && Neqb b b1 then Some c else MapGet2 m a1 b1). Proof. (* Goal: forall (m : Map (Map A)) (a b a1 b1 : ad) (c : A), @eq (option A) (MapGet2 (MapPut2 m a b c) a1 b1) (if andb (N.eqb a a1) (N.eqb b b1) then @Some A c else MapGet2 m a1 b1) *) intros m a b a1 b1 c. unfold MapGet2, MapPut2 in |- *. elim (option_sum _ (MapGet (Map A) m a)). (* Goal: @eq (option A) match (if N.eqb b b1 then @Some (Map A) (M1 A c d) else @None (Map A)) with | Some m' => MapGet A m' c1 | None => @None A end (if andb (N.eqb b b1) (N.eqb c c1) then @Some A d else match MapGet (Map (Map A)) m a with | Some m' => match MapGet (Map A) m' b1 with | Some m'0 => MapGet A m'0 c1 | None => @None A end | None => @None A end) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option A) match (if N.eqb a a1 then @Some (Map (Map A)) (M1 (Map A) b (M1 A c d)) else MapGet (Map (Map A)) m a1) with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) intro H. elim H; clear H; intros x H. rewrite H. (* Goal: @eq (option A) match MapGet (Map A) (MapPut (Map A) m a (MapPut A x b c)) a1 with | Some m' => MapGet A m' b1 | None => @None A end (if andb (N.eqb a a1) (N.eqb b b1) then @Some A c else match MapGet (Map A) m a1 with | Some m' => MapGet A m' b1 | None => @None A end) *) (* Goal: forall _ : @eq (option (Map A)) (MapGet (Map A) m a) (@None (Map A)), @eq (option A) match MapGet (Map A) match MapGet (Map A) m a with | Some m' => MapPut (Map A) m a (MapPut A m' b c) | None => MapPut (Map A) m a (M1 A b c) end a1 with | Some m' => MapGet A m' b1 | None => @None A end (if andb (N.eqb a a1) (N.eqb b b1) then @Some A c else match MapGet (Map A) m a1 with | Some m' => MapGet A m' b1 | None => @None A end) *) rewrite (MapPut_semantics (Map A) m a (MapPut A x b c) a1). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. simpl in |- *. (* Goal: @eq (option A) (MapGet A (MapPut A x b c) b1) (if N.eqb b b1 then @Some A c else match MapGet (Map A) m a1 with | Some m' => MapGet A m' b1 | None => @None A end) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option A) match (if N.eqb a a1 then @Some (Map A) (MapPut A x b c) else MapGet (Map A) m a1) with | Some m' => MapGet A m' b1 | None => @None A end (if andb (N.eqb a a1) (N.eqb b b1) then @Some A c else match MapGet (Map A) m a1 with | Some m' => MapGet A m' b1 | None => @None A end) *) (* Goal: forall _ : @eq (option (Map A)) (MapGet (Map A) m a) (@None (Map A)), @eq (option A) match MapGet (Map A) match MapGet (Map A) m a with | Some m' => MapPut (Map A) m a (MapPut A m' b c) | None => MapPut (Map A) m a (M1 A b c) end a1 with | Some m' => MapGet A m' b1 | None => @None A end (if andb (N.eqb a a1) (N.eqb b b1) then @Some A c else match MapGet (Map A) m a1 with | Some m' => MapGet A m' b1 | None => @None A end) *) rewrite (MapPut_semantics A x b c b1). rewrite <- (Neqb_complete a a1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite H. reflexivity. assumption. intro H0. rewrite H0. simpl in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) reflexivity. intro H. rewrite H. simpl in |- *. elim (sumbool_of_bool (Neqb a a1)). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) intro H0. rewrite H0. simpl in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) rewrite (MapPut_semantics (Map A) m a (M1 A b c) a1). rewrite H0. simpl in |- *. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite <- (Neqb_complete _ _ H0). rewrite H. reflexivity. intro H0. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) rewrite H0. simpl in |- *. rewrite (MapPut_semantics (Map A) m a (M1 A b c) a1). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite H0. reflexivity. Qed. Lemma MapPut3_semantics : forall (m : Map (Map (Map A))) (a b c a1 b1 c1 : ad) (d : A), MapGet3 (MapPut3 m a b c d) a1 b1 c1 = (if Neqb a a1 && (Neqb b b1 && Neqb c c1) then Some d else MapGet3 m a1 b1 c1). Proof. (* Goal: forall (m : Map (Map (Map A))) (a b c a1 b1 c1 : ad) (d : A), @eq (option A) (MapGet3 (MapPut3 m a b c d) a1 b1 c1) (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else MapGet3 m a1 b1 c1) *) intros m a b c a1 b1 c1 d. unfold MapGet3, MapPut3 in |- *. (* Goal: forall _ : @eq (option (Map (Map A))) (MapGet (Map (Map A)) m a) (@None (Map (Map A))), @eq (option A) match MapGet (Map (Map A)) match MapGet (Map (Map A)) m a with | Some m' => MapPut (Map (Map A)) m a (MapPut2 m' b c d) | None => MapPut (Map (Map A)) m a (M1 (Map A) b (M1 A c d)) end a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) elim (option_sum _ (MapGet (Map (Map A)) m a)). intro H. (* Goal: @eq (option A) match (if N.eqb b b1 then @Some (Map A) (M1 A c d) else @None (Map A)) with | Some m' => MapGet A m' c1 | None => @None A end (if andb (N.eqb b b1) (N.eqb c c1) then @Some A d else match MapGet (Map (Map A)) m a with | Some m' => match MapGet (Map A) m' b1 with | Some m'0 => MapGet A m'0 c1 | None => @None A end | None => @None A end) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option A) match (if N.eqb a a1 then @Some (Map (Map A)) (M1 (Map A) b (M1 A c d)) else MapGet (Map (Map A)) m a1) with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) elim H; clear H; intros x H. rewrite H. (* Goal: @eq (option A) match MapGet (Map (Map A)) (MapPut (Map (Map A)) m a (MapPut2 x b c d)) a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) (* Goal: forall _ : @eq (option (Map (Map A))) (MapGet (Map (Map A)) m a) (@None (Map (Map A))), @eq (option A) match MapGet (Map (Map A)) match MapGet (Map (Map A)) m a with | Some m' => MapPut (Map (Map A)) m a (MapPut2 m' b c d) | None => MapPut (Map (Map A)) m a (M1 (Map A) b (M1 A c d)) end a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) rewrite (MapPut_semantics (Map (Map A)) m a (MapPut2 x b c d) a1). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. simpl in |- *. (* Goal: @eq (option A) match (if N.eqb b b1 then @Some (Map A) (M1 A c d) else @None (Map A)) with | Some m' => MapGet A m' c1 | None => @None A end (if andb (N.eqb b b1) (N.eqb c c1) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => match MapGet (Map A) m' b1 with | Some m'0 => MapGet A m'0 c1 | None => @None A end | None => @None A end) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option A) match (if N.eqb a a1 then @Some (Map (Map A)) (M1 (Map A) b (M1 A c d)) else MapGet (Map (Map A)) m a1) with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) rewrite <- (Neqb_complete _ _ H0). rewrite (MapPut2_semantics x b c b1 c1 d). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) rewrite H. reflexivity. intro H0. rewrite H0. simpl in |- *. reflexivity. intro H. (* Goal: @eq (option A) match (if N.eqb b b1 then @Some (Map A) (M1 A c d) else @None (Map A)) with | Some m' => MapGet A m' c1 | None => @None A end (if andb (N.eqb b b1) (N.eqb c c1) then @Some A d else match MapGet (Map (Map A)) m a with | Some m' => match MapGet (Map A) m' b1 with | Some m'0 => MapGet A m'0 c1 | None => @None A end | None => @None A end) *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @eq (option A) match (if N.eqb a a1 then @Some (Map (Map A)) (M1 (Map A) b (M1 A c d)) else MapGet (Map (Map A)) m a1) with | Some m' => MapGet2 m' b1 c1 | None => @None A end (if andb (N.eqb a a1) (andb (N.eqb b b1) (N.eqb c c1)) then @Some A d else match MapGet (Map (Map A)) m a1 with | Some m' => MapGet2 m' b1 c1 | None => @None A end) *) rewrite H. rewrite (MapPut_semantics (Map (Map A)) m a (M1 (Map A) b (M1 A c d)) a1). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) elim (sumbool_of_bool (Neqb a a1)). intro H0. rewrite H0. simpl in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) unfold MapGet2 in |- *. simpl in |- *. rewrite <- (Neqb_complete _ _ H0). rewrite H. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) elim (Neqb b b1). simpl in |- *. reflexivity. simpl in |- *. reflexivity. intro H0. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) rewrite H0. simpl in |- *. reflexivity. Qed. Lemma makeM2_MapDom_lemma : forall (A : Set) (m1 m2 : Map A), makeM2 unit (MapDom A m1) (MapDom A m2) = MapDom A (makeM2 A m1 m2). Proof. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) intro. simple induction m1. simpl in |- *. simple induction m2. simpl in |- *. reflexivity. simpl in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) reflexivity. simpl in |- *. reflexivity. intro. intro. simple induction m2. simpl in |- *. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. reflexivity. reflexivity. reflexivity. Qed. Fixpoint MapDomRestrTo_DomBy (m : Map A) : Map B -> Map A * Map unit := match m with | M0 => fun _ : Map B => (M0 A, M0 unit) | M1 a y => fun m' : Map B => match MapGet B m' a with | None => (M0 A, M1 unit a tt) | _ => (m, M0 unit) end | M2 m1 m2 => fun m' : Map B => match m' with | M0 => (M0 A, MapDom A m) | M1 a' y' => (match MapGet A m a' with | None => M0 A | Some y => M1 A a' y end, MapDom A (MapRemove A m a')) | M2 m'1 m'2 => match MapDomRestrTo_DomBy m1 m'1 with | (x1, y1) => match MapDomRestrTo_DomBy m2 m'2 with | (x2, y2) => (makeM2 A x1 x2, makeM2 unit y1 y2) end end end end. Lemma MapDomRestrTo_DomBy_lemma_1 : forall (m : Map A) (m' : Map B), fst (MapDomRestrTo_DomBy m m') = MapDomRestrTo A B m m'. Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. reflexivity. simpl in |- *. intros. elim (MapGet B m' a). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) reflexivity. reflexivity. simpl in |- *. intro. intro. intro. intro. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m'. reflexivity. reflexivity. intros. rewrite <- (H m2). (* Goal: @eq (Map A) (@fst (Map A) (Map unit) (let (x1, y1) := MapDomRestrTo_DomBy m0 m2 in let (x2, y2) := MapDomRestrTo_DomBy m1 m3 in @pair (Map A) (Map unit) (makeM2 A x1 x2) (makeM2 unit y1 y2))) (makeM2 A (@fst (Map A) (Map unit) (MapDomRestrTo_DomBy m0 m2)) (MapDomRestrTo A B m1 m3)) *) rewrite <- (H0 m3). elim (MapDomRestrTo_DomBy m0 m2). elim (MapDomRestrTo_DomBy m1 m3). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) reflexivity. Qed. Lemma MapDomRestrTo_DomBy_lemma_2 : forall (m : Map A) (m' : Map B), snd (MapDomRestrTo_DomBy m m') = MapDom A (MapDomRestrBy A B m m'). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. reflexivity. intros. simpl in |- *. unfold MapDom in |- *. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (MapGet B m' a). reflexivity. reflexivity. intro. intro. intro. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro. simple induction m'. reflexivity. reflexivity. intros. simpl in |- *. (* Goal: @eq (Map unit) (@snd (Map A) (Map unit) (let (x1, y1) := MapDomRestrTo_DomBy m0 m2 in let (x2, y2) := MapDomRestrTo_DomBy m1 m3 in @pair (Map A) (Map unit) (makeM2 A x1 x2) (makeM2 unit y1 y2))) (MapDom A (makeM2 A (MapDomRestrBy A B m0 m2) (MapDomRestrBy A B m1 m3))) *) cut (snd (MapDomRestrTo_DomBy m0 m2) = MapDom A (MapDomRestrBy A B m0 m2)). (* Goal: forall _ : @eq (Map unit) (@snd (Map A) (Map unit) (MapDomRestrTo_DomBy m0 m2)) (MapDom A (MapDomRestrBy A B m0 m2)), @eq (Map unit) (@snd (Map A) (Map unit) (let (x1, y1) := MapDomRestrTo_DomBy m0 m2 in let (x2, y2) := MapDomRestrTo_DomBy m1 m3 in @pair (Map A) (Map unit) (makeM2 A x1 x2) (makeM2 unit y1 y2))) (MapDom A (makeM2 A (MapDomRestrBy A B m0 m2) (MapDomRestrBy A B m1 m3))) *) (* Goal: @eq (Map unit) (@snd (Map A) (Map unit) (MapDomRestrTo_DomBy m0 m2)) (MapDom A (MapDomRestrBy A B m0 m2)) *) cut (snd (MapDomRestrTo_DomBy m1 m3) = MapDom A (MapDomRestrBy A B m1 m3)). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (MapDomRestrTo_DomBy m1 m3). elim (MapDomRestrTo_DomBy m0 m2). intros. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simpl in |- *. simpl in H3, H4. rewrite H3. rewrite H4. apply makeM2_MapDom_lemma. (* Goal: @In ad a (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0) *) apply H0. apply H. Qed. Fixpoint map_app_list1 (pf : ad -> ad) (l : list ad) (m : Map A) {struct m} : list ad := match m with | M0 => l | M1 a y => pf a :: l | M2 m1 m2 => map_app_list1 (fun a0 : ad => pf (Ndouble_plus_one a0)) (map_app_list1 (fun a0 : ad => pf (Ndouble a0)) l m1) m2 end. Lemma map_app_list1_lemma_1 : forall (m : Map A) (pf : ad -> ad) (l : list ad) (a : ad), In a l -> In a (map_app_list1 pf l m). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. tauto. simpl in |- *. tauto. simpl in |- *. intros. apply H0. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H. assumption. Qed. Lemma map_app_list1_lemma_2 : forall (m : Map A) (pf fp : ad -> ad) (l : list ad), (forall a0 : ad, fp (pf a0) = a0) -> forall a : ad, In a (map_app_list1 pf l m) -> In a l \/ in_dom _ (fp a) m = true /\ pf (fp a) = a. Proof. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. intros pf fp l H a H0. left; assumption. simpl in |- *. intros a a0 pf fp l H a1 H0. (* Goal: and (@eq bool (in_dom A (fp (pf a)) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp (pf a)) m') false) (@eq ad (pf (fp (pf a))) (pf a))) *) (* Goal: forall _ : @In ad a1 l, or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp a1) m') false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m0 m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m0) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m m0) m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m m0)) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a))) *) elim H0; intro H2. rewrite <- H2. rewrite (H a). right. unfold in_dom in |- *. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simpl in |- *. rewrite (Neqb_correct a). split; reflexivity. left; assumption. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simpl in |- *. intros m0 H m1 H0 pf fp l H1 a H2. (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble_plus_one a))) = a). (* Goal: forall _ : and (@eq bool (in_dom A (fp a1) (MapRemove A (M2 A m0 m1) a)) true) (@eq ad (pf (fp a1)) a1), or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a1) (M1 B a a0)) false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m) false) (@eq ad (pf (fp a)) a)))) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m2) false) (@eq ad (pf (fp a)) a)))) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2))), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m m2)) false) (@eq ad (pf (fp a)) a))) *) intro H3. elim (H0 (fun a0 : ad => pf (Ndouble_plus_one a0)) (fun a0 : ad => Ndiv2 (fp a0)) _ H3 a H2). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intro H4. (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble a))) = a). (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) intro H5. elim (H (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) _ H5 a H4). (* Goal: or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a))) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) tauto. intro H6. elim H6; clear H6; intros H6 H7. right. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Nbit0 (fp a))). intro y. rewrite <- H7 in y. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) rewrite (H1 (Ndouble (Ndiv2 (fp a)))) in y. rewrite (Ndouble_bit0 (Ndiv2 (fp a))) in y. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) discriminate. intro y. unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_0 _ (fp a) y m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in H6. split. assumption. rewrite (Ndiv2_double (fp a) y) in H7. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intro a0. rewrite (H1 (Ndouble a0)). apply Ndouble_div2. (* Goal: or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a))) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro H4. elim H4; clear H4; intros H4 H5. right. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Nbit0 (fp a))). intro y. unfold in_dom in |- *. (* Goal: and (@eq bool match MapGet B m3 (N.div2 (fp a)) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (MapGet_M2_bit_0_1 _ (fp a) y m0 m1). unfold in_dom in H4. split. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. rewrite (Ndiv2_double_plus_one _ y) in H5. assumption. intro y. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (@eq ad (pf (fp a)) a) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) rewrite <- H5 in y. rewrite (H1 (Ndouble_plus_one (Ndiv2 (fp a)))) in y. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_bit0 (Ndiv2 (fp a))) in y. discriminate. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro a0. rewrite (H1 (Ndouble_plus_one a0)). apply Ndouble_plus_one_div2. Qed. Lemma map_app_list1_lemma_3 : forall (m : Map A) (pf fp : ad -> ad) (l : list ad), (forall a0 : ad, fp (pf a0) = a0) -> no_dup_list _ l -> (forall a : ad, in_dom _ a m = true -> ~ In (pf a) l) -> no_dup_list _ (map_app_list1 pf l m). Proof. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simple induction m. simpl in |- *. tauto. simpl in |- *. intros a a0 pf fp l H H0 H1. apply no_dup_cons. unfold not in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) intro H2. absurd (In (pf a) l). apply H1 with (a1 := a). unfold in_dom in |- *. simpl in |- *. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Neqb_correct a). reflexivity. assumption. assumption. simpl in |- *. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros m0 H m1 H0 pf fp l H1 H2 H3. apply H0 with (fp := fun a0 : ad => Ndiv2 (fp a0)). intro a0. (* Goal: @eq ad (N.div2 (fp (pf (N.succ_double a0)))) a0 *) (* Goal: no_dup_list ad (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0) *) (* Goal: forall (a : ad) (_ : @eq bool (in_dom A a m1) true), not (@In ad (pf (N.succ_double a)) (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0)) *) rewrite (H1 (Ndouble_plus_one a0)). apply Ndouble_plus_one_div2. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H with (fp := fun a0 : ad => Ndiv2 (fp a0)). intro a0. rewrite (H1 (Ndouble a0)). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply Ndouble_div2. assumption. intros a H4. apply H3. unfold in_dom in |- *. (* Goal: @eq bool match MapGet A (M2 A m0 m1) (N.double a) with | Some a => true | None => false end true *) (* Goal: forall (a : ad) (_ : @eq bool (in_dom A a m1) true), not (@In ad (pf (N.succ_double a)) (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0)) *) rewrite (MapGet_M2_bit_0_0 _ (Ndouble a) (Ndouble_bit0 _) m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_div2 a). assumption. intros a H4. unfold not in |- *; intro H5. (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble a))) = a). (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro H6. elim (map_app_list1_lemma_2 m0 (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) l H6 _ H5). (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp (pf (N.succ_double a)))) m0) true) (@eq ad (pf (N.double (N.div2 (fp (pf (N.succ_double a)))))) (pf (N.succ_double a))), False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold not in H3. intro H7. apply H3 with (a := Ndouble_plus_one a). (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_1 _ (Ndouble_plus_one a) (Ndouble_plus_one_bit0 _) m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_div2 a). assumption. assumption. intro H7. (* Goal: False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim H7; clear H7; intros H7 H8. rewrite (H1 (Ndouble_plus_one a)) in H8. (* Goal: False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_div2 a) in H8. elim (sumbool_of_bool (Nbit0 (Ndouble a))). (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro y. rewrite (Ndouble_bit0 a) in y. discriminate. intro y. (* Goal: False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite <- (H1 (Ndouble a)) in y. rewrite H8 in y. (* Goal: False *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (H1 (Ndouble_plus_one a)) in y. rewrite (Ndouble_plus_one_bit0 a) in y. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) discriminate. intro a0. rewrite (H1 (Ndouble a0)). apply Ndouble_div2. Qed. Lemma map_app_list1_lemma_4 : forall (m : Map A) (pf : ad -> ad) (l : list ad) (a : ad), in_dom _ a m = true -> In (pf a) (map_app_list1 pf l m). Proof. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simple induction m. simpl in |- *. unfold in_dom in |- *. simpl in |- *. intros; discriminate. simpl in |- *. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. unfold in_dom in H. simpl in H. elim (sumbool_of_bool (Neqb a a1)). (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) intro y. rewrite y in H. rewrite (Neqb_complete _ _ y). left. reflexivity. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro y. rewrite y in H. discriminate. simpl in |- *. intros. (* Goal: forall _ : @eq bool (N.odd (N.double a)) true, False *) (* Goal: forall _ : @eq bool (N.odd (N.double a)) false, False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Nbit0 a)). intro y. unfold in_dom in H1. (* Goal: @In ad (pf a) (map_app_list1 (fun a0 : ad => pf (N.succ_double a0)) (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0) m1) *) (* Goal: forall _ : @eq bool (N.odd a) false, @In ad (pf a) (map_app_list1 (fun a0 : ad => pf (N.succ_double a0)) (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0) m1) *) rewrite (MapGet_M2_bit_0_1 _ a y m0 m1) in H1. replace (pf a) with ((fun a0 : ad => pf (Ndouble_plus_one a0)) (Ndiv2 a)). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H0 with (pf := fun a0 : ad => pf (Ndouble_plus_one a0)). assumption. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndiv2_double_plus_one a). reflexivity. assumption. intro y. (* Goal: @In ad (pf a) (map_app_list1 (fun a0 : ad => pf (N.succ_double a0)) (map_app_list1 (fun a0 : ad => pf (N.double a0)) l m0) m1) *) apply map_app_list1_lemma_1. replace (pf a) with (pf (Ndouble (Ndiv2 a))). (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H with (pf := fun a0 : ad => pf (Ndouble a0)). unfold in_dom in |- *. (* Goal: @eq bool match MapGet A m0 (N.div2 a) with | Some a => true | None => false end true *) (* Goal: @eq ad (pf (N.double (N.div2 a))) (pf a) *) unfold in_dom in H1. rewrite (MapGet_M2_bit_0_0 _ _ y m0 m1) in H1. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. rewrite (Ndiv2_double _ y). reflexivity. Qed. Fixpoint MapDomRestrByApp1 (pf : ad -> ad) (l : list ad) (m : Map A) {struct m} : Map B -> list ad := match m with | M0 => fun _ : Map B => l | M1 a y => fun m' : Map B => match MapGet B m' a with | None => pf a :: l | _ => l end | M2 m1 m2 => fun m' : Map B => match m' with | M0 => map_app_list1 pf l m | M1 a' y' => map_app_list1 pf l (MapRemove A m a') | M2 m'1 m'2 => MapDomRestrByApp1 (fun a0 : ad => pf (Ndouble_plus_one a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (Ndouble a0)) l m1 m'1) m2 m'2 end end. Lemma MapDomRestrByApp1_lemma_1 : forall (m : Map A) (m' : Map B) (l : list ad) (pf : ad -> ad) (a : ad), In a l -> In a (MapDomRestrByApp1 pf l m m'). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. tauto. simpl in |- *. intros. elim (MapGet B m' a). Focus 2. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply in_cons. assumption. intro. assumption. intros. elim m'. simpl in |- *. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply map_app_list1_lemma_1. apply map_app_list1_lemma_1. assumption. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold MapDomRestrByApp1 in |- *. intros. apply map_app_list1_lemma_1. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intros. simpl in |- *. apply H0. apply H. assumption. Qed. Lemma MapDomRestrByApp1_lemma_2 : forall (m : Map A) (m' : Map B) (l : list ad) (pf : ad -> ad) (a : ad), in_dom _ a m = true -> in_dom _ a m' = false -> In (pf a) (MapDomRestrByApp1 pf l m m'). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. unfold in_dom at 1 in |- *. simpl in |- *. intros. discriminate. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. simpl in |- *. intros. elim (sumbool_of_bool (Neqb a a1)). intro y. (* Goal: @In ad (pf a1) match MapGet B m' a with | Some b => l | None => @cons ad (pf a) l end *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @In ad (pf a1) match MapGet B m' a with | Some b0 => l | None => @cons ad (pf a) l end *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a m) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l m m')) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a m0) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l m0 m')) (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m m0)) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m m0) m') *) rewrite (Neqb_complete _ _ y). elim (option_sum _ (MapGet B m' a1)). intro y0. (* Goal: @In ad (pf a1) match MapGet B m' a1 with | Some b => l | None => @cons ad (pf a1) l end *) (* Goal: forall _ : @eq (option B) (MapGet B m' a1) (@None B), @In ad (pf a1) match MapGet B m' a1 with | Some b0 => l | None => @cons ad (pf a1) l end *) (* Goal: forall _ : @eq bool (N.eqb a a1) false, @In ad (pf a1) match MapGet B m' a with | Some b0 => l | None => @cons ad (pf a) l end *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a m) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l m m')) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a m0) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l m0 m')) (m' : Map B) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m m0)) true) (_ : @eq bool (in_dom B a m') false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m m0) m') *) inversion y0. rewrite H1 in H0. rewrite y in H. discriminate. intro y0. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) rewrite y0. simpl in |- *. left. reflexivity. intro y. rewrite y in H. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) discriminate. intro. simple induction m'. unfold MapDomRestrByApp1 in |- *. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. apply map_app_list1_lemma_4. assumption. intros. (* Goal: @In ad (pf a1) (map_app_list1 pf l (MapRemove A (M2 A m0 m1) a)) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) unfold MapDomRestrByApp1 in |- *. unfold in_dom in H2. simpl in H2. (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply map_app_list1_lemma_4. unfold in_dom in |- *. (* Goal: @eq bool match MapGet A (MapRemove A (M2 A m0 m1) a) a1 with | Some a => true | None => false end true *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf : forall _ : ad, ad) (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), @In ad (pf a) (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite (MapRemove_semantics A (M2 A m0 m1) a a1). (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H2. discriminate. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro y. rewrite y. assumption. intros. simpl in |- *. (* Goal: forall _ : @eq bool (N.odd (N.double a)) true, False *) (* Goal: forall _ : @eq bool (N.odd (N.double a)) false, False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Nbit0 a)). intro y. unfold in_dom in H3, H4. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall _ : @eq bool (N.odd a) false, @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) rewrite (MapGet_M2_bit_0_1 A a y m0 m1) in H3. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall _ : @eq bool (N.odd a) false, @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) rewrite (MapGet_M2_bit_0_1 B a y m2 m3) in H4. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall _ : @eq bool (N.odd a) false, @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) replace (pf a) with (pf (Ndouble_plus_one (Ndiv2 a))). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H0 with (pf := fun a0 : ad => pf (Ndouble_plus_one a0)). assumption. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. rewrite (Ndiv2_double_plus_one _ y). reflexivity. intro y. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) unfold in_dom in H3, H4. rewrite (MapGet_M2_bit_0_0 A a y m0 m1) in H3. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) rewrite (MapGet_M2_bit_0_0 B a y m2 m3) in H4. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) apply MapDomRestrByApp1_lemma_1. (* Goal: @In ad (pf a) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) replace (pf a) with (pf (Ndouble (Ndiv2 a))). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H with (pf := fun a0 : ad => pf (Ndouble a0)). assumption. assumption. (* Goal: @eq bool false false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite (Ndiv2_double _ y). reflexivity. Qed. Lemma MapDomRestrByApp1_lemma_3 : forall (m : Map A) (m' : Map B) (l : list ad) (pf fp : ad -> ad), (forall a : ad, fp (pf a) = a) -> forall a : ad, In a (MapDomRestrByApp1 pf l m m') -> In a l \/ in_dom _ (fp a) m = true /\ in_dom _ (fp a) m' = false /\ pf (fp a) = a. Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. tauto. intros. simpl in H0. (* Goal: forall _ : @eq bool (N.odd (N.double a)) true, False *) (* Goal: forall _ : @eq bool (N.odd (N.double a)) false, False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (option_sum _ (MapGet B m' a)). intro y. elim y; clear y; intros x y. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite y in H0. left. assumption. intro y. rewrite y in H0. (* Goal: and (@eq bool (in_dom A (fp (pf a)) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp (pf a)) m') false) (@eq ad (pf (fp (pf a))) (pf a))) *) (* Goal: forall _ : @In ad a1 l, or (@In ad a1 l) (and (@eq bool (in_dom A (fp a1) (M1 A a a0)) true) (and (@eq bool (in_dom B (fp a1) m') false) (@eq ad (pf (fp a1)) a1))) *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l m0 m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) m0) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a)))) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m m0) m')), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m m0)) true) (and (@eq bool (in_dom B (fp a) m') false) (@eq ad (pf (fp a)) a))) *) elim (in_inv H0). intro H1. right. rewrite <- H1. rewrite (H a). (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) unfold in_dom in |- *. rewrite y. simpl in |- *. rewrite (Neqb_correct a). split. (* Goal: and (@eq bool match MapGet B m3 (N.div2 (fp a)) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) reflexivity. split. reflexivity. reflexivity. tauto. intro m0. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m'. intros. unfold MapDomRestrByApp1 in H2. (* Goal: forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M0 A)) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad l *) (* Goal: forall (a : ad) (a0 : A) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a1 : ad, @eq ad (fp (pf a1)) a1) (_ : forall (a1 : ad) (_ : @eq bool (in_dom A a1 (M1 A a a0)) true) (_ : @eq bool (in_dom B a1 m') false), not (@In ad (pf a1) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M1 A a a0) m') *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m m')) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m0) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m0 m')) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m m0)) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m m0) m') *) elim (map_app_list1_lemma_2 _ _ _ _ H1 a H2). tauto. intro H3. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim H3; clear H3; intros. right. split. assumption. split. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) reflexivity. assumption. intros a a0 l pf fp H1 a1 H2. unfold MapDomRestrByApp1 in H2. (* Goal: forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M0 A)) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad l *) (* Goal: forall (a : ad) (a0 : A) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a1 : ad, @eq ad (fp (pf a1)) a1) (_ : forall (a1 : ad) (_ : @eq bool (in_dom A a1 (M1 A a a0)) true) (_ : @eq bool (in_dom B a1 m') false), not (@In ad (pf a1) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M1 A a a0) m') *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m m')) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m0) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m0 m')) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m m0)) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m m0) m') *) elim (map_app_list1_lemma_2 _ _ _ _ H1 a1 H2). tauto. intro H3. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim H3; clear H3; intros. right. unfold in_dom in H3. (* Goal: and (@eq bool (in_dom A (fp a1) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a1) (M1 B a a0)) false) (@eq ad (pf (fp a1)) a1)) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m) false) (@eq ad (pf (fp a)) a)))) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) m2) false) (@eq ad (pf (fp a)) a)))) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (a : ad) (_ : @In ad a (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2))), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m m2)) false) (@eq ad (pf (fp a)) a))) *) rewrite (MapRemove_semantics A (M2 A m0 m1) a (fp a1)) in H3. (* Goal: forall _ : @eq bool (N.odd (N.double a)) true, False *) (* Goal: forall _ : @eq bool (N.odd (N.double a)) false, False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Neqb a (fp a1))). intro y. rewrite y in H3. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) discriminate. intro y. rewrite y in H3. split. assumption. split. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. simpl in |- *. rewrite y. reflexivity. assumption. intros. (* Goal: or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a))) *) simpl in H4. (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble a))) = a). (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble_plus_one a))) = a). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. elim (H0 m3 _ (fun a0 : ad => pf (Ndouble_plus_one a0)) (fun a0 : ad => Ndiv2 (fp a0)) H5 _ H4). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro. elim (H m2 _ (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) H6 _ H7). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) tauto. intro. elim H8; clear H8; intros. elim H9; clear H9; intros. (* Goal: or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a))) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) right. elim (sumbool_of_bool (Nbit0 (fp a))). intro y. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp a)) m1) true) (and (@eq bool (in_dom B (N.div2 (fp a)) m3) false) (@eq ad (pf (N.succ_double (N.div2 (fp a)))) a)), or (@In ad a l) (and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a))) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite <- H10 in y. rewrite (H3 (Ndouble (Ndiv2 (fp a)))) in y. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_bit0 (Ndiv2 (fp a))) in y. discriminate. intro y. (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_0 _ _ y m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (MapGet_M2_bit_0_0 _ _ y m2 m3). split. assumption. split. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. rewrite (Ndiv2_double _ y) in H10. assumption. intro. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim H7; clear H7; intros. elim H8; clear H8; intros. right. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Nbit0 (fp a))). intro y. unfold in_dom in |- *. (* Goal: and (@eq bool match MapGet A (M2 A m0 m1) (fp a) with | Some a => true | None => false end true) (and (@eq bool match MapGet B (M2 B m2 m3) (fp a) with | Some a => true | None => false end false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall _ : @eq bool (N.odd (fp a)) false, and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (MapGet_M2_bit_0_1 _ _ y m0 m1). rewrite (MapGet_M2_bit_0_1 _ _ y m2 m3). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) split. assumption. split. assumption. rewrite (Ndiv2_double_plus_one _ y) in H9. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intro y. rewrite <- H9 in y. (* Goal: and (@eq bool (in_dom A (fp a) (M2 A m0 m1)) true) (and (@eq bool (in_dom B (fp a) (M2 B m2 m3)) false) (@eq ad (pf (fp a)) a)) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (H3 (Ndouble_plus_one (Ndiv2 (fp a)))) in y. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_bit0 (Ndiv2 (fp a))) in y. discriminate. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. rewrite (H3 (Ndouble_plus_one a0)). apply Ndouble_plus_one_div2. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. rewrite (H3 (Ndouble a0)). apply Ndouble_div2. Qed. Lemma MapDomRestrByApp1_lemma_4 : forall (m : Map A) (m' : Map B) (l : list ad) (pf fp : ad -> ad), (forall a : ad, fp (pf a) = a) -> (forall a : ad, in_dom _ a m = true -> in_dom _ a m' = false -> ~ In (pf a) l) -> no_dup_list _ l -> no_dup_list _ (MapDomRestrByApp1 pf l m m'). Proof. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) simple induction m. simpl in |- *. tauto. intros. unfold MapDomRestrByApp1 in |- *. (* Goal: no_dup_list ad match MapGet B m' a with | Some b => l | None => @cons ad (pf a) l end *) (* Goal: forall _ : @eq (option B) (MapGet B m' a) (@None B), no_dup_list ad match MapGet B m' a with | Some b0 => l | None => @cons ad (pf a) l end *) (* Goal: forall (m : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m m')) (m0 : Map A) (_ : forall (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a m0) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l m0 m')) (m' : Map B) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m m0)) true) (_ : @eq bool (in_dom B a m') false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m m0) m') *) elim (option_sum _ (MapGet _ m' a)). intro y. inversion y. rewrite H2. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. intro y. rewrite y. apply no_dup_cons. apply H0. unfold in_dom in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) simpl in |- *. rewrite (Neqb_correct a). reflexivity. unfold in_dom in |- *. rewrite y. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) reflexivity. assumption. intro. simple induction m'. intros. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M1 B a a0)) *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) unfold MapDomRestrByApp1 in |- *. apply map_app_list1_lemma_3 with (fp := fp). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. assumption. intros. apply H2. assumption. apply in_dom_M0. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. unfold MapDomRestrByApp1 in |- *. apply map_app_list1_lemma_3 with (fp := fp). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. assumption. intros. apply H2. unfold in_dom in |- *. (* Goal: @eq bool (in_dom B a1 (M1 B a a0)) false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) unfold in_dom in H4. rewrite (MapRemove_semantics A (M2 A m0 m1) a a1) in H4. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H4. discriminate. (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro y. rewrite y in H4. assumption. unfold in_dom in H4. (* Goal: @eq bool (in_dom B a1 (M1 B a a0)) false *) (* Goal: forall (m : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m)) (m2 : Map B) (_ : forall (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a m2) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) m2)) (l : list ad) (pf fp : forall _ : ad, ad) (_ : forall a : ad, @eq ad (fp (pf a)) a) (_ : forall (a : ad) (_ : @eq bool (in_dom A a (M2 A m0 m1)) true) (_ : @eq bool (in_dom B a (M2 B m m2)) false), not (@In ad (pf a) l)) (_ : no_dup_list ad l), no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m m2)) *) rewrite (MapRemove_semantics A (M2 A m0 m1) a a1) in H4. (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim (sumbool_of_bool (Neqb a a1)). intro y. rewrite y in H4. discriminate. (* Goal: no_dup_list ad (MapDomRestrByApp1 pf l (M2 A m0 m1) (M2 B m2 m3)) *) intro y. rewrite y in H4. unfold in_dom in |- *. simpl in |- *. rewrite y. reflexivity. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. simpl in |- *. (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble a))) = a). (* Goal: forall _ : forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a, no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.succ_double a0)) (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) m1 m3) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (forall a : ad, Ndiv2 (fp (pf (Ndouble_plus_one a))) = a). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intros. apply H0 with (fp := fun a0 : ad => Ndiv2 (fp a0)). intro. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (H3 (Ndouble_plus_one a)). apply Ndouble_plus_one_div2. intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold not in |- *. intro. elim (MapDomRestrByApp1_lemma_3 m0 m2 l (fun a0 : ad => pf (Ndouble a0)) (fun a0 : ad => Ndiv2 (fp a0)) H7 (pf (Ndouble_plus_one a)) H10). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro. unfold not in H4. apply H4 with (a := Ndouble_plus_one a). (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_1 _ _ (Ndouble_plus_one_bit0 a) m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_div2 a). assumption. unfold in_dom in |- *. (* Goal: @eq bool match MapGet B (M2 B m2 m3) (N.succ_double a) with | Some a => true | None => false end false *) (* Goal: @In ad (pf (N.succ_double a)) l *) (* Goal: forall _ : and (@eq bool (in_dom A (N.div2 (fp (pf (N.succ_double a)))) m0) true) (and (@eq bool (in_dom B (N.div2 (fp (pf (N.succ_double a)))) m2) false) (@eq ad (pf (N.double (N.div2 (fp (pf (N.succ_double a)))))) (pf (N.succ_double a)))), False *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (MapGet_M2_bit_0_1 _ _ (Ndouble_plus_one_bit0 a) m2 m3). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_div2 a). assumption. assumption. intros. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) elim H11; clear H11; intros. elim H12; clear H12; intros. (* Goal: False *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (H3 (Ndouble_plus_one a)) in H13. rewrite (Ndouble_plus_one_div2 a) in H13. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) cut (Ndouble a = Ndouble_plus_one a). intros. elim (sumbool_of_bool (Nbit0 (Ndouble a))). (* Goal: False *) (* Goal: @eq N (N.double a) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) intro y. rewrite (Ndouble_bit0 a) in y. discriminate. rewrite H14. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_plus_one_bit0 a). intro. discriminate. (* Goal: @eq N (fp (pf (N.succ_double a))) (N.succ_double a) *) (* Goal: no_dup_list ad (MapDomRestrByApp1 (fun a0 : ad => pf (N.double a0)) l m0 m2) *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite <- (H3 (Ndouble a)). rewrite H13. apply H3. (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply H with (fp := fun a0 : ad => Ndiv2 (fp a0)). assumption. intros. apply H4. (* Goal: @eq bool (in_dom B (N.double a) (M2 B m2 m3)) false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) unfold in_dom in |- *. rewrite (MapGet_M2_bit_0_0 _ _ (Ndouble_bit0 a) m0 m1). (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (Ndouble_div2 a). assumption. unfold in_dom in |- *. (* Goal: @eq bool match MapGet B m2 (N.div2 (N.double a)) with | Some a => true | None => false end false *) (* Goal: no_dup_list ad l *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) rewrite (MapGet_M2_bit_0_0 _ _ (Ndouble_bit0 a) m2 m3). rewrite (Ndouble_div2 a). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.succ_double a)))) a *) (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) assumption. assumption. intros. rewrite (H3 (Ndouble_plus_one a)). (* Goal: forall a : ad, @eq N (N.div2 (fp (pf (N.double a)))) a *) apply Ndouble_plus_one_div2. intro. rewrite (H3 (Ndouble a)). (* Goal: @eq N (N.div2 (N.double a)) a *) apply Ndouble_div2. Qed. End My_Map.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Section BDD_neg. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Fixpoint BDDneg_1 (cfg : BDDconfig) (ul : list ad) (node : ad) (bound : nat) {struct bound} : BDDconfig * ad := match bound with | O => (* Error *) (initBDDconfig, BDDzero) | S bound' => match MapGet _ (negm_of_cfg cfg) node with | Some node' => (cfg, node') | None => match MapGet _ (fst cfg) node with | None => if Neqb node BDDzero then (BDDneg_memo_put cfg BDDzero BDDone, BDDone) else (BDDneg_memo_put cfg BDDone BDDzero, BDDzero) | Some (x, (l, r)) => match BDDneg_1 cfg ul l bound' with | (cfgl, nodel) => match BDDneg_1 cfgl (nodel :: ul) r bound' with | (cfgr, noder) => match BDDmake gc cfgr x nodel noder (noder :: nodel :: ul) with | (cfg', node') => (BDDneg_memo_put cfg' node node', node') end end end end end end. Lemma BDDneg_1_lemma : forall (bound : nat) (cfg : BDDconfig) (ul : list ad) (node : ad), nat_of_N (node_height cfg node) < bound -> BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> BDDconfig_OK (fst (BDDneg_1 cfg ul node bound)) /\ config_node_OK (fst (BDDneg_1 cfg ul node bound)) (snd (BDDneg_1 cfg ul node bound)) /\ used_nodes_preserved cfg (fst (BDDneg_1 cfg ul node bound)) ul /\ Neqb (node_height (fst (BDDneg_1 cfg ul node bound)) (snd (BDDneg_1 cfg ul node bound))) (node_height cfg node) = true /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDneg_1 cfg ul node bound)) (snd (BDDneg_1 cfg ul node bound))) (bool_fun_neg (bool_fun_of_BDD cfg node)). Proof. (* Goal: forall (bound : nat) (cfg : BDDconfig) (ul : list ad) (node : ad) (_ : lt (N.to_nat (node_height cfg node)) bound) (_ : BDDconfig_OK cfg) (_ : used_list_OK cfg ul) (_ : used_node' cfg ul node), and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_1 cfg ul node bound))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_1 cfg ul node bound)) (@snd BDDconfig ad (BDDneg_1 cfg ul node bound))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDneg_1 cfg ul node bound)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (BDDneg_1 cfg ul node bound)) (@snd BDDconfig ad (BDDneg_1 cfg ul node bound))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_1 cfg ul node bound)) (@snd BDDconfig ad (BDDneg_1 cfg ul node bound))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) simple induction bound. intros. absurd (nat_of_N (node_height cfg node) < 0). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply lt_n_O. assumption. simpl in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (option_sum _ (MapGet _ (negm_of_cfg cfg) node)). intro y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim y; clear y; intros node' H4. rewrite H4. simpl in |- *. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (negm_of_cfg_OK _ H1 node node' H4). intros. split. assumption. (* Goal: BDDconfig_OK cfg *) split. inversion H6. inversion H8. assumption. split. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) apply used_nodes_preserved_refl. split. exact (proj1 (proj2 H6)). (* Goal: forall _ : @eq (option ad) (MapGet ad (negm_of_cfg cfg) node) (@None ad), and (BDDconfig_OK (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (and (config_node_OK (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end) (@snd BDDconfig ad match MapGet ad (negm_of_cfg cfg) node with | Some node' => @pair BDDconfig ad cfg node' | None => match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) exact (proj2 (proj2 H6)). intro y. rewrite y. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (option_sum _ (MapGet (BDDvar * (ad * ad)) (fst cfg) node)). intro y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim y0; clear y0. (* Goal: forall (x : prod BDDvar (prod ad ad)) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@Some (prod BDDvar (prod ad ad)) x)), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x0 (pair l r as p1) as p0) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x0 nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intro x; elim x; clear x; intros x x0; elim x0; clear x0; intros l r H4. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite H4. elim (prod_sum _ _ (BDDneg_1 cfg ul l n)). intros cfgl H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim H5; clear H5. intros nodel H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (prod_sum _ _ (BDDneg_1 cfgl (nodel :: ul) r n)). intros cfgr H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim H6; clear H6; intros noder H6. rewrite H6. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (config_node_OK (@fst BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node')) (@snd BDDconfig ad (let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node'))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (prod_sum _ _ (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intros cfg' H7; elim H7; clear H7; intros node' H7. rewrite H7. simpl in |- *. (* Goal: and (BDDconfig_OK (BDDneg_memo_put cfg' node node')) (and (config_node_OK (BDDneg_memo_put cfg' node node') node') (and (used_nodes_preserved cfg (BDDneg_memo_put cfg' node node') ul) (and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg' node node') node') (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (nat_of_N (node_height cfg l) < n). cut (nat_of_N (node_height cfg r) < n). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intros. cut (used_node' cfg ul l). cut (used_node' cfg ul r). intros. cut (BDDconfig_OK cfgl /\ config_node_OK cfgl nodel /\ used_nodes_preserved cfg cfgl ul /\ Neqb (node_height cfgl nodel) (node_height cfg l) = true /\ bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intro. elim H12; clear H12; intros. elim H13; clear H13; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim H14; clear H14; intros. elim H15; clear H15; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (config_node_OK cfg l). cut (config_node_OK cfg r). intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (used_list_OK cfgl ul). intro. cut (used_list_OK cfgl (nodel :: ul)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) intro. cut (used_node' cfgl ul r). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (used_node' cfgl (r :: ul) r). intro. cut (BDDconfig_OK cfgr /\ config_node_OK cfgr noder /\ used_nodes_preserved cfgl cfgr (nodel :: ul) /\ Neqb (node_height cfgr noder) (node_height cfgl r) = true /\ bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intros. elim H23; clear H23; intros. elim H24; clear H24; intros. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim H25; clear H25; intros. elim H26; clear H26; intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (used_list_OK cfgr (nodel :: ul)). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (used_list_OK cfgr (noder :: nodel :: ul)). intro. (* Goal: and (BDDconfig_OK (BDDneg_memo_put cfg' node node')) (and (config_node_OK (BDDneg_memo_put cfg' node node') node') (and (used_nodes_preserved cfg (BDDneg_memo_put cfg' node node') ul) (and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg' node node') node') (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (used_node' cfgr (noder :: nodel :: ul) nodel). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (used_node' cfgr (noder :: nodel :: ul) noder). intros. cut (forall (xl : BDDvar) (ll rl : ad), MapGet _ (fst cfgr) nodel = Some (xl, (ll, rl)) -> BDDcompare xl x = Datatypes.Lt). cut (forall (xr : BDDvar) (lr rr : ad), MapGet _ (fst cfgr) noder = Some (xr, (lr, rr)) -> BDDcompare xr x = Datatypes.Lt). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intros. cut (BDDconfig_OK cfg'). (* Goal: forall _ : BDDconfig_OK cfg', and (BDDconfig_OK (BDDneg_memo_put cfg' node node')) (and (config_node_OK (BDDneg_memo_put cfg' node node') node') (and (used_nodes_preserved cfg (BDDneg_memo_put cfg' node node') ul) (and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg' node node') node') (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (used_nodes_preserved cfgr cfg' (noder :: nodel :: ul)). (* Goal: forall (_ : used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul))) (_ : BDDconfig_OK cfg'), and (BDDconfig_OK (BDDneg_memo_put cfg' node node')) (and (config_node_OK (BDDneg_memo_put cfg' node node') node') (and (used_nodes_preserved cfg (BDDneg_memo_put cfg' node node') ul) (and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg' node node') node') (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (config_node_OK cfg' node'). cut (bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) cut (Neqb (node_height cfg' node') (ad_S x) = true). intros. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (config_node_OK cfg' node). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (nodes_preserved cfg' (BDDneg_memo_put cfg' node node')). intro. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (BDDconfig_OK (BDDneg_memo_put cfg' node node')). intro. split. (* Goal: BDDconfig_OK cfg *) assumption. split. apply nodes_preserved_config_node_OK with (cfg1 := cfg'). (* Goal: BDDconfig_OK cfg *) assumption. assumption. split. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfg'). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: used_nodes_preserved cfgr cfg' (@cons ad nodel ul) *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := noder). (* Goal: BDDconfig_OK cfg *) assumption. apply nodes_preserved_used_nodes_preserved. assumption. rewrite (Neqb_complete (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg' node')). (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) split. rewrite (Neqb_complete _ _ H34). unfold node_height in |- *. unfold bs_node_height in |- *. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite H4. apply Neqb_correct. (* Goal: bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg' node node') node') (bool_fun_neg (bool_fun_of_BDD cfg node)) *) (* Goal: @eq bool (N.eqb (node_height (BDDneg_memo_put cfg' node node') node') (node_height cfg' node')) true *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg' node node') *) (* Goal: nodes_preserved cfg' (BDDneg_memo_put cfg' node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfg' node'). (* Goal: BDDconfig_OK cfg *) apply nodes_preserved_bool_fun. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)). (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) (bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDneg_memo_put cfg' node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_if_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfgl r)). (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_neg_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved'_bool_fun with (ul := ul). (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg l)) (bool_fun_neg (bool_fun_of_BDD cfgl r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl nodel). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodel :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_sym. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))). (* Goal: BDDconfig_OK cfg *) apply bool_fun_neg_preserves_eq. apply bool_fun_of_BDD_int. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_neg_orthogonal. apply nodes_preserved_node_height_eq. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. apply BDDnegm_put_OK. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. rewrite (Neqb_complete _ _ H34). (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete (node_height cfg' node) (node_height cfg node)). unfold node_height in |- *. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) unfold bs_node_height in |- *. rewrite H4. apply Neqb_correct. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := noder). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)). (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) (bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDneg_memo_put cfg' node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_if_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfg r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)) *) (* Goal: bool_fun_eq (bool_fun_if x (bool_fun_neg (bool_fun_of_BDD cfg r)) (bool_fun_neg (bool_fun_of_BDD cfg l))) (bool_fun_neg (bool_fun_of_BDD cfg' node)) *) (* Goal: nodes_preserved cfg' (BDDneg_memo_put cfg' node node') *) (* Goal: config_node_OK cfg' node *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfgl r)). (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_neg_preserves_eq. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved'_bool_fun with (ul := ul). (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg l)) (bool_fun_neg (bool_fun_of_BDD cfgl r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl nodel). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodel :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg node)). apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_if x (bool_fun_of_BDD cfg r) (bool_fun_of_BDD cfg l))). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) apply bool_fun_eq_sym. apply bool_fun_neg_orthogonal. (* Goal: bool_fun_eq (bool_fun_neg bool_fun_one) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_neg_preserves_eq. apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_int. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_neg bool_fun_one) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_neg_preserves_eq. apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgl). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := noder). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply BDDnegm_put_nodes_preserved. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_node_OK' with (ul := ul) (cfg := cfg). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_nodes_preserved_trans with (cfg2 := cfgl). (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply used_nodes_preserved_trans with (cfg2 := cfgr). (* Goal: BDDconfig_OK cfg *) assumption. apply used_nodes_preserved_cons with (node := nodel). assumption. (* Goal: used_nodes_preserved cfgr cfg' ul *) (* Goal: @eq bool (N.eqb (node_height cfg' node') (ad_S x)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply used_nodes_preserved_cons with (node := nodel). (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_cons with (node := noder). assumption. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply BDDmake_node_height_eq. assumption. intros. apply not_true_is_false. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) unfold not in |- *; intro. apply eq_true_false_abs with (b := Neqb l r). (* Goal: BDDconfig_OK cfg *) apply BDDunique with (cfg := cfg). assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg l) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl r). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg l) (bool_fun_of_BDD cfgl r) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_neg_eq. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg l)) (bool_fun_neg (bool_fun_of_BDD cfgl r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgl nodel). (* Goal: BDDconfig_OK cfg *) apply bool_fun_eq_sym. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfgl r)) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgl r) (bool_fun_of_BDD cfg r) *) (* Goal: @eq bool (N.eqb l r) false *) (* Goal: @eq ad (@snd BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) node' *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)))) cfg' *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg' node') (bool_fun_if x (bool_fun_of_BDD cfgr noder) (bool_fun_of_BDD cfgr nodel)) *) (* Goal: config_node_OK cfg' node' *) (* Goal: used_nodes_preserved cfgr cfg' (@cons ad noder (@cons ad nodel ul)) *) (* Goal: BDDconfig_OK cfg' *) (* Goal: forall (xr : BDDvar) (lr rr : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xr (@pair ad ad lr rr)))), @eq comparison (BDDcompare xr x) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_of_BDD cfgr nodel). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := nodel :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) rewrite (Neqb_complete _ _ H34). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply low_high_neq with (cfg := cfg) (node := node) (x := x). assumption. assumption. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) rewrite H7. reflexivity. rewrite H7. reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: BDDconfig_OK cfg *) apply BDDmake_bool_fun. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. rewrite H7. reflexivity. rewrite H7. (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: BDDconfig_OK cfg *) apply BDDmake_node_OK. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. rewrite H7. reflexivity. rewrite H7. (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). replace node' with (snd (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: BDDconfig_OK cfg *) apply BDDmake_preserves_used_nodes. assumption. assumption. assumption. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) rewrite H7. reflexivity. rewrite H7. reflexivity. replace cfg' with (fst (BDDmake gc cfgr x nodel noder (noder :: nodel :: ul))). (* Goal: BDDconfig_OK cfg *) apply BDDmake_keeps_config_OK. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. rewrite H7. reflexivity. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) intros. rewrite (ad_S_compare xr x). (* Goal: @eq comparison (BDDcompare (ad_S xr) (ad_S x)) Lt *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace (ad_S xr) with (bs_node_height (fst cfgr) noder). (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S x)) Lt *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace (ad_S x) with (bs_node_height (fst cfg) node). unfold node_height in H26. (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node)) Lt *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) noder) (ad_S xr) *) (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete _ _ H26). cut (Neqb (node_height cfgl r) (node_height cfg r) = true). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) intro. unfold node_height in H33. rewrite (Neqb_complete _ _ H33). (* Goal: BDDconfig_OK cfg *) apply bs_node_height_right with (x := x) (l := l). exact (proj1 H1). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. unfold bs_node_height in |- *. rewrite H4. (* Goal: forall (xl : BDDvar) (ll rl : ad) (_ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (@Some (prod BDDvar (prod ad ad)) (@pair BDDvar (prod ad ad) xl (@pair ad ad ll rl)))), @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) reflexivity. unfold bs_node_height in |- *. rewrite H32. reflexivity. intros. (* Goal: @eq comparison (BDDcompare xl x) Lt *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (ad_S_compare xl x). replace (ad_S xl) with (bs_node_height (fst cfgr) nodel). (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S x)) Lt *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace (ad_S x) with (bs_node_height (fst cfg) node). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (Neqb (node_height cfgr nodel) (node_height cfgl nodel) = true). intro. (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node)) Lt *) (* Goal: @eq bool (N.eqb (node_height cfgr nodel) (node_height cfgl nodel)) true *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) unfold node_height in H33. rewrite (Neqb_complete _ _ H33). unfold node_height in H15. (* Goal: @eq comparison (BDDcompare (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgl) nodel) (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node)) Lt *) (* Goal: @eq bool (N.eqb (node_height cfgr nodel) (node_height cfgl nodel)) true *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete _ _ H15). apply bs_node_height_left with (x := x) (r := r). (* Goal: BDDconfig_OK cfg *) exact (proj1 H1). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_node_height_eq with (ul := nodel :: ul). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. apply used_node'_cons_node_ul. (* Goal: @eq N match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => ad_S x | None => N0 end (ad_S x) *) (* Goal: @eq N (bs_node_height (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfgr) nodel) (ad_S xl) *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) noder *) (* Goal: used_node' cfgr (@cons ad noder (@cons ad nodel ul)) nodel *) (* Goal: used_list_OK cfgr (@cons ad noder (@cons ad nodel ul)) *) (* Goal: used_list_OK cfgr (@cons ad nodel ul) *) (* Goal: and (BDDconfig_OK cfgr) (and (config_node_OK cfgr noder) (and (used_nodes_preserved cfgl cfgr (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height cfgr noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) unfold bs_node_height in |- *. rewrite H4. reflexivity. unfold bs_node_height in |- *. rewrite H32. (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) reflexivity. apply used_node'_cons_node_ul. apply used_node'_cons_node'_ul. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node_ul. apply node_OK_list_OK. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfgl). assumption. (* Goal: BDDconfig_OK cfg *) assumption. replace cfgr with (fst (BDDneg_1 cfgl (nodel :: ul) r n)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) noder) (and (used_nodes_preserved cfgl (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) (@cons ad nodel ul)) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) noder) (node_height cfgl r)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) noder) (bool_fun_neg (bool_fun_of_BDD cfgl r)))))) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) cfgr *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace noder with (snd (BDDneg_1 cfgl (nodel :: ul) r n)). apply H. (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (Neqb (node_height cfgl r) (node_height cfg r) = true). intro. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete _ _ H23). apply BDDcompare_lt. unfold node_height in |- *. (* Goal: BDDconfig_OK cfg *) apply bs_node_height_right with (x := x) (l := l). exact (proj1 H1). assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved'_node_height_eq with (ul := ul). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_cons_node'_ul. assumption. rewrite H6. reflexivity. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg_1 cfgl (@cons ad nodel ul) r n)) cfgr *) (* Goal: used_node' cfgl (@cons ad r ul) r *) (* Goal: used_node' cfgl ul r *) (* Goal: used_list_OK cfgl (@cons ad nodel ul) *) (* Goal: used_list_OK cfgl ul *) (* Goal: config_node_OK cfg r *) (* Goal: config_node_OK cfg l *) (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite H6. reflexivity. apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply node_OK_list_OK. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: BDDconfig_OK cfg *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: and (BDDconfig_OK cfgl) (and (config_node_OK cfgl nodel) (and (used_nodes_preserved cfg cfgl ul) (and (@eq bool (N.eqb (node_height cfgl nodel) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD cfgl nodel) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace cfgl with (fst (BDDneg_1 cfg ul l n)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDneg_1 cfg ul l n))) (and (config_node_OK (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) (@snd BDDconfig ad (BDDneg_1 cfg ul l n))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) (@snd BDDconfig ad (BDDneg_1 cfg ul l n))) (node_height cfg l)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) (@snd BDDconfig ad (BDDneg_1 cfg ul l n))) (bool_fun_neg (bool_fun_of_BDD cfg l)))))) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDneg_1 cfg ul l n)) nodel *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) replace nodel with (snd (BDDneg_1 cfg ul l n)). apply H. (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). apply BDDcompare_lt. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. apply bs_node_height_left with (x := x) (r := r). exact (proj1 H1). (* Goal: BDDconfig_OK cfg *) assumption. assumption. assumption. assumption. assumption. rewrite H5. (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg_1 cfg ul l n)) cfgl *) (* Goal: used_node' cfg ul r *) (* Goal: used_node' cfg ul l *) (* Goal: lt (N.to_nat (node_height cfg r)) n *) (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) reflexivity. rewrite H5. reflexivity. (* Goal: BDDconfig_OK cfg *) apply high_used' with (x := x) (l := l) (node := node). assumption. assumption. (* Goal: BDDconfig_OK cfg *) assumption. apply low_used' with (x := x) (r := r) (node := node). assumption. (* Goal: BDDconfig_OK cfg *) assumption. assumption. apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply BDDcompare_lt. unfold node_height in |- *. apply bs_node_height_right with (x := x) (l := l). (* Goal: BDDconfig_OK cfg *) exact (proj1 H1). assumption. assumption. (* Goal: lt (N.to_nat (node_height cfg l)) n *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply lt_trans_1 with (y := nat_of_N (node_height cfg node)). apply BDDcompare_lt. (* Goal: @eq comparison (BDDcompare (node_height cfg l) (node_height cfg node)) Lt *) (* Goal: lt (N.to_nat (node_height cfg node)) (S n) *) (* Goal: forall _ : @eq (option (prod BDDvar (prod ad ad))) (MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node) (@None (prod BDDvar (prod ad ad))), and (BDDconfig_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (config_node_OK (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (and (used_nodes_preserved cfg (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end) (@snd BDDconfig ad match MapGet (prod BDDvar (prod ad ad)) (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg) node with | Some (pair x (pair l r as p0) as p) => let (cfgl, nodel) := BDDneg_1 cfg ul l n in let (cfgr, noder) := BDDneg_1 cfgl (@cons ad nodel ul) r n in let (cfg', node') := BDDmake gc cfgr x nodel noder (@cons ad noder (@cons ad nodel ul)) in @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) ad (BDDneg_memo_put cfg' node node') node' | None => if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero end)) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) unfold node_height in |- *. apply bs_node_height_left with (x := x) (r := r). exact (proj1 H1). (* Goal: BDDconfig_OK cfg *) assumption. assumption. intro y0. rewrite y0. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) elim (sumbool_of_bool (Neqb node BDDzero)). intro y1. rewrite y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite (Neqb_complete _ _ y1). simpl in |- *. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (BDDconfig_OK (BDDneg_memo_put cfg BDDzero BDDone)). intro. split. (* Goal: BDDconfig_OK cfg *) assumption. cut (nodes_preserved cfg (BDDneg_memo_put cfg BDDzero BDDone)). (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) intro. split. apply nodes_preserved_config_node_OK with (cfg1 := cfg). (* Goal: BDDconfig_OK cfg *) assumption. apply one_OK. split. apply nodes_preserved_used_nodes_preserved. (* Goal: BDDconfig_OK cfg *) assumption. split. rewrite <- (Neqb_complete (node_height cfg BDDone) (node_height cfg BDDzero)) . (* Goal: BDDconfig_OK cfg *) apply nodes_preserved_node_height_eq. assumption. assumption. assumption. (* Goal: config_node_OK cfg BDDone *) (* Goal: config_node_OK cfg BDDzero *) (* Goal: @eq bool (N.eqb (node_height cfg BDDzero) (node_height cfg BDDone)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply one_OK. rewrite (Neqb_complete _ _ (node_height_zero _ H1)). (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_one _ H1)). reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDzero BDDone) BDDone) (bool_fun_neg (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDzero BDDone) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDzero BDDone) *) (* Goal: forall _ : @eq bool (N.eqb node BDDzero) false, and (BDDconfig_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_one). apply bool_fun_of_BDD_one. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg bool_fun_zero). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) apply bool_fun_eq_sym. exact bool_fun_neg_zero. (* Goal: bool_fun_eq (bool_fun_neg bool_fun_one) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_neg_preserves_eq. apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_zero. assumption. apply BDDnegm_put_nodes_preserved. (* Goal: BDDconfig_OK cfg *) apply BDDnegm_put_OK. assumption. apply zero_OK. apply one_OK. (* Goal: @eq bool (N.eqb (node_height cfg BDDzero) (node_height cfg BDDone)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_zero _ H1)). (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_one _ H1)). reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDone) (bool_fun_neg (bool_fun_of_BDD cfg BDDzero)) *) (* Goal: forall _ : @eq bool (N.eqb node BDDzero) false, and (BDDconfig_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (if N.eqb node BDDzero then @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDzero BDDone) BDDone else @pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) apply bool_fun_eq_trans with (bf2 := bool_fun_neg bool_fun_zero). (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_one. assumption. apply bool_fun_neg_preserves_eq. (* Goal: BDDconfig_OK cfg *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_zero. assumption. intro y1. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (config_node_OK (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) ul) (and (@eq bool (N.eqb (node_height (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero)) (@snd BDDconfig ad (@pair (prod BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod (Map ad) (prod BDDor_memo BDDuniv_memo)))))) N (BDDneg_memo_put cfg BDDone BDDzero) BDDzero))) (bool_fun_neg (bool_fun_of_BDD cfg node)))))) *) rewrite y1. simpl in |- *. cut (BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero)). (* Goal: BDDconfig_OK cfg *) intro. split. assumption. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) cut (nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero)). intro. (* Goal: BDDconfig_OK cfg *) split. apply nodes_preserved_config_node_OK with (cfg1 := cfg). assumption. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) apply zero_OK. split. apply nodes_preserved_used_nodes_preserved. (* Goal: BDDconfig_OK cfg *) assumption. elim (used_node'_OK cfg ul node H1 H2 H3). intro. (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) rewrite H6 in y1. simpl in y1. discriminate. intro. elim H6. intro. (* Goal: and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg BDDone)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone))) *) (* Goal: forall _ : @eq bool (in_dom (prod BDDvar (prod ad ad)) node (@fst BDDstate (prod BDDsharing_map (prod BDDfree_list (prod ad (prod BDDneg_memo (prod BDDor_memo BDDuniv_memo))))) cfg)) true, and (@eq bool (N.eqb (node_height (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (node_height cfg node)) true) (bool_fun_eq (bool_fun_of_BDD (BDDneg_memo_put cfg BDDone BDDzero) BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) rewrite H7. split. rewrite <- (Neqb_complete (node_height cfg BDDzero) (node_height cfg BDDone)) . (* Goal: BDDconfig_OK cfg *) apply nodes_preserved_node_height_eq. assumption. assumption. assumption. (* Goal: @eq bool (N.eqb (node_height cfg BDDzero) (node_height cfg BDDone)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply zero_OK. rewrite (Neqb_complete _ _ (node_height_zero _ H1)). (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_one _ H1)). reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg bool_fun_one) *) (* Goal: bool_fun_eq (bool_fun_neg bool_fun_one) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_eq_trans with (bf2 := bool_fun_zero). apply bool_fun_of_BDD_zero. (* Goal: BDDconfig_OK cfg *) assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_neg bool_fun_one). (* Goal: bool_fun_eq bool_fun_one (bool_fun_of_BDD cfg BDDone) *) apply bool_fun_eq_sym. exact bool_fun_neg_one. (* Goal: bool_fun_eq (bool_fun_neg bool_fun_one) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_neg_preserves_eq. apply bool_fun_eq_sym. (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_one. assumption. intro. unfold in_dom in H7. (* Goal: nodes_preserved cfg (BDDneg_memo_put cfg BDDone BDDzero) *) (* Goal: BDDconfig_OK (BDDneg_memo_put cfg BDDone BDDzero) *) rewrite y0 in H7. discriminate. apply BDDnegm_put_nodes_preserved. (* Goal: BDDconfig_OK cfg *) apply BDDnegm_put_OK. assumption. apply one_OK. apply zero_OK. (* Goal: @eq bool (N.eqb (node_height cfg BDDzero) (node_height cfg BDDone)) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_zero _ H1)). (* Goal: @eq bool (N.eqb N0 N0) true *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) rewrite (Neqb_complete _ _ (node_height_one _ H1)). reflexivity. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg BDDzero) (bool_fun_neg (bool_fun_of_BDD cfg BDDone)) *) apply bool_fun_eq_trans with (bf2 := bool_fun_neg bool_fun_one). (* Goal: BDDconfig_OK cfg *) apply bool_fun_of_BDD_zero. assumption. apply bool_fun_neg_preserves_eq. (* Goal: BDDconfig_OK cfg *) apply bool_fun_eq_sym. apply bool_fun_of_BDD_one. assumption. Qed. End BDD_neg.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import Bool. Require Import Sumbool. Require Import Arith. Require Import ZArith NArith Nnat Ndec Ndigits. From IntMap Require Import Map. From IntMap Require Import Allmaps. Require Import List. Require Import Wf_nat. Require Import Compare. Require Import Peano_dec. Require Import misc. Require Import bool_fun. Require Import myMap. Require Import config. Require Import alloc. Require Import make. Require Import or. Require Import op. Require Import tauto. Require Import gc. Require Import univ. Fixpoint ad_list_neq (l1 l2 : list ad) {struct l2} : bool := match l1, l2 with | nil, _ => true | _, nil => true | a1 :: l1', a2 :: l2' => negb (Neqb a1 a2) && ad_list_neq l1' l2' end. Definition bool_to_be (b : bool) := match b with | true => One | false => Zero end. Definition bool_to_bf (b : bool) := match b with | true => bool_fun_one | false => bool_fun_zero end. Definition bool_fun_subst (x : BDDvar) (bfx bf : bool_fun) : bool_fun := fun ve : var_env => bf (augment ve x (bfx ve)). Definition bool_fun_subst1 (x : BDDvar) (bfx bf : bool_fun) : bool_fun := bool_fun_forall x (bool_fun_impl (bool_fun_iff (bool_fun_var x) bfx) bf). Definition bool_fun_replace (x y : BDDvar) (bf : bool_fun) := bool_fun_subst x (bool_fun_var y) bf. Definition bool_fun_restrict1 (x : BDDvar) (b : bool) (bf : bool_fun) := bool_fun_subst x (bool_to_bf b) bf. Lemma bool_fun_restrict1_eq_restrict : forall (bf : bool_fun) (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict1 x b bf) (bool_fun_restrict bf x b). Proof. (* Goal: forall (bf : bool_fun) (x : BDDvar) (b : bool), bool_fun_eq (bool_fun_restrict1 x b bf) (bool_fun_restrict bf x b) *) unfold bool_fun_restrict1, bool_fun_restrict in |- *. unfold bool_fun_subst in |- *. intros. (* Goal: bool_fun_eq (fun _ : var_env => true) (fun vb : var_env => eqb (bool_fun_of_bool_expr be1 vb) (bool_fun_of_bool_expr be2 vb)) *) unfold bool_fun_eq in |- *. intro. unfold bool_to_bf in |- *. elim b. unfold bool_fun_one in |- *. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. unfold bool_fun_zero in |- *. reflexivity. Qed. Lemma bool_fun_subst_preserves_eq : forall (bf bf' bfx bfx' : bool_fun) (x : BDDvar), bool_fun_eq bf bf' -> bool_fun_eq bfx bfx' -> bool_fun_eq (bool_fun_subst x bfx bf) (bool_fun_subst x bfx' bf'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_eq, bool_fun_subst in |- *. intros. rewrite (H0 vb). apply H. Qed. Lemma bool_fun_replace_preserves_eq : forall (bf1 bf2 : bool_fun) (x y : BDDvar), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_replace x y bf1) (bool_fun_replace x y bf2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_replace in |- *. intros. apply bool_fun_subst_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply bool_fun_eq_refl. Qed. Fixpoint subst (x : BDDvar) (bex be : bool_expr) {struct be} : bool_expr := match be with | Zero => Zero | One => One | Var y => if Neqb x y then bex else be | Neg be1 => Neg (subst x bex be1) | Or be1 be2 => Or (subst x bex be1) (subst x bex be2) | ANd be1 be2 => ANd (subst x bex be1) (subst x bex be2) | Impl be1 be2 => Impl (subst x bex be1) (subst x bex be2) | Iff be1 be2 => Iff (subst x bex be1) (subst x bex be2) end. Lemma subst_ok : forall (be bex : bool_expr) (x : BDDvar), bool_fun_eq (bool_fun_of_bool_expr (subst x bex be)) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be)). Proof. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) simple induction be. compute in |- *. reflexivity. compute in |- *. reflexivity. simpl in |- *. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_subst in |- *. unfold bool_fun_eq in |- *. unfold augment in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_var in |- *. intros. elim (Neqb x b). reflexivity. reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply bool_fun_neg_preserves_eq. apply H. unfold bool_fun_neg, bool_fun_eq in |- *. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) intro. unfold bool_fun_subst in |- *. reflexivity. simpl in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_or (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b)) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b0))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply bool_fun_or_preserves_eq. apply H. apply H0. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_or, bool_fun_eq in |- *. intro. unfold bool_fun_subst in |- *. reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b)) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b0))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply bool_fun_and_preserves_eq. apply H. apply H0. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_and, bool_fun_eq in |- *. intro. unfold bool_fun_subst in |- *. reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b)) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b0))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply bool_fun_impl_preserves_eq. apply H. apply H0. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_impl, bool_fun_eq in |- *. intro. unfold bool_fun_subst in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) reflexivity. simpl in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_iff (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b)) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr b0))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply bool_fun_iff_preserves_eq. apply H. apply H0. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_iff, bool_fun_eq in |- *. intro. unfold bool_fun_subst in |- *. reflexivity. Qed. Fixpoint bool_fun_univl (bf : bool_fun) (la : list ad) {struct la} : bool_fun := match la with | nil => bf | a :: la' => bool_fun_forall a (bool_fun_univl bf la') end. Fixpoint bool_fun_exl (bf : bool_fun) (la : list ad) {struct la} : bool_fun := match la with | nil => bf | a :: la' => bool_fun_ex a (bool_fun_exl bf la') end. Lemma bool_fun_subst1_eq_subst : forall (x : BDDvar) bfx (bf : bool_fun), bool_fun_independent bfx x -> bool_fun_eq (bool_fun_subst1 x bfx bf) (bool_fun_subst x bfx bf). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_subst1, bool_fun_subst in |- *. intros. unfold bool_fun_eq in |- *. intro. (* Goal: forall (be1 be2 be1' be2' : bool_expr) (_ : forall ve : var_env', @eq bool (bool_fun_of_bool_expr be1 (var_env'_to_env ve)) (bool_fun_of_bool_expr be1' (var_env'_to_env ve))) (_ : forall ve : var_env', @eq bool (bool_fun_of_bool_expr be2 (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) (ve : var_env'), @eq bool (bool_fun_iff (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) (var_env'_to_env ve)) (bool_fun_iff (bool_fun_of_bool_expr be1') (bool_fun_of_bool_expr be2') (var_env'_to_env ve)) *) unfold bool_fun_iff in |- *. unfold bool_fun_forall in |- *. unfold bool_fun_restrict in |- *. (* Goal: @eq bool (andb (implb (eqb (bool_fun_var x (augment vb x true)) (bfx (augment vb x true))) (bf (augment vb x true))) (implb (eqb (bool_fun_var x (augment vb x false)) (bfx (augment vb x false))) (bf (augment vb x false)))) (bf (augment vb x (bfx vb))) *) unfold bool_fun_and, bool_fun_impl in |- *. unfold bool_fun_var in |- *. unfold augment at 1 4 in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) rewrite (Neqb_correct x). simpl in |- *. unfold bool_fun_independent in H. (* Goal: @eq bool (andb (implb (if bfx (augment vb x true) then true else false) (bf (augment vb x true))) (implb (if bfx (augment vb x false) then false else true) (bf (augment vb x false)))) (bf (augment vb x (bfx vb))) *) unfold bool_fun_restrict in H. unfold bool_fun_eq in H. (* Goal: @eq bool (andb (implb (if bfx (augment vb x true) then true else false) (bf (augment vb x true))) (implb (if bfx (augment vb x false) then false else true) (bf (augment vb x false)))) (bf (augment vb x (bfx vb))) *) rewrite (H true vb). rewrite (H false vb). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) elim (sumbool_of_bool (bfx vb)). intro y. rewrite y. simpl in |- *. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) elim (bf (augment vb x true)); reflexivity. intro y. rewrite y. simpl in |- *. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Definition restrict (x : BDDvar) (b : bool) (be : bool_expr) := subst x (bool_to_be b) be. Lemma bool_fun_restrict_eq_subst : forall (x : BDDvar) (b : bool) (bf : bool_fun), bool_fun_eq (bool_fun_restrict bf x b) (bool_fun_subst x (bool_to_bf b) bf). Proof. (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_restrict in |- *. unfold bool_fun_subst in |- *. intros. (* Goal: bool_fun_eq (fun _ : var_env => true) (fun vb : var_env => eqb (bool_fun_of_bool_expr be1 vb) (bool_fun_of_bool_expr be2 vb)) *) unfold bool_fun_eq in |- *. intro. elim b; reflexivity. Qed. Lemma bool_to_be_to_bf : forall b : bool, bool_fun_of_bool_expr (bool_to_be b) = bool_to_bf b. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim b; reflexivity. Qed. Lemma restrict_OK : forall (x : BDDvar) (b : bool) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (restrict x b be)) (bool_fun_restrict (bool_fun_of_bool_expr be) x b). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold restrict in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_subst x (bool_to_bf b) (bool_fun_of_bool_expr be)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (subst x (bool_to_be b) be)) (bool_fun_subst x (bool_to_bf b) (bool_fun_of_bool_expr be)) *) (* Goal: bool_fun_eq (bool_fun_subst x (bool_to_bf b) (bool_fun_of_bool_expr be)) (bool_fun_restrict (bool_fun_of_bool_expr be) x b) *) rewrite <- (bool_to_be_to_bf b). apply subst_ok. apply bool_fun_eq_sym. (* Goal: bool_fun_eq (bool_fun_restrict (bool_fun_of_bool_expr be) x b) (bool_fun_subst x (bool_to_bf b) (bool_fun_of_bool_expr be)) *) apply bool_fun_restrict_eq_subst. Qed. Definition forall_ (x : BDDvar) (be : bool_expr) : bool_expr := ANd (restrict x true be) (restrict x false be). Definition be_ex (x : BDDvar) (be : bool_expr) : bool_expr := Or (restrict x true be) (restrict x false be). Lemma forall_OK : forall (x : BDDvar) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (forall_ x be)) (bool_fun_forall x (bool_fun_of_bool_expr be)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold forall_, bool_fun_forall in |- *. intros. simpl in |- *. (* Goal: bool_fun_eq (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) (bool_fun_and (bool_fun_of_BDD cfg nodet) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')) *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply bool_fun_and_preserves_eq. apply restrict_OK. apply restrict_OK. Qed. Lemma ex_OK : forall (x : BDDvar) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (be_ex x be)) (bool_fun_ex x (bool_fun_of_bool_expr be)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_ex, bool_fun_ex in |- *. intros. simpl in |- *. (* Goal: bool_fun_eq (bool_fun_or (bool_fun_of_bool_expr (restrict x true be)) (bool_fun_of_bool_expr (restrict x false be))) (bool_fun_or (bool_fun_restrict (bool_fun_of_bool_expr be) x true) (bool_fun_restrict (bool_fun_of_bool_expr be) x false)) *) apply bool_fun_or_preserves_eq. apply restrict_OK. apply restrict_OK. Qed. Fixpoint univl (be : bool_expr) (la : list ad) {struct la} : bool_expr := match la with | nil => be | a :: la' => forall_ a (univl be la') end. Fixpoint exl (be : bool_expr) (la : list ad) {struct la} : bool_expr := match la with | nil => be | a :: la' => be_ex a (exl be la') end. Lemma univl_OK : forall (la : list ad) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (univl be la)) (bool_fun_univl (bool_fun_of_bool_expr be) la). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction la. intro. apply bool_fun_eq_refl. intros. (* Goal: bool_fun_eq (bool_fun_of_bool_expr (univl be (@cons ad a l))) (bool_fun_univl (bool_fun_of_bool_expr be) (@cons ad a l)) *) replace (univl be (a :: l)) with (forall_ a (univl be l)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (forall_ a (univl be l))) (bool_fun_univl (bool_fun_of_bool_expr be) (@cons ad a l)) *) (* Goal: @eq bool_expr (forall_ a (univl be l)) (univl be (@cons ad a l)) *) unfold bool_fun_univl in |- *. fold bool_fun_univl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_forall a (bool_fun_of_bool_expr (univl be l))). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply forall_OK. apply bool_fun_forall_preserves_eq. apply H. reflexivity. Qed. Lemma exl_OK : forall (la : list ad) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (exl be la)) (bool_fun_exl (bool_fun_of_bool_expr be) la). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction la. intro. apply bool_fun_eq_refl. intros. (* Goal: bool_fun_eq (bool_fun_of_bool_expr (exl be (@cons ad a l))) (bool_fun_exl (bool_fun_of_bool_expr be) (@cons ad a l)) *) replace (exl be (a :: l)) with (be_ex a (exl be l)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (be_ex a (exl be l))) (bool_fun_exl (bool_fun_of_bool_expr be) (@cons ad a l)) *) (* Goal: @eq bool_expr (be_ex a (exl be l)) (exl be (@cons ad a l)) *) unfold bool_fun_exl in |- *. fold bool_fun_exl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_ex a (bool_fun_of_bool_expr (exl be l))). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply ex_OK. apply bool_fun_ex_preserves_eq. apply H. reflexivity. Qed. Definition replace (x y : BDDvar) (be : bool_expr) := subst x (Var y) be. Lemma replace_OK : forall (x y : BDDvar) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (replace x y be)) (bool_fun_replace x y (bool_fun_of_bool_expr be)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold replace, bool_fun_replace in |- *. intros. simpl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_subst x (bool_fun_of_bool_expr (Var y)) (bool_fun_of_bool_expr be)). (* Goal: bool_fun_eq (bool_fun_subst x (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@snd BDDconfig ad (BDDvar_make gc cfg ul y))) (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) node)) (bool_fun_subst x (bool_fun_var y) (bool_fun_of_BDD cfg node)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) nodey *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) apply subst_ok. apply bool_fun_subst_preserves_eq. apply bool_fun_eq_refl. (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) simpl in |- *. apply bool_fun_eq_refl. Qed. Fixpoint replacel (be : bool_expr) (lx ly : list ad) {struct ly} : bool_expr := match lx, ly with | nil, _ => be | _ :: _, nil => (* error *) be | x :: lx', y :: ly' => replace x y (replacel be lx' ly') end. Fixpoint bool_fun_replacel (bf : bool_fun) (lx ly : list ad) {struct ly} : bool_fun := match lx, ly with | nil, _ => bf | _ :: _, nil => (* error *) bf | x :: lx', y :: ly' => bool_fun_replace x y (bool_fun_replacel bf lx' ly') end. Lemma replacel_OK : forall (lx ly : list ad) (be : bool_expr), bool_fun_eq (bool_fun_of_bool_expr (replacel be lx ly)) (bool_fun_replacel (bool_fun_of_bool_expr be) lx ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lx. simpl in |- *. intros. elim ly; intros; apply bool_fun_eq_refl. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros a l ly. intros. elim ly0. apply bool_fun_eq_refl. intros. simpl in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_replace a a0 (bool_fun_of_bool_expr (replacel be l l0))). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (replace a a0 (replacel be l l0))) (bool_fun_replace a a0 (bool_fun_of_bool_expr (replacel be l l0))) *) (* Goal: bool_fun_eq (bool_fun_replace a a0 (bool_fun_of_bool_expr (replacel be l l0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_bool_expr be) l l0)) *) apply replace_OK. apply bool_fun_replace_preserves_eq. apply ly. Qed. Section BDDquant. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Section BDDuniv_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable y : BDDvar. Variable node : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Definition BDDuniv := BDDuniv_1 gc cfg ul node y (S (nat_of_N (node_height cfg node))). Let lt_1 : nat_of_N (node_height cfg node) < S (nat_of_N (node_height cfg node)). Proof. (* Goal: lt n0 (S n0) *) unfold lt in |- *. apply le_n. Qed. Lemma BDDuniv_config_OK : BDDconfig_OK (fst BDDuniv). Proof. exact (proj1 (BDDuniv_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul y node lt_1 cfg_OK ul_OK used)). Qed. Lemma BDDuniv_node_OK : config_node_OK (fst BDDuniv) (snd BDDuniv). Proof. exact (proj1 (proj2 (BDDuniv_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul y node lt_1 cfg_OK ul_OK used))). Qed. Lemma BDDuniv_used_nodes_preserved : used_nodes_preserved cfg (fst BDDuniv) ul. Proof. exact (proj1 (proj2 (proj2 (BDDuniv_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul y node lt_1 cfg_OK ul_OK used)))). Qed. Lemma BDDuniv_is_univ : bool_fun_eq (bool_fun_of_BDD (fst BDDuniv) (snd BDDuniv)) (bool_fun_forall y (bool_fun_of_BDD cfg node)). Proof. exact (proj2 (proj2 (proj2 (proj2 (BDDuniv_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul y node lt_1 cfg_OK ul_OK used))))). Qed. Lemma BDDuniv_list_OK : used_list_OK (fst BDDuniv) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDuniv) ul *) exact BDDuniv_used_nodes_preserved. Qed. Lemma BDDuniv_list_OK_cons : used_list_OK (fst BDDuniv) (snd BDDuniv :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDuniv_node_OK. exact BDDuniv_list_OK. Qed. Lemma BDDuniv_var_le : Nleb (node_height (fst BDDuniv) (snd BDDuniv)) (node_height cfg node) = true. Proof. exact (proj1 (proj2 (proj2 (proj2 (BDDuniv_1_lemma gc gc_is_OK (S (nat_of_N (node_height cfg node))) cfg ul y node lt_1 cfg_OK ul_OK used))))). Qed. End BDDuniv_results. Section BDDex_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable y : BDDvar. Variable node : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Definition BDDex := match BDDneg gc cfg ul node with | (cfg1, node1) => match BDDuniv cfg1 (node1 :: ul) y node1 with | (cfg2, node2) => BDDneg gc cfg2 (node2 :: ul) node2 end end. Lemma BDDex_config_OK : BDDconfig_OK (fst BDDex). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDex) (@snd BDDconfig ad BDDex)) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) unfold BDDex in |- *. elim (prod_sum _ _ (BDDneg gc cfg ul node)). intros cfg1 H. (* Goal: and (le N m) (lt m (Init.Nat.add N O)) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 n)), and (le N m) (lt m (Init.Nat.add N n))) (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 (S n))), and (le N m) (lt m (Init.Nat.add N (S n))) *) elim H. clear H. intros node1 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) elim (prod_sum _ _ (BDDuniv cfg1 (node1 :: ul) y node1)). intros cfg2 H0. (* Goal: and (le N m) (lt m (Init.Nat.add N (S n0))) *) elim H0. clear H0. intros node2 H0. rewrite H0. cut (BDDconfig_OK cfg1). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. cut (used_nodes_preserved cfg cfg1 ul). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfg1 (node1 :: ul)). intro. apply BDDneg_config_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_config_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) cfg2 *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2 with (snd (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_node_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. rewrite H0. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply cons_OK_list_OK with (node := node1). apply BDDuniv_list_OK. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) (@cons ad node1 ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1 with (snd (BDDneg gc cfg ul node)). apply BDDneg_list_OK_cons. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). apply BDDneg_config_OK. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDex_node_OK : config_node_OK (fst BDDex) (snd BDDex). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDex) (@snd BDDconfig ad BDDex)) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) unfold BDDex in |- *. elim (prod_sum _ _ (BDDneg gc cfg ul node)). intros cfg1 H. (* Goal: and (le N m) (lt m (Init.Nat.add N O)) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 n)), and (le N m) (lt m (Init.Nat.add N n))) (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 (S n))), and (le N m) (lt m (Init.Nat.add N (S n))) *) elim H. clear H. intros node1 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) elim (prod_sum _ _ (BDDuniv cfg1 (node1 :: ul) y node1)). intros cfg2 H0. (* Goal: and (le N m) (lt m (Init.Nat.add N (S n0))) *) elim H0. clear H0. intros node2 H0. rewrite H0. cut (BDDconfig_OK cfg1). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. cut (used_nodes_preserved cfg cfg1 ul). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfg1 (node1 :: ul)). intro. apply BDDneg_node_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_config_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) cfg2 *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2 with (snd (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_node_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. rewrite H0. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply cons_OK_list_OK with (node := node1). apply BDDuniv_list_OK. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) (@cons ad node1 ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1 with (snd (BDDneg gc cfg ul node)). apply BDDneg_list_OK_cons. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). apply BDDneg_config_OK. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDex_used_nodes_preserved : used_nodes_preserved cfg (fst BDDex) ul. Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDex) (@snd BDDconfig ad BDDex)) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) unfold BDDex in |- *. elim (prod_sum _ _ (BDDneg gc cfg ul node)). intros cfg1 H. (* Goal: and (le N m) (lt m (Init.Nat.add N O)) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 n)), and (le N m) (lt m (Init.Nat.add N n))) (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 (S n))), and (le N m) (lt m (Init.Nat.add N (S n))) *) elim H. clear H. intros node1 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) elim (prod_sum _ _ (BDDuniv cfg1 (node1 :: ul) y node1)). intros cfg2 H0. (* Goal: and (le N m) (lt m (Init.Nat.add N (S n0))) *) elim H0. clear H0. intros node2 H0. rewrite H0. cut (BDDconfig_OK cfg1). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. cut (used_nodes_preserved cfg cfg1 ul). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfg1 (node1 :: ul)). intro. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: @eq bool (ad_list_neq l l0) true *) apply used_nodes_preserved_cons with (node := node1). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_used_nodes_preserved. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_nodes_preserved cfg2 (@fst BDDconfig ad (BDDneg gc cfg2 (@cons ad node2 ul) node2)) ul *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node2). (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDneg gc cfg ul node)) ul *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: BDDconfig_OK cfg1 *) apply BDDneg_used_nodes_preserved. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_config_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) cfg2 *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2 with (snd (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_node_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. rewrite H0. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply cons_OK_list_OK with (node := node1). apply BDDuniv_list_OK. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) (@cons ad node1 ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1 with (snd (BDDneg gc cfg ul node)). apply BDDneg_list_OK_cons. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). apply BDDneg_config_OK. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDex_is_ex : bool_fun_eq (bool_fun_of_BDD (fst BDDex) (snd BDDex)) (bool_fun_ex y (bool_fun_of_BDD cfg node)). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDex) (@snd BDDconfig ad BDDex)) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) unfold BDDex in |- *. elim (prod_sum _ _ (BDDneg gc cfg ul node)). intros cfg1 H. (* Goal: and (le N m) (lt m (Init.Nat.add N O)) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 n)), and (le N m) (lt m (Init.Nat.add N n))) (m : nat) (_ : @In BinNums.N (N.of_nat m) (lx'_1 (S n))), and (le N m) (lt m (Init.Nat.add N (S n))) *) elim H. clear H. intros node1 H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2)) (@snd BDDconfig ad (let (cfg2, node2) := BDDuniv cfg1 (@cons ad node1 ul) y node1 in BDDneg gc cfg2 (@cons ad node2 ul) node2))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) elim (prod_sum _ _ (BDDuniv cfg1 (node1 :: ul) y node1)). intros cfg2 H0. (* Goal: and (le N m) (lt m (Init.Nat.add N (S n0))) *) elim H0. clear H0. intros node2 H0. rewrite H0. cut (BDDconfig_OK cfg1). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. cut (used_nodes_preserved cfg cfg1 ul). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfg1 (node1 :: ul)). intro. apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))). apply bool_fun_eq_trans with (bf2 := bool_fun_neg (bool_fun_of_BDD cfg2 node2)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDneg_is_neg. assumption. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_config_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) cfg2 *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2 with (snd (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_node_OK. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. rewrite H0. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply cons_OK_list_OK with (node := node1). apply BDDuniv_list_OK. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply used_node'_cons_node_ul. rewrite H0. reflexivity. (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_of_BDD cfg2 node2)) (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_node'_cons_node_ul. apply bool_fun_neg_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_forall y (bool_fun_of_BDD cfg1 node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) node2) (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDuniv cfg1 (@cons ad node1 ul) y node1)) cfg2 *) (* Goal: bool_fun_eq (bool_fun_forall y (bool_fun_of_BDD cfg1 node1)) (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node))) *) (* Goal: bool_fun_eq (bool_fun_neg (bool_fun_forall y (bool_fun_neg (bool_fun_of_BDD cfg node)))) (bool_fun_ex y (bool_fun_of_BDD cfg node)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node2 with (snd (BDDuniv cfg1 (node1 :: ul) y node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_is_univ. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H0. reflexivity. rewrite H0. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. apply bool_fun_forall_preserves_eq. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) (@cons ad node1 ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1 with (snd (BDDneg gc cfg ul node)). apply BDDneg_is_neg. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H. reflexivity. apply bool_fun_eq_sym. apply bool_fun_ex_lemma. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: used_list_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) (@cons ad node1 ul) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node1 with (snd (BDDneg gc cfg ul node)). apply BDDneg_list_OK_cons. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H. reflexivity. replace cfg1 with (fst (BDDneg gc cfg ul node)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDneg_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H. reflexivity. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDneg gc cfg ul node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDneg gc cfg ul node)) cfg1 *) replace cfg1 with (fst (BDDneg gc cfg ul node)). apply BDDneg_config_OK. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. assumption. rewrite H. reflexivity. Qed. Lemma BDDex_list_OK : used_list_OK (fst BDDex) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDex) ul *) exact BDDex_used_nodes_preserved. Qed. Lemma BDDex_list_OK_cons : used_list_OK (fst BDDex) (snd BDDex :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. apply BDDex_node_OK. exact BDDex_list_OK. Qed. (* Lemma BDDex_var_le : (Nleb (node_height (Fst BDDex) (Snd BDDex)) (node_height cfg node))=true. Proof. Qed. *) End BDDex_results. Fixpoint BDDunivl (cfg : BDDconfig) (ul : list ad) (node : ad) (ly : list BDDvar) {struct ly} : BDDconfig * ad := match ly with | nil => (cfg, node) | y :: ly' => match BDDunivl cfg ul node ly' with | (cfg1, node1) => BDDuniv cfg1 (node1 :: ul) y node1 end end. Lemma BDDunivl_lemma : forall (ly : list BDDvar) (cfg : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> BDDconfig_OK (fst (BDDunivl cfg ul node ly)) /\ config_node_OK (fst (BDDunivl cfg ul node ly)) (snd (BDDunivl cfg ul node ly)) /\ used_nodes_preserved cfg (fst (BDDunivl cfg ul node ly)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDunivl cfg ul node ly)) (snd (BDDunivl cfg ul node ly))) (bool_fun_univl (bool_fun_of_BDD cfg node) ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction ly. simpl in |- *. intros. split. assumption. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) split. apply used_nodes_preserved_refl. apply bool_fun_eq_refl. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) simpl in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1)) (@snd BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1)) (@snd BDDconfig ad (let (cfg1, node1) := BDDunivl cfg ul node l in BDDuniv cfg1 (@cons ad node1 ul) a node1))) (bool_fun_forall a (bool_fun_univl (bool_fun_of_BDD cfg node) l))))) *) elim (prod_sum _ _ (BDDunivl cfg ul node l)). intros cfg1 H3. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) elim H3; clear H3. intros node1 H3. rewrite H3. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (H cfg ul node H0 H1 H2). intros. elim H5. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) rewrite H3 in H4. rewrite H3 in H6. rewrite H3 in H7. elim H7. intros. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) *) (* Goal: and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)))) *) (* Goal: used_node' cfg3 (@cons ad node4 ul) node4 *) (* Goal: used_list_OK cfg3 (@cons ad node4 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg3 node4) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node1)) *) (* Goal: config_node_OK cfg3 node4 *) (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) split. apply BDDuniv_config_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_cons_node_ul. split. apply BDDuniv_node_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: @eq bool (ad_list_neq l l0) true *) apply used_nodes_preserved_cons with (node := node1). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_used_nodes_preserved. assumption. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_forall a (bool_fun_of_BDD cfg1 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_is_univ. assumption. apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: bool_fun_eq (bool_fun_forall a (bool_fun_univl bf1 l0)) (bool_fun_forall a (bool_fun_univl bf2 l0)) *) apply used_node'_cons_node_ul. apply bool_fun_forall_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) assumption. Qed. Section BDDunivl_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node : ad. Variable ly : list BDDvar. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Lemma BDDunivl_config_OK : BDDconfig_OK (fst (BDDunivl cfg ul node ly)). Proof. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDunivl cfg ul node ly)) *) exact (proj1 (BDDunivl_lemma ly cfg ul node cfg_OK ul_OK used)). Qed. Lemma BDDunivl_node_OK : config_node_OK (fst (BDDunivl cfg ul node ly)) (snd (BDDunivl cfg ul node ly)). Proof. (* Goal: config_node_OK (@fst BDDconfig ad (BDDunivl cfg ul node ly)) (@snd BDDconfig ad (BDDunivl cfg ul node ly)) *) exact (proj1 (proj2 (BDDunivl_lemma ly cfg ul node cfg_OK ul_OK used))). Qed. Lemma BDDunivl_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDunivl cfg ul node ly)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDunivl_lemma ly cfg ul node cfg_OK ul_OK used)))). Qed. Lemma BDDunivl_list_OK : used_list_OK (fst (BDDunivl cfg ul node ly)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDunivl cfg ul node ly)) ul *) exact BDDunivl_used_nodes_preserved. Qed. Lemma BDDunivl_list_OK_cons : used_list_OK (fst (BDDunivl cfg ul node ly)) (snd (BDDunivl cfg ul node ly) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDunivl_node_OK. exact BDDunivl_list_OK. Qed. Lemma BDDunivl_is_univl : bool_fun_eq (bool_fun_of_BDD (fst (BDDunivl cfg ul node ly)) (snd (BDDunivl cfg ul node ly))) (bool_fun_univl (bool_fun_of_BDD cfg node) ly). Proof. exact (proj2 (proj2 (proj2 (BDDunivl_lemma ly cfg ul node cfg_OK ul_OK used)))). Qed. End BDDunivl_results. Fixpoint BDDexl (cfg : BDDconfig) (ul : list ad) (node : ad) (ly : list BDDvar) {struct ly} : BDDconfig * ad := match ly with | nil => (cfg, node) | y :: ly' => match BDDexl cfg ul node ly' with | (cfg1, node1) => BDDex cfg1 (node1 :: ul) y node1 end end. Lemma BDDexl_lemma : forall (ly : list BDDvar) (cfg : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> BDDconfig_OK (fst (BDDexl cfg ul node ly)) /\ config_node_OK (fst (BDDexl cfg ul node ly)) (snd (BDDexl cfg ul node ly)) /\ used_nodes_preserved cfg (fst (BDDexl cfg ul node ly)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDexl cfg ul node ly)) (snd (BDDexl cfg ul node ly))) (bool_fun_exl (bool_fun_of_BDD cfg node) ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction ly. simpl in |- *. intros. split. assumption. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) split. apply used_nodes_preserved_refl. apply bool_fun_eq_refl. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) simpl in |- *. (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul x) (@pair BDDconfig ad x0 b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) elim (prod_sum _ _ (BDDexl cfg ul node l)). intros cfg1 H3. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) elim H3; clear H3. intros node1 H3. rewrite H3. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (H cfg ul node H0 H1 H2). intros. elim H5. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) rewrite H3 in H4. rewrite H3 in H6. rewrite H3 in H7. elim H7. intros. (* Goal: and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))) *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) split. apply BDDex_config_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_cons_node_ul. split. apply BDDex_node_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: @eq bool (ad_list_neq l l0) true *) apply used_nodes_preserved_cons with (node := node1). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDex_used_nodes_preserved. assumption. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_ex a (bool_fun_of_BDD cfg1 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDex_is_ex. assumption. apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: bool_fun_eq (bool_fun_ex a (bool_fun_exl bf1 l0)) (bool_fun_ex a (bool_fun_exl bf2 l0)) *) apply used_node'_cons_node_ul. apply bool_fun_ex_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) assumption. Qed. Section BDDexl_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node : ad. Variable ly : list BDDvar. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Lemma BDDexl_config_OK : BDDconfig_OK (fst (BDDexl cfg ul node ly)). Proof. (* Goal: BDDconfig_OK (@fst BDDconfig ad (BDDexl cfg ul node ly)) *) exact (proj1 (BDDexl_lemma ly cfg ul node cfg_OK ul_OK used)). Qed. Lemma BDDexl_node_OK : config_node_OK (fst (BDDexl cfg ul node ly)) (snd (BDDexl cfg ul node ly)). Proof. (* Goal: config_node_OK (@fst BDDconfig ad (BDDexl cfg ul node ly)) (@snd BDDconfig ad (BDDexl cfg ul node ly)) *) exact (proj1 (proj2 (BDDexl_lemma ly cfg ul node cfg_OK ul_OK used))). Qed. Lemma BDDexl_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDexl cfg ul node ly)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDexl_lemma ly cfg ul node cfg_OK ul_OK used)))). Qed. Lemma BDDexl_list_OK : used_list_OK (fst (BDDexl cfg ul node ly)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl cfg ul node ly)) ul *) exact BDDexl_used_nodes_preserved. Qed. Lemma BDDexl_list_OK_cons : used_list_OK (fst (BDDexl cfg ul node ly)) (snd (BDDexl cfg ul node ly) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDexl_node_OK. exact BDDexl_list_OK. Qed. Lemma BDDexl_is_exl : bool_fun_eq (bool_fun_of_BDD (fst (BDDexl cfg ul node ly)) (snd (BDDexl cfg ul node ly))) (bool_fun_exl (bool_fun_of_BDD cfg node) ly). Proof. exact (proj2 (proj2 (proj2 (BDDexl_lemma ly cfg ul node cfg_OK ul_OK used)))). Qed. End BDDexl_results. Definition BDDsubst (cfg : BDDconfig) (ul : list ad) (node1 : ad) (x : BDDvar) (node2 : ad) := match BDDvar_make gc cfg ul x with | (cfg1, nodex) => match BDDiff gc cfg1 (nodex :: ul) nodex node2 with | (cfg2, node3) => match BDDimpl gc cfg2 (node3 :: ul) node3 node1 with | (cfg3, node4) => BDDuniv cfg3 (node4 :: ul) x node4 end end end. Lemma BDDsubst_lemma : forall (cfg : BDDconfig) (ul : list ad) (node1 : ad) (x : BDDvar) (node2 : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node1 -> used_node' cfg ul node2 -> BDDconfig_OK (fst (BDDsubst cfg ul node1 x node2)) /\ config_node_OK (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2)) /\ used_nodes_preserved cfg (fst (BDDsubst cfg ul node1 x node2)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold BDDsubst in |- *. elim (prod_sum _ _ (BDDvar_make gc cfg ul x)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul x) (@pair BDDconfig ad x0 b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg1, nodex) := BDDvar_make gc cfg ul x in let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) intros cfg1 H3. elim H3; clear H3. intros nodex H3. rewrite H3. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) elim (prod_sum _ _ (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDiff gc cfg1 (@cons ad nodex ul) nodex node2) (@pair BDDconfig ad x0 b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg2, node3) := BDDiff gc cfg1 (@cons ad nodex ul) nodex node2 in let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) intros cfg2 H4. elim H4; clear H4; intros node3 H4. rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) elim (prod_sum _ _ (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1) (@pair BDDconfig ad x0 b))), and (BDDconfig_OK (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (let (cfg3, node4) := BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1 in BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) intros cfg3 H5. elim H5; clear H5; intros node4 H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) cut (BDDconfig_OK cfg1). cut (used_nodes_preserved cfg cfg1 ul). (* Goal: forall (_ : used_nodes_preserved cfg cfg1 ul) (_ : BDDconfig_OK cfg1), and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (config_node_OK cfg1 nodex). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x)). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_list_OK cfg1 (nodex :: ul)). (* Goal: forall _ : used_list_OK cfg1 (@cons ad nodex ul), and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg1 (nodex :: ul) nodex). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_node' cfg1 (nodex :: ul) node2). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg2). (* Goal: forall _ : BDDconfig_OK cfg2, and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg1 cfg2 (nodex :: ul)). (* Goal: forall (_ : used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul)) (_ : BDDconfig_OK cfg2), and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (config_node_OK cfg2 node3). cut (bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2))). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. cut (used_list_OK cfg2 (node3 :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_node' cfg2 (node3 :: ul) node1). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_node' cfg2 (node3 :: ul) node3). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (BDDconfig_OK cfg3). (* Goal: forall _ : BDDconfig_OK cfg3, and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (used_nodes_preserved cfg2 cfg3 (node3 :: ul)). (* Goal: forall (_ : used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul)) (_ : BDDconfig_OK cfg3), and (BDDconfig_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (config_node_OK (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1))))) *) (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) cut (config_node_OK cfg3 node4). cut (bool_fun_eq (bool_fun_of_BDD cfg3 node4) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node1))). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. cut (used_list_OK cfg3 (node4 :: ul)). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_node' cfg3 (node4 :: ul) node4). intro. split. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_config_OK. assumption. assumption. assumption. split. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_node_OK. assumption. assumption. assumption. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg2). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := nodex). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg3). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := node3). assumption. (* Goal: used_nodes_preserved cfg3 (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4)) (@snd BDDconfig ad (BDDuniv cfg3 (@cons ad node4 ul) x node4))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)) *) (* Goal: used_node' cfg3 (@cons ad node4 ul) node4 *) (* Goal: used_list_OK cfg3 (@cons ad node4 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg3 node4) (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node1)) *) (* Goal: config_node_OK cfg3 node4 *) (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) apply used_nodes_preserved_cons with (node := node4). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_used_nodes_preserved. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_forall x (bool_fun_of_BDD cfg3 node4)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDuniv_is_univ. assumption. assumption. assumption. apply bool_fun_eq_trans with (bf2 := bool_fun_forall x (bool_fun_impl (bool_fun_of_BDD cfg2 node3) (bool_fun_of_BDD cfg2 node1))). (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_forall_preserves_eq. assumption. unfold bool_fun_subst1 in |- *. (* Goal: bool_fun_eq (bool_fun_impl (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) (bool_fun_impl (bool_fun_of_BDD cfg nodet) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')) *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_impl (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply bool_fun_forall_preserves_eq. apply bool_fun_impl_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)). (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply bool_fun_iff_preserves_eq. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := nodex). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg2). (* Goal: @eq bool (be_x_free x b0) true *) apply cons_OK_list_OK with (node := node3). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := node3). assumption. (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1)) cfg3 *) (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDimpl_is_impl. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H5. reflexivity. rewrite H5. reflexivity. (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1)) node4 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDimpl gc cfg2 (@cons ad node3 ul) node3 node1)) cfg3 *) (* Goal: used_nodes_preserved cfg2 cfg3 (@cons ad node3 ul) *) (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node4 with (snd (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDimpl_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H5. reflexivity. rewrite H5. reflexivity. (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDimpl_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. rewrite H5. reflexivity. (* Goal: BDDconfig_OK cfg3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node3 *) (* Goal: used_node' cfg2 (@cons ad node3 ul) node1 *) (* Goal: used_list_OK cfg2 (@cons ad node3 ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg2 node3) (bool_fun_iff (bool_fun_of_BDD cfg1 nodex) (bool_fun_of_BDD cfg1 node2)) *) (* Goal: config_node_OK cfg2 node3 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg3 with (fst (BDDimpl gc cfg2 (node3 :: ul) node3 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDimpl_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H5. reflexivity. apply used_node'_cons_node_ul. (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := nodex). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := nodex). assumption. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDiff gc cfg1 (@cons ad nodex ul) nodex node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDiff gc cfg1 (@cons ad nodex ul) nodex node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDiff_is_iff. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDiff gc cfg1 (@cons ad nodex ul) nodex node2)) node3 *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDiff gc cfg1 (@cons ad nodex ul) nodex node2)) cfg2 *) (* Goal: used_nodes_preserved cfg1 cfg2 (@cons ad nodex ul) *) (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace node3 with (snd (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDiff_node_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H4; reflexivity. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDiff_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfg2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) node2 *) (* Goal: used_node' cfg1 (@cons ad nodex ul) nodex *) (* Goal: used_list_OK cfg1 (@cons ad nodex ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfg1 nodex) (bool_fun_var x) *) (* Goal: config_node_OK cfg1 nodex *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace cfg2 with (fst (BDDiff gc cfg1 (nodex :: ul) nodex node2)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDiff_config_OK. assumption. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite H4; reflexivity. apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfg1 with (fst (BDDvar_make gc cfg ul x)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDvar_make gc cfg ul x)) nodex *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul x)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace nodex with (snd (BDDvar_make gc cfg ul x)). apply BDDvar_make_is_var. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. assumption. rewrite H3; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H3; reflexivity. replace cfg1 with (fst (BDDvar_make gc cfg ul x)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDvar_make gc cfg ul x)) nodex *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul x)) cfg1 *) (* Goal: used_nodes_preserved cfg cfg1 ul *) (* Goal: BDDconfig_OK cfg1 *) replace nodex with (snd (BDDvar_make gc cfg ul x)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_node_OK. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H3; reflexivity. rewrite H3; reflexivity. (* Goal: BDDconfig_OK cfg1 *) replace cfg1 with (fst (BDDvar_make gc cfg ul x)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H3; reflexivity. replace cfg1 with (fst (BDDvar_make gc cfg ul x)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_config_OK. assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H3; reflexivity. Qed. Section BDDsubst_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node1 node2 : ad. Variable x : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used1 : used_node' cfg ul node1. Hypothesis used2 : used_node' cfg ul node2. Hypothesis node2_ind : bool_fun_independent (bool_fun_of_BDD cfg node2) x. Lemma BDDsubst_config_OK : BDDconfig_OK (fst (BDDsubst cfg ul node1 x node2)). Proof. exact (proj1 (BDDsubst_lemma cfg ul node1 x node2 cfg_OK ul_OK used1 used2)). Qed. Lemma BDDsubst_node_OK : config_node_OK (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2)). Proof. exact (proj1 (proj2 (BDDsubst_lemma cfg ul node1 x node2 cfg_OK ul_OK used1 used2))). Qed. Lemma BDDsubst_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDsubst cfg ul node1 x node2)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDsubst_lemma cfg ul node1 x node2 cfg_OK ul_OK used1 used2)))). Qed. Lemma BDDsubst_list_OK : used_list_OK (fst (BDDsubst cfg ul node1 x node2)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDsubst cfg ul node1 x node2)) ul *) exact BDDsubst_used_nodes_preserved. Qed. Lemma BDDsubst_list_OK_cons : used_list_OK (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDsubst_node_OK. exact BDDsubst_list_OK. Qed. Lemma BDDsubst_is_subst1 : bool_fun_eq (bool_fun_of_BDD (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2))) (bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)). Proof. exact (proj2 (proj2 (proj2 (BDDsubst_lemma cfg ul node1 x node2 cfg_OK ul_OK used1 used2)))). Qed. Lemma BDDsubst_is_subst : bool_fun_eq (bool_fun_of_BDD (fst (BDDsubst cfg ul node1 x node2)) (snd (BDDsubst cfg ul node1 x node2))) (bool_fun_subst x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)). Proof. apply bool_fun_eq_trans with (bf2 := bool_fun_subst1 x (bool_fun_of_BDD cfg node2) (bool_fun_of_BDD cfg node1)). (* Goal: @eq bool (be_x_free x b0) true *) exact BDDsubst_is_subst1. apply bool_fun_subst1_eq_subst. assumption. Qed. End BDDsubst_results. Section BDDreplace_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node : ad. Variable x y : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Hypothesis xy_neq : Neqb x y = false. Definition BDDreplace := match BDDvar_make gc cfg ul y with | (cfg1, nodey) => BDDsubst cfg1 (nodey :: ul) node x nodey end. Lemma BDDreplace_config_OK : BDDconfig_OK (fst BDDreplace). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDreplace) (@snd BDDconfig ad BDDreplace)) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) unfold BDDreplace in |- *. elim (prod_sum _ _ (BDDvar_make gc cfg ul y)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul y) (@pair BDDconfig ad x0 b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) intros cfg1 H. elim H; clear H. intros nodey H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) replace cfg1 with (fst (BDDvar_make gc cfg ul y)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) replace nodey with (snd (BDDvar_make gc cfg ul y)). apply BDDsubst_config_OK. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_config_OK; assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_list_OK_cons; assumption. apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved; assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H; reflexivity. Qed. Lemma BDDreplace_node_OK : config_node_OK (fst BDDreplace) (snd BDDreplace). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDreplace) (@snd BDDconfig ad BDDreplace)) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) unfold BDDreplace in |- *. elim (prod_sum _ _ (BDDvar_make gc cfg ul y)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul y) (@pair BDDconfig ad x0 b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) intros cfg1 H. elim H; clear H. intros nodey H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) replace cfg1 with (fst (BDDvar_make gc cfg ul y)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) replace nodey with (snd (BDDvar_make gc cfg ul y)). apply BDDsubst_node_OK. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_config_OK; assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_list_OK_cons; assumption. apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved; assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H; reflexivity. Qed. Lemma BDDreplace_used_nodes_preserved : used_nodes_preserved cfg (fst BDDreplace) ul. Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDreplace) (@snd BDDconfig ad BDDreplace)) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) unfold BDDreplace in |- *. elim (prod_sum _ _ (BDDvar_make gc cfg ul y)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul y) (@pair BDDconfig ad x0 b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) intros cfg1 H. elim H; clear H. intros nodey H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) replace cfg1 with (fst (BDDvar_make gc cfg ul y)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) replace nodey with (snd (BDDvar_make gc cfg ul y)). apply used_nodes_preserved_trans with (cfg2 := fst (BDDvar_make gc cfg ul y)). (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply BDDvar_make_used_nodes_preserved; assumption. apply used_nodes_preserved_cons with (node := snd (BDDvar_make gc cfg ul y)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDsubst_used_nodes_preserved. apply BDDvar_make_config_OK; assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_list_OK_cons; assumption. apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved; assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply used_node'_cons_node_ul. rewrite H; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H; reflexivity. Qed. Lemma BDDreplace_list_OK : used_list_OK (fst BDDreplace) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad BDDreplace) ul *) exact BDDreplace_used_nodes_preserved. Qed. Lemma BDDreplace_list_OK_cons : used_list_OK (fst BDDreplace) (snd BDDreplace :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDreplace_node_OK. exact BDDreplace_list_OK. Qed. Lemma BDDreplace_is_replace : bool_fun_eq (bool_fun_of_BDD (fst BDDreplace) (snd BDDreplace)) (bool_fun_replace x y (bool_fun_of_BDD cfg node)). Proof. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad BDDreplace) (@snd BDDconfig ad BDDreplace)) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) unfold BDDreplace in |- *. elim (prod_sum _ _ (BDDvar_make gc cfg ul y)). (* Goal: forall (x0 : BDDconfig) (_ : @ex ad (fun b : ad => @eq (prod BDDconfig ad) (BDDvar_make gc cfg ul y) (@pair BDDconfig ad x0 b))), bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (let (cfg1, nodey) := BDDvar_make gc cfg ul y in BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) intros cfg1 H. elim H; clear H. intros nodey H. rewrite H. (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey)) (@snd BDDconfig ad (BDDsubst cfg1 (@cons ad nodey ul) node x nodey))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) replace cfg1 with (fst (BDDvar_make gc cfg ul y)). (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) ul) node x (@snd BDDconfig ad (BDDvar_make gc cfg ul y)))) (@snd BDDconfig ad (BDDsubst (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@cons ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) ul) node x (@snd BDDconfig ad (BDDvar_make gc cfg ul y))))) (bool_fun_replace x y (bool_fun_of_BDD cfg node)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) nodey *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) replace nodey with (snd (BDDvar_make gc cfg ul y)). unfold bool_fun_replace in |- *. apply bool_fun_eq_trans with (bf2 := bool_fun_subst x (bool_fun_of_BDD (fst (BDDvar_make gc cfg ul y)) (snd (BDDvar_make gc cfg ul y))) (bool_fun_of_BDD (fst (BDDvar_make gc cfg ul y)) node)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDsubst_is_subst. apply BDDvar_make_config_OK; assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_list_OK_cons; assumption. apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved; assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. (* Goal: bool_fun_independent (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@snd BDDconfig ad (BDDvar_make gc cfg ul y))) x *) (* Goal: bool_fun_eq (bool_fun_subst x (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@snd BDDconfig ad (BDDvar_make gc cfg ul y))) (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) node)) (bool_fun_subst x (bool_fun_var y) (bool_fun_of_BDD cfg node)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) nodey *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) apply bool_fun_eq_independent with (bf1 := bool_fun_var y). (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_eq_sym. apply BDDvar_make_is_var; assumption. (* Goal: bool_fun_independent (bool_fun_var y) x *) (* Goal: bool_fun_eq (bool_fun_subst x (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) (@snd BDDconfig ad (BDDvar_make gc cfg ul y))) (bool_fun_of_BDD (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) node)) (bool_fun_subst x (bool_fun_var y) (bool_fun_of_BDD cfg node)) *) (* Goal: @eq ad (@snd BDDconfig ad (BDDvar_make gc cfg ul y)) nodey *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDvar_make gc cfg ul y)) cfg1 *) unfold bool_fun_independent, bool_fun_var in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_restrict, augment, bool_fun_eq in |- *. intros. rewrite xy_neq. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. apply bool_fun_subst_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_config_OK; assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDvar_make_used_nodes_preserved; assumption. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDvar_make_is_var; assumption. rewrite H; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H; reflexivity. Qed. End BDDreplace_results. Fixpoint BDDreplacel (cfg : BDDconfig) (ul : list ad) (node : ad) (lx ly : list BDDvar) {struct ly} : BDDconfig * ad := match lx, ly with | nil, _ => (cfg, node) | _ :: _, nil => (cfg, node) | x :: lx', y :: ly' => match BDDreplacel cfg ul node lx' ly' with | (cfg1, node1) => BDDreplace cfg1 (node1 :: ul) node1 x y end end. Lemma BDDreplacel_lemma : forall (lx ly : list ad) (cfg : BDDconfig) (ul : list ad) (node : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul node -> ad_list_neq lx ly = true -> BDDconfig_OK (fst (BDDreplacel cfg ul node lx ly)) /\ config_node_OK (fst (BDDreplacel cfg ul node lx ly)) (snd (BDDreplacel cfg ul node lx ly)) /\ used_nodes_preserved cfg (fst (BDDreplacel cfg ul node lx ly)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDreplacel cfg ul node lx ly)) (snd (BDDreplacel cfg ul node lx ly))) (bool_fun_replacel (bool_fun_of_BDD cfg node) lx ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lx. simple induction ly. simpl in |- *. intros. split. assumption. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_OK with (ul := ul). assumption. assumption. assumption. (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) split. apply used_nodes_preserved_refl. apply bool_fun_eq_refl. simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. split. assumption. split. apply used_node'_OK with (ul := ul). (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. assumption. split. (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply used_nodes_preserved_refl. apply bool_fun_eq_refl. simple induction ly. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. split. assumption. split. apply used_node'_OK with (ul := ul). (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. assumption. split. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply used_nodes_preserved_refl. apply bool_fun_eq_refl. simpl in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0))))) *) elim (prod_sum _ _ (BDDreplacel cfg ul node l l0)). intros cfg1 H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (config_node_OK (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (let (cfg1, node1) := BDDreplacel cfg ul node l l0 in BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0))))) *) elim H5; clear H5; intros node1 H5. elim (H l0 cfg ul node H1 H2 H3). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) rewrite H5. simpl in |- *. intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (config_node_OK (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0))))) *) (* Goal: @eq bool (ad_list_neq l l0) true *) elim H7; clear H7; intros H9 H8; elim H8; clear H8; intros H8 H11. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfg1 (node1 :: ul)). intro. split. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDreplace_config_OK. assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_cons_node_ul. split. apply BDDreplace_node_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfg1). assumption. assumption. (* Goal: used_nodes_preserved cfg1 (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0)) (@snd BDDconfig ad (BDDreplace cfg1 (@cons ad node1 ul) node1 a a0))) (bool_fun_replace a a0 (bool_fun_replacel (bool_fun_of_BDD cfg node) l l0)) *) (* Goal: used_list_OK cfg1 (@cons ad node1 ul) *) (* Goal: @eq bool (ad_list_neq l l0) true *) apply used_nodes_preserved_cons with (node := node1). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDreplace_used_nodes_preserved. assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_replace a a0 (bool_fun_of_BDD cfg1 node1)). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDreplace_is_replace. assumption. assumption. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply used_node'_cons_node_ul. apply not_true_is_false. unfold not in |- *; intro. (* Goal: bool_fun_eq (bool_fun_replace a a0 (bool_fun_replacel bf1 l l0)) (bool_fun_replace a a0 (bool_fun_replacel bf2 l l0)) *) rewrite H10 in H4; discriminate. apply bool_fun_replace_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply node_OK_list_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (ad_list_neq l l0) true *) elim (andb_prop _ _ H4). trivial. Qed. Section BDDreplacel_results. Variable cfg : BDDconfig. Variable ul : list ad. Variable node : ad. Variable lx ly : list BDDvar. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis used : used_node' cfg ul node. Hypothesis lxy_neq : ad_list_neq lx ly = true. Lemma BDDreplacel_config_OK : BDDconfig_OK (fst (BDDreplacel cfg ul node lx ly)). Proof. exact (proj1 (BDDreplacel_lemma lx ly cfg ul node cfg_OK ul_OK used lxy_neq)). Qed. Lemma BDDreplacel_node_OK : config_node_OK (fst (BDDreplacel cfg ul node lx ly)) (snd (BDDreplacel cfg ul node lx ly)). Proof. exact (proj1 (proj2 (BDDreplacel_lemma lx ly cfg ul node cfg_OK ul_OK used lxy_neq))). Qed. Lemma BDDreplacel_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDreplacel cfg ul node lx ly)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDreplacel_lemma lx ly cfg ul node cfg_OK ul_OK used lxy_neq)))). Qed. Lemma BDDreplacel_list_OK : used_list_OK (fst (BDDreplacel cfg ul node lx ly)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDreplacel cfg ul node lx ly)) ul *) exact BDDreplacel_used_nodes_preserved. Qed. Lemma BDDreplacel_list_OK_cons : used_list_OK (fst (BDDreplacel cfg ul node lx ly)) (snd (BDDreplacel cfg ul node lx ly) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDreplacel_node_OK. exact BDDreplacel_list_OK. Qed. Lemma BDDreplacel_is_replacel : bool_fun_eq (bool_fun_of_BDD (fst (BDDreplacel cfg ul node lx ly)) (snd (BDDreplacel cfg ul node lx ly))) (bool_fun_replacel (bool_fun_of_BDD cfg node) lx ly). Proof. exact (proj2 (proj2 (proj2 (BDDreplacel_lemma lx ly cfg ul node cfg_OK ul_OK used lxy_neq)))). Qed. End BDDreplacel_results. End BDDquant. Fixpoint be_x_free (x : BDDvar) (be : bool_expr) {struct be} : bool := match be with | Zero => false | One => false | Var y => Neqb x y | Neg be1 => be_x_free x be1 | Or be1 be2 => be_x_free x be1 || be_x_free x be2 | ANd be1 be2 => be_x_free x be1 || be_x_free x be2 | Impl be1 be2 => be_x_free x be1 || be_x_free x be2 | Iff be1 be2 => be_x_free x be1 || be_x_free x be2 end. Lemma subst_x_free : forall (be bex : bool_expr) (x y : BDDvar), be_x_free y (subst x bex be) = true -> be_x_free y be = true /\ Neqb x y = false \/ be_x_free y bex = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction be. simpl in |- *. intros. discriminate. simpl in |- *. intros. discriminate. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (sumbool_of_bool (Neqb x b)). intro y0. rewrite y0 in H. (* Goal: @eq bool (be_x_free x b0) true *) right. assumption. intro y0. rewrite y0 in H. simpl in H. left. split. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) assumption. rewrite (Neqb_complete _ _ H). assumption. simpl in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply H. assumption. simpl in |- *. intros. elim (orb_prop _ _ H1). intro. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (H bex x y H2). intros. elim H3. intros. rewrite H4. left. simpl in |- *. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) split. reflexivity. assumption. intro. right. assumption. intro. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (H0 bex x y H2). intros. elim H3. intros. rewrite H4. left. split. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (be_x_free y b); reflexivity. assumption. intro. right. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (orb_prop _ _ H1). intro. elim (H bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. simpl in |- *. split. reflexivity. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) assumption. intro. right. assumption. intro. elim (H0 bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. split. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (be_x_free y b); reflexivity. assumption. intro. right. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (orb_prop _ _ H1). intro. elim (H bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. simpl in |- *. split. reflexivity. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) assumption. intro. right. assumption. intro. elim (H0 bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. split. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (be_x_free y b); reflexivity. assumption. intro. right. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (orb_prop _ _ H1). intro. elim (H bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. simpl in |- *. split. reflexivity. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) assumption. intro. right. assumption. intro. elim (H0 bex x y H2). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim H3. intros. rewrite H4. left. split. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (be_x_free y b); reflexivity. assumption. intro. right. assumption. Qed. Lemma restrict_x_free : forall (be : bool_expr) (x y : BDDvar) (b : bool), be_x_free y (restrict x b be) = true -> be_x_free y be = true /\ Neqb x y = false. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold restrict in |- *. intros. elim (subst_x_free be (bool_to_be b) x y H). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) trivial. elim b. simpl in |- *. intro. discriminate. simpl in |- *. intro. (* Goal: @eq bool (vf x) true *) (* Goal: forall (b : BDDvar) (_ : be_ok (Var b)) (x : BDDvar) (_ : @eq bool (be_x_free x (Var b)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (_ : be_ok (Neg b)) (x : BDDvar) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Or b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (ANd b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Impl b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) discriminate. Qed. Lemma replace_x_free : forall (be : bool_expr) (x y z : BDDvar), be_x_free z (replace x y be) = true -> be_x_free z be = true /\ Neqb x z = false \/ Neqb y z = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold replace in |- *. intros. elim (subst_x_free be (Var y) x z H). intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) left. assumption. simpl in |- *. intro. right. rewrite (Neqb_complete _ _ H0). (* Goal: @eq bool (N.eqb b b) true *) (* Goal: forall (b : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true, be_ok b) (_ : forall (x : BDDvar) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (vf x) true), be_ok (Neg b) *) (* Goal: forall (b : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true, be_ok b) (b0 : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true, be_ok b0) (_ : forall (x : BDDvar) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (vf x) true), be_ok (Or b b0) *) (* Goal: forall (b : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true, be_ok b) (b0 : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true, be_ok b0) (_ : forall (x : BDDvar) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (vf x) true), be_ok (ANd b b0) *) (* Goal: forall (b : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true, be_ok b) (b0 : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true, be_ok b0) (_ : forall (x : BDDvar) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (vf x) true), be_ok (Impl b b0) *) (* Goal: forall (b : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true, be_ok b) (b0 : bool_expr) (_ : forall _ : forall (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true, be_ok b0) (_ : forall (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true), be_ok (Iff b b0) *) apply Neqb_correct. Qed. Lemma replacel_x_free : forall (lx ly : list ad) (be : bool_expr) (x : BDDvar), length lx = length ly -> be_x_free x (replacel be lx ly) = true -> be_x_free x be = true /\ ~ In x lx \/ In x ly. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lx. intro. elim ly. simpl in |- *. intros. left. split. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold not in |- *. trivial. simpl in |- *. intros. left. split. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold not in |- *. trivial. intros a l H ly. elim ly. simpl in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) discriminate. simpl in |- *. intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (replace_x_free (replacel be l l0) a a0 x H2). intro. (* Goal: or (and (@eq bool (be_x_free x be) true) (not (or (@eq BDDvar a x) (@In BDDvar x l)))) (or (@eq BDDvar a0 x) (@In BDDvar x l0)) *) (* Goal: forall _ : @eq bool (N.eqb a0 x) true, or (and (@eq bool (be_x_free x be) true) (not (or (@eq BDDvar a x) (@In BDDvar x l)))) (or (@eq BDDvar a0 x) (@In BDDvar x l0)) *) elim H3; intros H5 H6. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (H l0 be x). intro. (* Goal: or (and (@eq bool (be_x_free x be) true) (not (or (@eq BDDvar a x) (@In BDDvar x l)))) (or (@eq BDDvar a0 x) (@In BDDvar x l0)) *) (* Goal: forall _ : @In BDDvar x l0, or (and (@eq bool (be_x_free x be) true) (not (or (@eq BDDvar a x) (@In BDDvar x l)))) (or (@eq BDDvar a0 x) (@In BDDvar x l0)) *) (* Goal: @eq nat (@length ad l) (@length ad l0) *) (* Goal: @eq bool (be_x_free x (replacel be l l0)) true *) (* Goal: forall _ : @eq bool (N.eqb a0 x) true, or (and (@eq bool (be_x_free x be) true) (not (or (@eq BDDvar a x) (@In BDDvar x l)))) (or (@eq BDDvar a0 x) (@In BDDvar x l0)) *) elim H4; intros H8 H9. (* Goal: or (@eq bool (be_x_free x t) true) (and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx))) *) (* Goal: forall _ : @eq bool (be_x_free x (replacel be lx lx')) true, or (@eq bool (be_x_free x t) true) (and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx))) *) left. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) split. assumption. unfold not in |- *; intro. elim H7; intro. rewrite H10 in H6. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) rewrite (Neqb_correct x) in H6. discriminate. elim (H9 H10). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) right. right. assumption. apply eq_add_S. assumption. assumption. intro. (* Goal: @eq bool (be_x_free x b0) true *) right. left. apply Neqb_complete. assumption. Qed. Lemma impl_x_free : forall (be1 be2 : bool_expr) (x : BDDvar), be_x_free x (Impl be1 be2) = true -> be_x_free x be1 = true \/ be_x_free x be2 = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (orb_prop _ _ H); auto. Qed. Lemma and_x_free : forall (be1 be2 : bool_expr) (x : BDDvar), be_x_free x (ANd be1 be2) = true -> be_x_free x be1 = true \/ be_x_free x be2 = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. elim (orb_prop _ _ H); auto. Qed. Lemma univ_x_free : forall (be : bool_expr) (x y : BDDvar), be_x_free y (forall_ x be) = true -> be_x_free y be = true /\ Neqb x y = false. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold forall_ in |- *. intros. elim (and_x_free _ _ _ H). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (restrict_x_free _ _ _ _ H0). auto. intro. (* Goal: and (@eq bool (be_x_free y be) true) (@eq bool (N.eqb x y) false) *) elim (restrict_x_free _ _ _ _ H0). auto. Qed. Lemma ex_x_free : forall (be : bool_expr) (x y : BDDvar), be_x_free y (be_ex x be) = true -> be_x_free y be = true /\ Neqb x y = false. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_ex in |- *. intros. elim (and_x_free _ _ _ H). intro. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (restrict_x_free _ _ _ _ H0). auto. intro. (* Goal: and (@eq bool (be_x_free y be) true) (@eq bool (N.eqb x y) false) *) elim (restrict_x_free _ _ _ _ H0). auto. Qed. Lemma univl_x_free : forall (lx : list ad) (be : bool_expr) (x : BDDvar), be_x_free x (univl be lx) = true -> be_x_free x be = true /\ ~ In x lx. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lx. simpl in |- *. auto. intros. elim (univ_x_free _ _ _ H0). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) fold (univl be l) in |- *. intros. elim (H be x H1). intros. split. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. unfold not in |- *; intros. elim H5. intro. rewrite H6 in H2. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) rewrite (Neqb_correct x) in H2; discriminate. intro. elim (H4 H6). Qed. Lemma exl_x_free : forall (lx : list ad) (be : bool_expr) (x : BDDvar), be_x_free x (exl be lx) = true -> be_x_free x be = true /\ ~ In x lx. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lx. simpl in |- *. auto. intros. elim (ex_x_free _ _ _ H0). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) fold (exl be l) in |- *. intros. elim (H be x H1). intros. split. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. unfold not in |- *; intros. elim H5. intro. rewrite H6 in H2. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) rewrite (Neqb_correct x) in H2; discriminate. intro. elim (H4 H6). Qed. Definition var_env' := nat -> bool. Definition var_env_to_env' (ve : var_env) : var_env' := fun n : nat => ve (N_of_nat n). Definition var_env'_to_env (ve : var_env') : var_env := fun x : BDDvar => ve (nat_of_N x). Definition eval_be' (be : bool_expr) (ve : var_env') := bool_fun_of_bool_expr be (var_env'_to_env ve). Definition var_env'' := Map unit. Definition var_env''_to_env (ve : var_env'') : var_env := fun x : ad => in_dom _ x ve. Definition var_env''_to_env' (ve : var_env'') : var_env' := fun n : nat => in_dom _ (N_of_nat n) ve. Definition be_eq (be1 be2 : bool_expr) := forall ve : var_env', eval_be' be1 ve = eval_be' be2 ve. Definition be_eq_dec (be1 be2 : bool_expr) := is_tauto (fun x _ => x) (Iff be1 be2). (* [x,_]x is same as gc_inf *) Definition be_le (be1 be2 : bool_expr) := forall ve : var_env', eval_be' be1 ve = true -> eval_be' be2 ve = true. Lemma be_eq_refl : forall be : bool_expr, be_eq be be. Proof. (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)), and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)) *) (* Goal: forall _ : @In BDDvar x lx', and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)) *) unfold be_eq in |- *. trivial. Qed. Lemma be_eq_sym : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq be2 be1. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. intros. rewrite (H ve). reflexivity. Qed. Lemma be_eq_le : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_le be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq, be_le in |- *. intros. rewrite <- (H ve). assumption. Qed. Lemma be_eq_dec_correct : forall be1 be2 : bool_expr, bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) -> be_eq_dec be1 be2 = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold be_eq_dec in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (is_tauto_lemma (fun x _ => x) gc_inf_OK (Iff be1 be2)). intros. clear H0. (* Goal: bool_fun_eq (fun _ : var_env => true) (fun vb : var_env => eqb (bool_fun_of_bool_expr be1 vb) (bool_fun_of_bool_expr be2 vb)) *) apply H1. simpl in |- *. unfold bool_fun_iff, bool_fun_one in |- *. unfold bool_fun_eq in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold bool_fun_eq in H. rewrite (H vb). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) elim (bool_fun_of_bool_expr be2 vb). reflexivity. reflexivity. Qed. Lemma be_eq_dec_complete : forall be1 be2 : bool_expr, be_eq_dec be1 be2 = true -> bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq_dec in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (is_tauto_lemma (fun x _ => x) gc_inf_OK (Iff be1 be2)). intros. clear H1. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) cut (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr (Iff be1 be2))). simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_one, bool_fun_eq, bool_fun_iff in |- *. intros. rewrite (eqb_prop (bool_fun_of_bool_expr be1 vb) (bool_fun_of_bool_expr be2 vb)) . (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. symmetry in |- *. apply H1. apply H0. assumption. Qed. Lemma be_eq_dec_eq : forall be1 be2 : bool_expr, be_eq_dec be1 be2 = true -> be_eq be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold be_eq in |- *. unfold eval_be' in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) cut (bool_fun_eq bool_fun_one (bool_fun_of_bool_expr (Iff be1 be2))). simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_one, bool_fun_eq, bool_fun_iff in |- *. intros. rewrite (eqb_prop (bool_fun_of_bool_expr be1 (var_env'_to_env ve)) (bool_fun_of_bool_expr be2 (var_env'_to_env ve))) . (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. symmetry in |- *. apply H0. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (is_tauto_lemma (fun x _ => x) gc_inf_OK (Iff be1 be2)). intros. apply H0. (* Goal: @eq bool (is_tauto (fun (x : BDDconfig) (_ : list ad) => x) (Iff be1 be2)) true *) exact H. Qed. Lemma bool_fun_var_ext : forall x : BDDvar, bool_fun_ext (bool_fun_var x). Proof. (* Goal: forall _ : and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)), and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)) *) (* Goal: forall _ : @In BDDvar x lx', and (@eq bool (be_x_free x be) true) (not (@In BDDvar x lx)) *) unfold bool_fun_ext, bool_fun_var in |- *. trivial. Qed. Lemma bool_fun_neg_ext : forall bf1 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext (bool_fun_neg bf1). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_neg, bool_fun_ext in |- *. intros. rewrite (H vb vb' H0). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma bool_fun_and_ext : forall bf1 bf2 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_and bf1 bf2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_ext, bool_fun_and in |- *. intros. rewrite (H vb vb' H1). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H0 vb vb' H1). reflexivity. Qed. Lemma bool_fun_or_ext : forall bf1 bf2 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_or bf1 bf2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_ext, bool_fun_or in |- *. intros. rewrite (H vb vb' H1). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H0 vb vb' H1). reflexivity. Qed. Lemma bool_fun_impl_ext : forall bf1 bf2 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_impl bf1 bf2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_ext, bool_fun_impl in |- *. intros. rewrite (H vb vb' H1). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H0 vb vb' H1). reflexivity. Qed. Lemma bool_fun_iff_ext : forall bf1 bf2 : bool_fun, bool_fun_ext bf1 -> bool_fun_ext bf2 -> bool_fun_ext (bool_fun_iff bf1 bf2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_ext, bool_fun_iff in |- *. intros. rewrite (H vb vb' H1). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H0 vb vb' H1). reflexivity. Qed. Lemma bool_fun_of_be_ext : forall be : bool_expr, bool_fun_ext (bool_fun_of_bool_expr be). Proof. (* Goal: forall (be : bool_expr) (_ : be_ok be) (x : BDDvar) (_ : @eq bool (be_x_free x be) true), @eq bool (vf x) true *) simple induction be. simpl in |- *. exact bool_fun_ext_zero. exact bool_fun_ext_one. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) exact bool_fun_var_ext. simpl in |- *. intros. apply bool_fun_neg_ext. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. apply bool_fun_or_ext. assumption. assumption. simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply bool_fun_and_ext. assumption. assumption. simpl in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply bool_fun_impl_ext. assumption. assumption. simpl in |- *. intros. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_iff_ext. assumption. assumption. Qed. Lemma be_le_refl : forall be : bool_expr, be_le be be. Proof. (* Goal: and (be_ok be1) (be_ok be2) *) unfold be_le in |- *. auto. Qed. Lemma be_le_trans : forall be1 be2 be3 : bool_expr, be_le be1 be2 -> be_le be2 be3 -> be_le be1 be3. Proof. (* Goal: and (be_ok be1) (be_ok be2) *) unfold be_le in |- *; auto. Qed. Lemma be_le_antisym : forall be1 be2 : bool_expr, be_le be1 be2 -> be_le be2 be1 -> be_eq be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le in |- *. unfold be_eq in |- *. intros. (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr be2' (var_env'_to_env ve)) false, @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) true *) elim (sumbool_of_bool (eval_be' be1 ve)). intro y. rewrite y. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). reflexivity. assumption. intro y. rewrite y. symmetry in |- *. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply not_true_is_false. unfold not in |- *; intro. rewrite (H0 ve H1) in y. (* Goal: @eq bool (vf x) true *) (* Goal: forall (b : BDDvar) (_ : be_ok (Var b)) (x : BDDvar) (_ : @eq bool (be_x_free x (Var b)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (_ : be_ok (Neg b)) (x : BDDvar) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Or b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (ANd b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Impl b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) discriminate. Qed. Lemma be_eq_trans : forall be1 be2 be3 : bool_expr, be_eq be1 be2 -> be_eq be2 be3 -> be_eq be1 be3. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. intros. rewrite (H ve). apply H0. Qed. Lemma be_eq_eq_dec : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq_dec be1 be2 = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim (is_tauto_lemma (fun x _ => x) gc_inf_OK (Iff be1 be2)). intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) apply H1. clear H0 H1. simpl in |- *. unfold bool_fun_iff, bool_fun_one, bool_fun_eq in |- *. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. unfold be_eq in H. unfold eval_be' in H. cut (bool_fun_of_bool_expr be1 vb = bool_fun_of_bool_expr be1 (var_env'_to_env (var_env_to_env' vb))). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. cut (bool_fun_of_bool_expr be2 vb = bool_fun_of_bool_expr be2 (var_env'_to_env (var_env_to_env' vb))). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. rewrite H0. rewrite H1. rewrite (H (var_env_to_env' vb)). symmetry in |- *. (* Goal: @eq bool (eqb (bool_fun_of_bool_expr be2 (var_env'_to_env (var_env_to_env' vb))) (bool_fun_of_bool_expr be2 (var_env'_to_env (var_env_to_env' vb)))) true *) (* Goal: @eq bool (bool_fun_of_bool_expr be2 vb) (bool_fun_of_bool_expr be2 (var_env'_to_env (var_env_to_env' vb))) *) (* Goal: @eq bool (bool_fun_of_bool_expr be1 vb) (bool_fun_of_bool_expr be1 (var_env'_to_env (var_env_to_env' vb))) *) apply eqb_reflx. apply (bool_fun_of_be_ext be2). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) unfold var_env'_to_env, var_env_to_env' in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) reflexivity. apply (bool_fun_of_be_ext be1). intro. (* Goal: @eq bool (var_env'_to_env (var_env_to_env' ve) x) (ve x) *) unfold var_env'_to_env, var_env_to_env' in |- *. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma be_le_not_1 : forall be1 be2 : bool_expr, be_le be1 be2 -> be_le (Neg be2) (Neg be1). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le in |- *. intros. unfold eval_be' in |- *. simpl in |- *. unfold eval_be' in H0. (* Goal: lt (Init.Nat.sub n N) N *) (* Goal: @eq BinNums.N (ap' (Init.Nat.sub n N)) (N.of_nat n) *) simpl in H0. unfold bool_fun_neg in |- *. unfold bool_fun_neg in H0. (* Goal: @eq bool (bool_fun_of_bool_expr be2 ve) true *) unfold eval_be' in H. (* Goal: @eq bool (negb (bool_fun_of_bool_expr be1 (var_env'_to_env ve))) true *) elim (sumbool_of_bool (bool_fun_of_bool_expr be1 (var_env'_to_env ve))). (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr be2' (var_env'_to_env ve)) false, @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) true *) intro y. rewrite (H ve y) in H0. discriminate. intro y. rewrite y. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma and_le : forall be1 be2 be1' be2' : bool_expr, be_le be1 be1' -> be_le be2 be2' -> be_le (ANd be1 be2) (ANd be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_and in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (andb_prop _ _ H1). intros. rewrite (H ve H2). rewrite (H0 ve H3). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma or_le : forall be1 be2 be1' be2' : bool_expr, be_le be1 be1' -> be_le be2 be2' -> be_le (Or be1 be2) (Or be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_or in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (orb_prop _ _ H1). intros. rewrite (H ve H2). reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. rewrite (H0 ve H2). auto with bool. Qed. Lemma impl_le : forall be1 be2 be1' be2' : bool_expr, be_le be1' be1 -> be_le be2 be2' -> be_le (Impl be1 be2) (Impl be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_impl in |- *. intros. (* Goal: @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) true *) elim (sumbool_of_bool (bool_fun_of_bool_expr be2' (var_env'_to_env ve))). (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr be2' (var_env'_to_env ve)) false, @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) true *) intro y. rewrite y. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) elim (bool_fun_of_bool_expr be1' (var_env'_to_env ve)); reflexivity. intro y. (* Goal: @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) (bool_fun_of_bool_expr be2' (var_env'_to_env ve))) true *) rewrite y. (* Goal: @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) false) true *) elim (sumbool_of_bool (bool_fun_of_bool_expr be1' (var_env'_to_env ve))). (* Goal: forall _ : @eq bool (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) false, @eq bool (implb (bool_fun_of_bool_expr be1' (var_env'_to_env ve)) false) true *) intro y0. rewrite (H ve y0) in H1. simpl in H1. rewrite (H0 ve H1) in y. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) discriminate. intro y0. rewrite y0. reflexivity. Qed. Lemma and_eq : forall be1 be2 be1' be2' : bool_expr, be_eq be1 be1' -> be_eq be2 be2' -> be_eq (ANd be1 be2) (ANd be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_and in |- *. intros. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). rewrite (H0 ve). reflexivity. Qed. Lemma or_eq : forall be1 be2 be1' be2' : bool_expr, be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Or be1 be2) (Or be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_or in |- *. intros. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). rewrite (H0 ve). reflexivity. Qed. Lemma impl_eq : forall be1 be2 be1' be2' : bool_expr, be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Impl be1 be2) (Impl be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_impl in |- *. intros. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). rewrite (H0 ve). reflexivity. Qed. Lemma iff_eq : forall be1 be2 be1' be2' : bool_expr, be_eq be1 be1' -> be_eq be2 be2' -> be_eq (Iff be1 be2) (Iff be1' be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_iff in |- *. intros. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). rewrite (H0 ve). reflexivity. Qed. Lemma neg_eq_eq : forall be1 be2 : bool_expr, be_eq (Neg be1) (Neg be2) -> be_eq be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. unfold bool_fun_neg in |- *. intros. (* Goal: @eq bool (bool_fun_of_bool_expr be1 (var_env'_to_env ve)) (bool_fun_of_bool_expr be2 (var_env'_to_env ve)) *) rewrite (negb_intro (bool_fun_of_bool_expr be1 (var_env'_to_env ve))). (* Goal: @eq bool (negb (bool_fun_of_bool_expr be1 (var_env'_to_env ve))) (negb (bool_fun_of_bool_expr be2 (var_env'_to_env ve))) *) rewrite (H ve). (* Goal: @eq bool (negb (negb (bool_fun_of_bool_expr be2 (var_env'_to_env ve)))) (bool_fun_of_bool_expr be2 (var_env'_to_env ve)) *) rewrite (negb_elim (bool_fun_of_bool_expr be2 (var_env'_to_env ve))). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma eq_neg_eq : forall be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (Neg be1) (Neg be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_eq in |- *. unfold eval_be' in |- *. simpl in |- *. intros. unfold bool_fun_neg in |- *. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite (H ve). reflexivity. Qed. Section Nsec. Variable N : nat. Definition ap (n : nat) := N_of_nat n. Definition ap' (n : nat) := N_of_nat (N + n). Fixpoint lx_1 (n : nat) : list ad := match n with | O => nil | S m => ap m :: lx_1 m end. Fixpoint lx'_1 (n : nat) : list ad := match n with | O => nil (A:=ad) | S m => ap' m :: lx'_1 m end. Definition lx := lx_1 N. Definition lx' := lx'_1 N. Lemma ap_neq_ap' : forall n : nat, n < N -> Neqb (ap n) (ap' n) = false. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. intros. unfold ap, ap' in |- *. rewrite <- (plus_n_O N). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply not_true_is_false. unfold not in |- *; intro. elim (lt_irrefl N). (* Goal: @eq bool (be_x_free x b0) true *) replace (N < N) with (0 < N). assumption. (* Goal: @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (_ : be_ok (Neg b)) (x : BDDvar) (_ : @eq bool (be_x_free x (Neg b)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Or b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Or b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (ANd b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (ANd b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Impl b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Impl b b0)) true), @eq bool (vf x) true *) (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) replace 0 with (nat_of_N (N_of_nat 0)). rewrite (Neqb_complete _ _ H0). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) rewrite (nat_of_N_of_nat N). reflexivity. reflexivity. intros. (* Goal: @eq bool (N.eqb (N.of_nat (S n0)) (N.of_nat (Init.Nat.add (S N) n0))) false *) unfold ap, ap' in |- *. rewrite <- (plus_Snm_nSm N n0). apply not_true_is_false. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) unfold not in |- *; intro. (* Goal: False *) cut (nat_of_N (N_of_nat (S n0)) = nat_of_N (N_of_nat (S N + n0))). (* Goal: forall _ : @eq nat (N.to_nat (N.of_nat (S n0))) (N.to_nat (N.of_nat (Init.Nat.add (S N) n0))), False *) (* Goal: @eq nat (N.to_nat (N.of_nat (S n0))) (N.to_nat (N.of_nat (Init.Nat.add (S N) n0))) *) rewrite (nat_of_N_of_nat (S n0)). rewrite (nat_of_N_of_nat (S N + n0)). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) simpl in |- *. intro. unfold ap, ap' in H. rewrite <- (eq_add_S _ _ H2) in H. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) rewrite (Neqb_correct (N_of_nat n0)) in H. cut (true = false). intro. (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) discriminate. apply H. apply lt_trans with (m := S n0). apply lt_n_Sn. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. rewrite (Neqb_complete _ _ H1). reflexivity. Qed. Lemma lx_1_neg_lx'_1 : forall n : nat, n <= N -> ad_list_neq (lx_1 n) (lx'_1 n) = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. simpl in |- *. reflexivity. simpl in |- *. intros. apply andb_true_intro. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) split. rewrite (ap_neq_ap' n0). reflexivity. exact H0. apply H. (* Goal: @eq bool (be_x_free x b0) true *) apply lt_le_weak. assumption. Qed. Lemma lx_neq_lx' : ad_list_neq lx lx' = true. Proof. (* Goal: le (S n0) (S n0) *) unfold lx, lx' in |- *. apply lx_1_neg_lx'_1. apply le_n. Qed. Lemma lt_O_n_lx'_1 : forall n : nat, 0 < n -> In (ap' 0) (lx'_1 n). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. intros. elim (lt_irrefl _ H). intros. simpl in |- *. unfold lt in H0. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (le_le_S_eq 0 n0). intros. right. apply H. unfold lt in |- *. assumption. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. left. rewrite H1. reflexivity. apply le_S_n. assumption. Qed. Definition bool_fun_mu_all (bft bfg : bool_fun) : bool_fun := bool_fun_univl (bool_fun_impl bft (bool_fun_replacel bfg lx lx')) lx'. Definition bool_fun_mu_ex (bft bfg : bool_fun) : bool_fun := bool_fun_exl (bool_fun_and bft (bool_fun_replacel bfg lx lx')) lx'. Definition mu_all_eval (t be : bool_expr) : bool_expr := univl (Impl t (replacel be lx lx')) lx'. Definition mu_ex_eval (t be : bool_expr) : bool_expr := exl (ANd t (replacel be lx lx')) lx'. Definition BDDmu_all (gc : BDDconfig -> list ad -> BDDconfig) (cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad) := match BDDreplacel gc cfg ul nodeg lx lx' with | (cfgr, noder) => match BDDimpl gc cfgr (noder :: ul) nodet noder with | (cfgi, nodei) => BDDunivl gc cfgi (nodei :: ul) nodei lx' end end. Definition BDDmu_ex (gc : BDDconfig -> list ad -> BDDconfig) (cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad) := match BDDreplacel gc cfg ul nodeg lx lx' with | (cfgr, noder) => match BDDand gc cfgr (noder :: ul) nodet noder with | (cfga, nodea) => BDDexl gc cfga (nodea :: ul) nodea lx' end end. Lemma bool_fun_univl_preserves_eq : forall (l : list ad) (bf1 bf2 : bool_fun), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_univl bf1 l) (bool_fun_univl bf2 l). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction l. intros. simpl in |- *. assumption. simpl in |- *. intros. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_forall_preserves_eq. apply H; assumption. Qed. Lemma bool_fun_exl_preserves_eq : forall (l : list ad) (bf1 bf2 : bool_fun), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_exl bf1 l) (bool_fun_exl bf2 l). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction l. intros. simpl in |- *. assumption. simpl in |- *. intros. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_ex_preserves_eq. apply H; assumption. Qed. Lemma mu_all_eval_ok : forall t be : bool_expr, bool_fun_eq (bool_fun_of_bool_expr (mu_all_eval t be)) (bool_fun_mu_all (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold mu_all_eval in |- *. unfold bool_fun_mu_all in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_univl (bool_fun_of_bool_expr (Impl t (replacel be lx lx'))) lx'). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) apply univl_OK. apply bool_fun_univl_preserves_eq. simpl in |- *. (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_impl_preserves_eq. apply bool_fun_eq_refl. apply replacel_OK. Qed. Lemma mu_ex_eval_ok : forall t be : bool_expr, bool_fun_eq (bool_fun_of_bool_expr (mu_ex_eval t be)) (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold mu_ex_eval in |- *. unfold bool_fun_mu_ex in |- *. intros. apply bool_fun_eq_trans with (bf2 := bool_fun_exl (bool_fun_of_bool_expr (ANd t (replacel be lx lx'))) lx'). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) apply exl_OK. apply bool_fun_exl_preserves_eq. simpl in |- *. (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_and_preserves_eq. apply bool_fun_eq_refl. apply replacel_OK. Qed. Lemma bool_fun_replacel_preserves_eq : forall (lz ly : list ad) (bf1 bf2 : bool_fun), bool_fun_eq bf1 bf2 -> bool_fun_eq (bool_fun_replacel bf1 lz ly) (bool_fun_replacel bf2 lz ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lz. intros. elim ly; intros; assumption. intros. elim ly. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) assumption. intros. simpl in |- *. apply bool_fun_replace_preserves_eq. apply H. (* Goal: @eq bool (be_x_free x b0) true *) assumption. Qed. Lemma bool_fun_mu_all_preserves_eq : forall bft1 bft2 bfg1 bfg2 : bool_fun, bool_fun_eq bft1 bft2 -> bool_fun_eq bfg1 bfg2 -> bool_fun_eq (bool_fun_mu_all bft1 bfg1) (bool_fun_mu_all bft2 bfg2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_mu_all in |- *. intros. apply bool_fun_univl_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_impl_preserves_eq. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_replacel_preserves_eq. assumption. Qed. Lemma bool_fun_mu_ex_preserves_eq : forall bft1 bft2 bfg1 bfg2 : bool_fun, bool_fun_eq bft1 bft2 -> bool_fun_eq bfg1 bfg2 -> bool_fun_eq (bool_fun_mu_ex bft1 bfg1) (bool_fun_mu_ex bft2 bfg2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold bool_fun_mu_ex in |- *. intros. apply bool_fun_exl_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_and_preserves_eq. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply bool_fun_replacel_preserves_eq. assumption. Qed. Lemma mu_all_eq : forall t be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (mu_all_eval t be1) (mu_all_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply be_eq_dec_eq. apply be_eq_dec_correct. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_all (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be1)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (mu_all_eval t be2)) (bool_fun_mu_all (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) *) apply mu_all_eval_ok. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_all (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_mu_all_preserves_eq. apply bool_fun_eq_refl. (* Goal: @eq bool (be_x_free x b0) true *) apply be_eq_dec_complete. apply be_eq_eq_dec. assumption. (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_eq_sym. apply mu_all_eval_ok. Qed. Lemma mu_ex_eq : forall t be1 be2 : bool_expr, be_eq be1 be2 -> be_eq (mu_ex_eval t be1) (mu_ex_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply be_eq_dec_eq. apply be_eq_dec_correct. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be1)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr (mu_ex_eval t be2)) (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) *) apply mu_ex_eval_ok. apply bool_fun_eq_trans with (bf2 := bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)). (* Goal: bool_fun_eq (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr t) *) (* Goal: bool_fun_eq (bool_fun_of_bool_expr be1) (bool_fun_of_bool_expr be2) *) (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_mu_ex_preserves_eq. apply bool_fun_eq_refl. (* Goal: @eq bool (be_x_free x b0) true *) apply be_eq_dec_complete. apply be_eq_eq_dec. assumption. (* Goal: bool_fun_eq (bool_fun_mu_ex (bool_fun_of_bool_expr t) (bool_fun_of_bool_expr be2)) (bool_fun_of_bool_expr (mu_ex_eval t be2)) *) apply bool_fun_eq_sym. apply mu_ex_eval_ok. Qed. Lemma length_lx_1_eq_lx'_1 : forall n : nat, length (lx_1 n) = length (lx'_1 n). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. reflexivity. intros. simpl in |- *. rewrite H. reflexivity. Qed. Lemma length_lx_eq_lx' : length lx = length lx'. Proof. (* Goal: @eq nat (@length ad lx) (@length ad lx') *) unfold lx, lx' in |- *. apply length_lx_1_eq_lx'_1. Qed. Lemma ap'_eq_ap : forall n : nat, ap' n = ap (N + n). Proof. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma in_lx'_1 : forall n m : nat, m < n -> In (ap' m) (lx'_1 n). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. intros. elim (lt_n_O _ H). intros. unfold lt in H0. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (le_le_S_eq m n0). intros. right. apply H. assumption. left. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H1. reflexivity. apply le_S_n. assumption. Qed. Lemma in_lx' : forall n : nat, N <= n -> S n <= 2 * N -> In (N_of_nat n) lx'. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. replace (N_of_nat n) with (ap' (n - N)). unfold lx' in |- *. (* Goal: lt (Init.Nat.sub n N) N *) (* Goal: @eq BinNums.N (ap' (Init.Nat.sub n N)) (N.of_nat n) *) apply in_lx'_1. simpl in H0. rewrite <- (plus_n_O N) in H0. (* Goal: lt (Init.Nat.sub n N) N *) (* Goal: @eq BinNums.N (ap' (Init.Nat.sub n N)) (N.of_nat n) *) apply plus_lt_reg_l with (p := N). rewrite <- (le_plus_minus N n H). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. unfold ap' in |- *. rewrite <- (le_plus_minus N n H). reflexivity. Qed. Lemma in_lx'_1_conv : forall n m : nat, In (N_of_nat m) (lx'_1 n) -> N <= m /\ m < N + n. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction n. simpl in |- *. intros. elim H. simpl in |- *. intros. elim H0. unfold ap' in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. replace m with (N + n0). split. apply le_plus_l. (* Goal: lt n0 (S n0) *) apply plus_lt_compat_l. unfold lt in |- *. apply le_n. rewrite <- (nat_of_N_of_nat m). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) rewrite <- H1. symmetry in |- *. apply nat_of_N_of_nat. intro. elim (H _ H1). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. split. assumption. apply lt_trans with (m := N + n0). assumption. (* Goal: lt n0 (S n0) *) apply plus_lt_compat_l. unfold lt in |- *. apply le_n. Qed. Lemma mu_all_x_free : forall (t be : bool_expr) (x : BDDvar), be_x_free x (mu_all_eval t be) = true -> ~ In x lx' /\ (be_x_free x t = true \/ be_x_free x be = true /\ ~ In x lx). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold mu_all_eval in H. elim (univl_x_free _ _ _ H). intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) split. assumption. elim (impl_x_free _ _ _ H0). intro. left. assumption. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. right. elim (replacel_x_free _ _ _ _ length_lx_eq_lx' H2). trivial. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. elim (H1 H3). Qed. Lemma mu_ex_x_free : forall (t be : bool_expr) (x : BDDvar), be_x_free x (mu_ex_eval t be) = true -> ~ In x lx' /\ (be_x_free x t = true \/ be_x_free x be = true /\ ~ In x lx). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold mu_ex_eval in H. elim (exl_x_free _ _ _ H). intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) split. assumption. elim (and_x_free _ _ _ H0). intro. left. assumption. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. right. elim (replacel_x_free _ _ _ _ length_lx_eq_lx' H2). trivial. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) intro. elim (H1 H3). Qed. Definition be_le2 (be1 be2 : bool_expr) := forall ve : var_env, bool_fun_of_bool_expr be1 ve = true -> bool_fun_of_bool_expr be2 ve = true. Lemma subst_le2 : forall (x : BDDvar) (bex be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (subst x bex be1) (subst x bex be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold be_le2 in |- *. intro. intro. replace (bool_fun_of_bool_expr (subst x bex be2) ve) with (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve). (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) unfold bool_fun_subst in |- *. apply H. rewrite <- H0. symmetry in |- *. replace (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) with (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve). (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be1) ve) (bool_fun_of_bool_expr be1 (augment ve x (bool_fun_of_bool_expr bex ve))) *) (* Goal: @eq bool (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) (bool_fun_of_bool_expr (subst x bex be2) ve) *) apply (subst_ok be1 bex x). unfold bool_fun_subst in |- *. reflexivity. symmetry in |- *. (* Goal: @eq bool (bool_fun_of_bool_expr (subst x bex be2) ve) (bool_fun_subst x (bool_fun_of_bool_expr bex) (bool_fun_of_bool_expr be2) ve) *) apply (subst_ok be2 bex x). Qed. Lemma replace_le2 : forall (x y : BDDvar) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (replace x y be1) (replace x y be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold replace in |- *. intros. apply subst_le2. assumption. Qed. Lemma replacel_le2 : forall (lz ly : list ad) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (replacel be1 lz ly) (replacel be2 lz ly). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lz. intros. elim ly. assumption. simpl in |- *. intros. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. elim ly. assumption. simpl in |- *. intros. apply replace_le2. apply H. (* Goal: @eq bool (be_x_free x b0) true *) assumption. Qed. Lemma impl_le2 : forall be be1 be2 : bool_expr, be_le2 be1 be2 -> be_le2 (Impl be be1) (Impl be be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (be_x_free x (Iff b b0)) true), @eq bool (vf x) true *) unfold be_le2 in |- *. simpl in |- *. unfold bool_fun_impl in |- *. intros be be1 be2 H ve. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) elim (bool_fun_of_bool_expr be ve). simpl in |- *. intro. apply H. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) simpl in |- *. reflexivity. Qed. Lemma and_le2 : forall be1 be2 be1' be2' : bool_expr, be_le2 be1 be2 -> be_le2 be1' be2' -> be_le2 (ANd be1 be1') (ANd be2 be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le2 in |- *. simpl in |- *. unfold bool_fun_and in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (andb_prop _ _ H1). intros. rewrite (H ve H2). rewrite (H0 ve H3). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma or_le2 : forall be1 be2 be1' be2' : bool_expr, be_le2 be1 be2 -> be_le2 be1' be2' -> be_le2 (Or be1 be1') (Or be2 be2'). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le2 in |- *. simpl in |- *. unfold bool_fun_or in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (orb_prop _ _ H1). intros. rewrite (H ve H2). reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. rewrite (H0 ve H2). auto with bool. Qed. Lemma univ_le2 : forall (x : BDDvar) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (forall_ x be1) (forall_ x be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold forall_ in |- *. apply and_le2. unfold restrict in |- *. apply subst_le2. (* Goal: @eq bool (be_x_free x b0) true *) assumption. unfold restrict in |- *. apply subst_le2. assumption. Qed. Lemma ex_le2 : forall (x : BDDvar) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (be_ex x be1) (be_ex x be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold be_ex in |- *. apply or_le2. unfold restrict in |- *. apply subst_le2. (* Goal: @eq bool (be_x_free x b0) true *) assumption. unfold restrict in |- *. apply subst_le2. assumption. Qed. Lemma univl_le2 : forall (lz : list ad) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (univl be1 lz) (univl be2 lz). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lz. intros. assumption. simpl in |- *. intros. apply univ_le2. (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply H. assumption. Qed. Lemma exl_le2 : forall (lz : list ad) (be1 be2 : bool_expr), be_le2 be1 be2 -> be_le2 (exl be1 lz) (exl be2 lz). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction lz. intros. assumption. simpl in |- *. intros. apply ex_le2. (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply H. assumption. Qed. Lemma mu_all_le2 : forall t be1 be2 : bool_expr, be_le2 be1 be2 -> be_le2 (mu_all_eval t be1) (mu_all_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold mu_all_eval in |- *. apply univl_le2. apply impl_le2. (* Goal: @eq bool (be_x_free x b0) true *) apply replacel_le2. assumption. Qed. Lemma mu_ex_le2 : forall t be1 be2 : bool_expr, be_le2 be1 be2 -> be_le2 (mu_ex_eval t be1) (mu_ex_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold mu_ex_eval in |- *. apply exl_le2. apply and_le2. (* Goal: @eq bool (be_x_free x b0) true *) unfold be_le2 in |- *. auto. apply replacel_le2. assumption. Qed. Lemma be_le_le2 : forall be1 be2 : bool_expr, be_le be1 be2 -> be_le2 be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le, be_le2 in |- *. intros. unfold eval_be' in H. replace (bool_fun_of_bool_expr be2 ve) with (bool_fun_of_bool_expr be2 (var_env'_to_env (var_env_to_env' ve))). (* Goal: @eq bool (vf x) true *) (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) apply H. replace (bool_fun_of_bool_expr be1 (var_env'_to_env (var_env_to_env' ve))) with (bool_fun_of_bool_expr be1 ve). (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply (bool_fun_of_be_ext be1). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) unfold var_env'_to_env, var_env_to_env' in |- *. intro. rewrite (N_of_nat_of_N x). (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) reflexivity. apply (bool_fun_of_be_ext be2). intro. (* Goal: @eq bool (var_env'_to_env (var_env_to_env' ve) x) (ve x) *) unfold var_env'_to_env, var_env_to_env' in |- *. rewrite (N_of_nat_of_N x). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) reflexivity. Qed. Lemma be_le2_le : forall be1 be2 : bool_expr, be_le2 be1 be2 -> be_le be1 be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) unfold be_le, be_le2 in |- *. unfold eval_be' in |- *. intros. apply H. assumption. Qed. Lemma mu_all_le : forall t be1 be2 : bool_expr, be_le be1 be2 -> be_le (mu_all_eval t be1) (mu_all_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply be_le2_le. apply mu_all_le2. apply be_le_le2. assumption. Qed. Lemma mu_ex_le : forall t be1 be2 : bool_expr, be_le be1 be2 -> be_le (mu_ex_eval t be1) (mu_ex_eval t be2). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply be_le2_le. apply mu_ex_le2. apply be_le_le2. assumption. Qed. Lemma BDDmu_all_lemma : forall gc : BDDconfig -> list ad -> BDDconfig, gc_OK gc -> forall (cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul nodet -> used_node' cfg ul nodeg -> BDDconfig_OK (fst (BDDmu_all gc cfg ul nodet nodeg)) /\ config_node_OK (fst (BDDmu_all gc cfg ul nodet nodeg)) (snd (BDDmu_all gc cfg ul nodet nodeg)) /\ used_nodes_preserved cfg (fst (BDDmu_all gc cfg ul nodet nodeg)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_all gc cfg ul nodet nodeg)) (snd (BDDmu_all gc cfg ul nodet nodeg))) (bool_fun_mu_all (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold BDDmu_all in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) elim (prod_sum _ _ (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) intros cfgr H4; elim H4; clear H4; intros noder H4. rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (let (cfgi, nodei) := BDDimpl gc cfgr (@cons ad noder ul) nodet noder in BDDunivl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_all (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) elim (prod_sum _ _ (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) intros cfgi H5; elim H5; clear H5; intros nodei H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) cut (BDDconfig_OK cfgr). cut (config_node_OK cfgr noder). cut (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_nodes_preserved cfg cfgr ul). intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfgr (noder :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (used_node' cfgr (noder :: ul) noder). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_node' cfgr (noder :: ul) nodet). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (BDDconfig_OK cfgi). cut (config_node_OK cfgi nodei). (* Goal: forall (_ : config_node_OK cfgi nodei) (_ : BDDconfig_OK cfgi), and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (used_nodes_preserved cfgr cfgi (noder :: ul)). cut (bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_impl (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder))). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. cut (used_list_OK cfgi (nodei :: ul)). intros. split. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDunivl_config_OK. assumption. assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_cons_node_ul. split. apply BDDunivl_node_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. apply used_node'_cons_node_ul. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfgi). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := noder). assumption. (* Goal: used_nodes_preserved cfgi (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)) *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_nodes_preserved_cons with (node := nodei). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDunivl_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_univl (bool_fun_of_BDD cfgi nodei) lx'). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDunivl_is_univl. assumption. assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. unfold bool_fun_mu_all in |- *. (* Goal: bool_fun_eq (bool_fun_univl (bool_fun_of_BDD cfgi nodei) lx') (bool_fun_univl (bool_fun_impl (bool_fun_of_BDD cfg nodet) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')) lx') *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_impl (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply bool_fun_univl_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_impl (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)). (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply bool_fun_impl_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. assumption. assumption. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfgr). (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := noder). assumption. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDimpl gc cfgr (@cons ad noder ul) nodet noder)) nodei *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDimpl gc cfgr (@cons ad noder ul) nodet noder)) cfgi *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace nodei with (snd (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDimpl_is_impl; assumption. rewrite H5; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDimpl_used_nodes_preserved; assumption. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDimpl gc cfgr (@cons ad noder ul) nodet noder)) nodei *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDimpl gc cfgr (@cons ad noder ul) nodet noder)) cfgi *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace nodei with (snd (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDimpl_node_OK; assumption. rewrite H5; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDimpl gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDimpl_config_OK; assumption. rewrite H5; reflexivity. (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_used_nodes_preserved. assumption. intros. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: config_node_OK (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) noder *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) cfgr *) (* Goal: BDDconfig_OK cfgr *) replace noder with (snd (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_is_replacel. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: config_node_OK (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) noder *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) cfgr *) (* Goal: BDDconfig_OK cfgr *) replace noder with (snd (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_node_OK. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_config_OK. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. Qed. Section BDDmu_all_results. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Variable cfg : BDDconfig. Variable ul : list ad. Variable nodet nodeg : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis usedt : used_node' cfg ul nodet. Hypothesis usedg : used_node' cfg ul nodeg. Lemma BDDmu_all_config_OK : BDDconfig_OK (fst (BDDmu_all gc cfg ul nodet nodeg)). Proof. exact (proj1 (BDDmu_all_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)). Qed. Lemma BDDmu_all_node_OK : config_node_OK (fst (BDDmu_all gc cfg ul nodet nodeg)) (snd (BDDmu_all gc cfg ul nodet nodeg)). Proof. exact (proj1 (proj2 (BDDmu_all_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg))). Qed. Lemma BDDmu_all_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDmu_all gc cfg ul nodet nodeg)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDmu_all_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)))). Qed. Lemma BDDmu_all_list_OK : used_list_OK (fst (BDDmu_all gc cfg ul nodet nodeg)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_all gc cfg ul nodet nodeg)) ul *) exact BDDmu_all_used_nodes_preserved. Qed. Lemma BDDmu_all_list_OK_cons : used_list_OK (fst (BDDmu_all gc cfg ul nodet nodeg)) (snd (BDDmu_all gc cfg ul nodet nodeg) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDmu_all_node_OK. exact BDDmu_all_list_OK. Qed. Lemma BDDmu_all_is_mu_all : bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_all gc cfg ul nodet nodeg)) (snd (BDDmu_all gc cfg ul nodet nodeg))) (bool_fun_mu_all (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)). Proof. exact (proj2 (proj2 (proj2 (BDDmu_all_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)))). Qed. End BDDmu_all_results. Lemma BDDmu_ex_lemma : forall gc : BDDconfig -> list ad -> BDDconfig, gc_OK gc -> forall (cfg : BDDconfig) (ul : list ad) (nodet nodeg : ad), BDDconfig_OK cfg -> used_list_OK cfg ul -> used_node' cfg ul nodet -> used_node' cfg ul nodeg -> BDDconfig_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)) /\ config_node_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)) (snd (BDDmu_ex gc cfg ul nodet nodeg)) /\ used_nodes_preserved cfg (fst (BDDmu_ex gc cfg ul nodet nodeg)) ul /\ bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_ex gc cfg ul nodet nodeg)) (snd (BDDmu_ex gc cfg ul nodet nodeg))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)). Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. unfold BDDmu_ex in |- *. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) elim (prod_sum _ _ (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfgr, noder) := BDDreplacel gc cfg ul nodeg lx lx' in let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) intros cfgr H4; elim H4; clear H4; intros noder H4. rewrite H4. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) elim (prod_sum _ _ (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (config_node_OK (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx')) (@snd BDDconfig ad (let (cfga, nodea) := BDDand gc cfgr (@cons ad noder ul) nodet noder in BDDexl gc cfga (@cons ad nodea ul) nodea lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) intros cfgi H5; elim H5; clear H5; intros nodei H5. rewrite H5. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) cut (BDDconfig_OK cfgr). cut (config_node_OK cfgr noder). cut (bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_nodes_preserved cfg cfgr ul). intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) cut (used_list_OK cfgr (noder :: ul)). intro. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (used_node' cfgr (noder :: ul) noder). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) cut (used_node' cfgr (noder :: ul) nodet). intros. (* Goal: and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (BDDconfig_OK cfgi). cut (config_node_OK cfgi nodei). (* Goal: forall (_ : config_node_OK cfgi nodei) (_ : BDDconfig_OK cfgi), and (BDDconfig_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (config_node_OK (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (and (used_nodes_preserved cfg (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul) (bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg))))) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) cut (used_nodes_preserved cfgr cfgi (noder :: ul)). cut (bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder))). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. cut (used_list_OK cfgi (nodei :: ul)). intros. split. (* Goal: @eq bool (be_x_free x b0) true *) apply BDDexl_config_OK. assumption. assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_node'_cons_node_ul. split. apply BDDexl_node_OK. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. apply used_node'_cons_node_ul. split. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfgr). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_trans with (cfg2 := cfgi). assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := noder). assumption. (* Goal: used_nodes_preserved cfgi (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD (@fst BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx')) (@snd BDDconfig ad (BDDexl gc cfgi (@cons ad nodei ul) nodei lx'))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)) *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_nodes_preserved_cons with (node := nodei). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDexl_used_nodes_preserved. assumption. assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. apply bool_fun_eq_trans with (bf2 := bool_fun_exl (bool_fun_of_BDD cfgi nodei) lx'). (* Goal: @eq bool (be_x_free x b0) true *) apply BDDexl_is_exl. assumption. assumption. assumption. (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node_ul. unfold bool_fun_mu_ex in |- *. (* Goal: bool_fun_eq (bool_fun_exl (bool_fun_of_BDD cfgi nodei) lx') (bool_fun_exl (bool_fun_and (bool_fun_of_BDD cfg nodet) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx')) lx') *) (* Goal: used_list_OK cfgi (@cons ad nodei ul) *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgi nodei) (bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)) *) (* Goal: used_nodes_preserved cfgr cfgi (@cons ad noder ul) *) (* Goal: config_node_OK cfgi nodei *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply bool_fun_exl_preserves_eq. apply bool_fun_eq_trans with (bf2 := bool_fun_and (bool_fun_of_BDD cfgr nodet) (bool_fun_of_BDD cfgr noder)). (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply bool_fun_and_preserves_eq. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved'_bool_fun with (ul := ul). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. assumption. assumption. assumption. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfgr). (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_cons with (node := noder). assumption. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand gc cfgr (@cons ad noder ul) nodet noder)) nodei *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand gc cfgr (@cons ad noder ul) nodet noder)) cfgi *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace nodei with (snd (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDand_is_and; assumption. rewrite H5; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDand_used_nodes_preserved; assumption. rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: config_node_OK (@fst BDDconfig ad (BDDand gc cfgr (@cons ad noder ul) nodet noder)) nodei *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDand gc cfgr (@cons ad noder ul) nodet noder)) cfgi *) (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace nodei with (snd (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDand_node_OK; assumption. rewrite H5; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H5; reflexivity. (* Goal: BDDconfig_OK cfgi *) (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) replace cfgi with (fst (BDDand gc cfgr (noder :: ul) nodet noder)). (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) apply BDDand_config_OK; assumption. rewrite H5; reflexivity. (* Goal: used_node' cfgr (@cons ad noder ul) nodet *) (* Goal: used_node' cfgr (@cons ad noder ul) noder *) (* Goal: used_list_OK cfgr (@cons ad noder ul) *) (* Goal: used_nodes_preserved cfg cfgr ul *) (* Goal: bool_fun_eq (bool_fun_of_BDD cfgr noder) (bool_fun_replacel (bool_fun_of_BDD cfg nodeg) lx lx') *) (* Goal: config_node_OK cfgr noder *) (* Goal: BDDconfig_OK cfgr *) apply used_node'_cons_node'_ul. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_used_node' with (cfg := cfg). assumption. assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_node'_cons_node_ul. apply node_OK_list_OK. (* Goal: @eq bool (be_x_free x b0) true *) assumption. apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: @eq bool (be_x_free x b0) true *) assumption. replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_used_nodes_preserved. assumption. intros. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: config_node_OK (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) noder *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) cfgr *) (* Goal: BDDconfig_OK cfgr *) replace noder with (snd (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_is_replacel. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: config_node_OK (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) noder *) (* Goal: @eq BDDconfig (@fst BDDconfig ad (BDDreplacel gc cfg ul nodeg lx lx')) cfgr *) (* Goal: BDDconfig_OK cfgr *) replace noder with (snd (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_node_OK. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H4; reflexivity. (* Goal: BDDconfig_OK cfgr *) replace cfgr with (fst (BDDreplacel gc cfg ul nodeg lx lx')). (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply BDDreplacel_config_OK. assumption. intros. assumption. assumption. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) assumption. apply lx_neq_lx'. rewrite H4; reflexivity. Qed. Section BDDmu_ex_results. Variable gc : BDDconfig -> list ad -> BDDconfig. Hypothesis gc_is_OK : gc_OK gc. Variable cfg : BDDconfig. Variable ul : list ad. Variable nodet nodeg : ad. Hypothesis cfg_OK : BDDconfig_OK cfg. Hypothesis ul_OK : used_list_OK cfg ul. Hypothesis usedt : used_node' cfg ul nodet. Hypothesis usedg : used_node' cfg ul nodeg. Lemma BDDmu_ex_config_OK : BDDconfig_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)). Proof. exact (proj1 (BDDmu_ex_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)). Qed. Lemma BDDmu_ex_node_OK : config_node_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)) (snd (BDDmu_ex gc cfg ul nodet nodeg)). Proof. exact (proj1 (proj2 (BDDmu_ex_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg))). Qed. Lemma BDDmu_ex_used_nodes_preserved : used_nodes_preserved cfg (fst (BDDmu_ex gc cfg ul nodet nodeg)) ul. Proof. exact (proj1 (proj2 (proj2 (BDDmu_ex_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)))). Qed. Lemma BDDmu_ex_list_OK : used_list_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)) ul. Proof. (* Goal: @eq bool (be_x_free x b0) true *) apply used_nodes_preserved_list_OK with (cfg := cfg). assumption. (* Goal: used_nodes_preserved cfg (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul *) exact BDDmu_ex_used_nodes_preserved. Qed. Lemma BDDmu_ex_list_OK_cons : used_list_OK (fst (BDDmu_ex gc cfg ul nodet nodeg)) (snd (BDDmu_ex gc cfg ul nodet nodeg) :: ul). Proof. (* Goal: used_list_OK (@fst BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) (@cons ad (@snd BDDconfig ad (BDDmu_ex gc cfg ul nodet nodeg)) ul) *) apply node_OK_list_OK. exact BDDmu_ex_node_OK. exact BDDmu_ex_list_OK. Qed. Lemma BDDmu_ex_is_mu_ex : bool_fun_eq (bool_fun_of_BDD (fst (BDDmu_ex gc cfg ul nodet nodeg)) (snd (BDDmu_ex gc cfg ul nodet nodeg))) (bool_fun_mu_ex (bool_fun_of_BDD cfg nodet) (bool_fun_of_BDD cfg nodeg)). Proof. exact (proj2 (proj2 (proj2 (BDDmu_ex_lemma gc gc_is_OK cfg ul nodet nodeg cfg_OK ul_OK usedt usedg)))). Qed. End BDDmu_ex_results. End Nsec. Section Be_ok. Variable vf : ad -> bool. Inductive be_ok : bool_expr -> Prop := | zero_ok : be_ok Zero | one_ok : be_ok One | var_ok : forall x : BDDvar, vf x = true -> be_ok (Var x) | neg_ok : forall be : bool_expr, be_ok be -> be_ok (Neg be) | or_ok : forall be1 be2 : bool_expr, be_ok be1 -> be_ok be2 -> be_ok (Or be1 be2) | and_ok : forall be1 be2 : bool_expr, be_ok be1 -> be_ok be2 -> be_ok (ANd be1 be2) | impl_ok : forall be1 be2 : bool_expr, be_ok be1 -> be_ok be2 -> be_ok (Impl be1 be2) | iff_ok : forall be1 be2 : bool_expr, be_ok be1 -> be_ok be2 -> be_ok (Iff be1 be2). Lemma var_ok_inv : forall x : BDDvar, be_ok (Var x) -> vf x = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. assumption. Qed. Lemma neg_ok_inv : forall be : bool_expr, be_ok (Neg be) -> be_ok be. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. assumption. Qed. Lemma or_ok_inv : forall be1 be2 : bool_expr, be_ok (Or be1 be2) -> be_ok be1 /\ be_ok be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. auto. Qed. Lemma and_ok_inv : forall be1 be2 : bool_expr, be_ok (ANd be1 be2) -> be_ok be1 /\ be_ok be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. auto. Qed. Lemma impl_ok_inv : forall be1 be2 : bool_expr, be_ok (Impl be1 be2) -> be_ok be1 /\ be_ok be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. auto. Qed. Lemma iff_ok_inv : forall be1 be2 : bool_expr, be_ok (Iff be1 be2) -> be_ok be1 /\ be_ok be2. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H. auto. Qed. Lemma be_x_free_be_ok : forall be : bool_expr, (forall x : BDDvar, be_x_free x be = true -> vf x = true) -> be_ok be. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction be. intros. apply zero_ok. intros. apply one_ok. simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply var_ok. apply H. apply Neqb_correct. simpl in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply neg_ok. apply H. assumption. simpl in |- *. intros. apply or_ok. apply H. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply H1. rewrite H2. reflexivity. apply H0. intros. apply H1. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) rewrite H2. elim (be_x_free x b); reflexivity. simpl in |- *. intros. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply and_ok. apply H. intros. apply H1. rewrite H2. reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) apply H0. intros. apply H1. rewrite H2. elim (be_x_free x b); reflexivity. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. apply impl_ok. apply H. intros. apply H1. rewrite H2. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) reflexivity. apply H0. intros. apply H1. rewrite H2. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) elim (be_x_free x b); reflexivity. simpl in |- *. intros. apply iff_ok. apply H. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. apply H1. rewrite H2. reflexivity. apply H0. intros. apply H1. (* Goal: @eq bool (orb true (be_x_free x b0)) true *) (* Goal: be_ok b0 *) rewrite H2. elim (be_x_free x b); reflexivity. Qed. Lemma be_ok_be_x_free : forall be : bool_expr, be_ok be -> forall x : BDDvar, be_x_free x be = true -> vf x = true. Proof. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simple induction be. simpl in |- *. intros. discriminate. simpl in |- *. intros. discriminate. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. rewrite (Neqb_complete _ _ H0). inversion H. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) simpl in |- *. intros. inversion H0. apply H. assumption. assumption. simpl in |- *. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) intros. inversion H1. elim (orb_prop _ _ H2). intro. apply H. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) assumption. intro. apply H0. assumption. assumption. simpl in |- *. intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) inversion H1. elim (orb_prop _ _ H2). intro. apply H. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) assumption. intro. apply H0. assumption. assumption. simpl in |- *. intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) inversion H1. elim (orb_prop _ _ H2). intro. apply H. assumption. (* Goal: forall (b : bool_expr) (_ : forall (_ : be_ok b) (x : BDDvar) (_ : @eq bool (be_x_free x b) true), @eq bool (vf x) true) (b0 : bool_expr) (_ : forall (_ : be_ok b0) (x : BDDvar) (_ : @eq bool (be_x_free x b0) true), @eq bool (vf x) true) (_ : be_ok (Iff b b0)) (x : BDDvar) (_ : @eq bool (orb (be_x_free x b) (be_x_free x b0)) true), @eq bool (vf x) true *) assumption. intro. apply H0. assumption. assumption. simpl in |- *. intros. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) inversion H1. elim (orb_prop _ _ H2). intro. apply H. assumption. (* Goal: forall _ : @eq bool (be_x_free x b0) true, @eq bool (vf x) true *) assumption. intro. apply H0. assumption. assumption. Qed. End Be_ok.
(**************************************************************************** IEEE754 : Closest2Prop Laurent Thery ******************************************************************************) Require Export ClosestProp. Section F2. Variable b : Fbound. Variable precision : nat. Let radix := 2%Z. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Theorem TwoMoreThanOne : (1 < radix)%Z. (* Goal: Z.lt (Zpos xH) radix *) unfold radix in |- *; red in |- *; simpl in |- *; auto. Qed. Hint Resolve TwoMoreThanOne. Hypothesis precisionNotZero : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem FevenNormMin : Even (nNormMin 2%nat precision). (* Goal: Even (nNormMin (Z.of_nat (S (S O))) precision) *) unfold nNormMin in |- *. (* Goal: Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred precision)) *) generalize precisionNotZero; case precision. (* Goal: forall _ : lt (S O) (S O), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S O))) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S n))), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S (S n)))) *) intros H'2; Contradict H'2; auto with zarith. (* Goal: forall (n : nat) (_ : lt (S O) (S n)), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S n))) *) intros n; case n. (* Goal: forall _ : lt (S O) (S O), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S O))) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S n))), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S (S n)))) *) intros H'2; Contradict H'2; auto with zarith. (* Goal: forall (n : nat) (_ : lt (S O) (S (S n))), Even (Zpower_nat (Z.of_nat (S (S O))) (Init.Nat.pred (S (S n)))) *) intros n0 H'2; replace (pred (S (S n0))) with (S n0). (* Goal: Even (Zpower_nat (Z.of_nat (S (S O))) (S n0)) *) (* Goal: @eq nat (S n0) (Init.Nat.pred (S (S n0))) *) apply EvenExp; auto. (* Goal: Even (Z.of_nat (S (S O))) *) (* Goal: @eq nat (S n0) (Init.Nat.pred (S (S n0))) *) exists 1%Z; ring. (* Goal: @eq nat (S n0) (Init.Nat.pred (S (S n0))) *) simpl in |- *; auto. Qed. Theorem EvenFNSuccFNSuccMid : forall p : float, Fbounded b p -> FNeven b radix precision p -> Fminus radix (FNSucc b radix precision (FNSucc b radix precision p)) (FNSucc b radix precision p) = Fminus radix (FNSucc b radix precision p) p :>R. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : FNeven b radix precision p), @eq R (FtoRradix (Fminus radix (FNSucc b radix precision (FNSucc b radix precision p)) (FNSucc b radix precision p))) (FtoRradix (Fminus radix (FNSucc b radix precision p) p)) *) intros p H' H'0. (* Goal: @eq R (FtoRradix (Fminus radix (FNSucc b radix precision (FNSucc b radix precision p)) (FNSucc b radix precision p))) (FtoRradix (Fminus radix (FNSucc b radix precision p) p)) *) unfold FtoRradix in |- *; apply FNSuccFNSuccMid; auto. red in |- *; intros H'1; absurd (FNodd b radix precision (FNSucc b radix precision p)); auto. (* Goal: not (FNodd b radix precision (FNSucc b radix precision p)) *) unfold FNodd in |- *. (* Goal: not (Fodd (Fnormalize radix b precision (FNSucc b radix precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: not (Fodd (FNSucc b radix precision p)) *) unfold Fodd in |- *. (* Goal: not (Odd (Fnum (FNSucc b radix precision p))) *) rewrite H'1. (* Goal: not (Odd (nNormMin radix precision)) *) (* Goal: FNodd b radix precision (FNSucc b radix precision p) *) (* Goal: not (@eq Z (Fnum (FNSucc b radix precision p)) (Z.opp (nNormMin radix precision))) *) apply EvenNOdd; auto with float arith. (* Goal: Even (nNormMin radix precision) *) (* Goal: FNodd b radix precision (FNSucc b radix precision p) *) (* Goal: not (@eq Z (Fnum (FNSucc b radix precision p)) (Z.opp (nNormMin radix precision))) *) apply FevenNormMin; auto with float arith. (* Goal: FNodd b radix precision (FNSucc b radix precision p) *) (* Goal: not (@eq Z (Fnum (FNSucc b radix precision p)) (Z.opp (nNormMin radix precision))) *) apply FNevenSuc; auto. red in |- *; intros H'1; absurd (FNodd b radix precision (FNSucc b radix precision p)); auto with float arith. (* Goal: not (FNodd b radix precision (FNSucc b radix precision p)) *) unfold FNodd in |- *. (* Goal: not (Fodd (Fnormalize radix b precision (FNSucc b radix precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: not (Fodd (FNSucc b radix precision p)) *) unfold Fodd in |- *. (* Goal: not (Odd (Fnum (FNSucc b radix precision p))) *) rewrite H'1. (* Goal: not (Odd (Z.opp (nNormMin radix precision))) *) apply EvenNOdd. (* Goal: Even (Z.opp (nNormMin radix precision)) *) apply EvenOpp; apply FevenNormMin. Qed. Theorem AScal2 : forall p : float, Float (Fnum p) (Fexp p + 1%nat) = (radix * p)%R :>R. (* Goal: forall p : float, @eq R (FtoRradix (Float (Fnum p) (Z.add (Fexp p) (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix p)) *) intros p. (* Goal: @eq R (FtoRradix (Float (Fnum p) (Z.add (Fexp p) (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix p)) *) unfold FtoRradix in |- *; rewrite FvalScale; auto. replace (powerRZ radix 1%nat) with (INR 2); [ idtac | simpl in |- *; unfold radix; ring ]; auto. Qed. End F2. Hint Resolve FevenNormMin: float.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (**************************************************************************** IEEE754 : Rpower Laurent Thery ***************************************************************************** Definition of an exponential function over relative numbers *) Require Import Omega. Require Import Reals. Require Import Zpower. Require Import ZArith. Require Import Digit. Require Import Faux. Require Import sTactic. (* We have already an exponential over natural number, we prove some basic properties for this function *) Theorem pow_O : forall e : R, (e ^ 0)%R = 1%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem pow_1 : forall e : R, (e ^ 1)%R = e. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem pow_NR0 : forall (e : R) (n : nat), e <> 0%R -> (e ^ n)%R <> 0%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. Qed. Theorem pow_add : forall (e : R) (n m : nat), (e ^ (n + m))%R = (e ^ n * e ^ m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall m : nat, @eq R (pow e (Init.Nat.add n m)) (Rmult (pow e n) (pow e m))) (m : nat), @eq R (Rmult e (pow e (Init.Nat.add n m))) (Rmult (Rmult e (pow e n)) (pow e m)) *) intros n0 H' m; rewrite H'; auto with real. Qed. Hint Resolve pow_O pow_1 pow_NR0 pow_add: real. Theorem pow_RN_plus : forall (e : R) (n m : nat), e <> 0%R -> (e ^ n)%R = (e ^ (n + m) * / e ^ m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : not (@eq R e (IZR Z0))), @eq R (pow e n) (Rmult (pow e (Init.Nat.add n m)) (Rinv (pow e m)))) (m : nat) (_ : not (@eq R e (IZR Z0))), @eq R (Rmult e (pow e n)) (Rmult (Rmult e (pow e (Init.Nat.add n m))) (Rinv (pow e m))) *) intros n0 H' m H'0. (* Goal: @eq R (Rmult e (pow e n0)) (Rmult (Rmult e (pow e (Init.Nat.add n0 m))) (Rinv (pow e m))) *) rewrite Rmult_assoc; rewrite <- H'; auto. Qed. Theorem pow_lt : forall (e : R) (n : nat), (0 < e)%R -> (0 < e ^ n)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall _ : Rlt (IZR Z0) e, Rlt (IZR Z0) (pow e n)) (_ : Rlt (IZR Z0) e), Rlt (IZR Z0) (Rmult e (pow e n)) *) intros n0 H' H'0; replace 0%R with (e * 0)%R; auto with real. Qed. Hint Resolve pow_lt: real. Theorem Rlt_pow_R1 : forall (e : R) (n : nat), (1 < e)%R -> 0 < n -> (1 < e ^ n)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O O), Rlt (IZR (Zpos xH)) (IZR (Zpos xH)) *) (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O n), Rlt (IZR (Zpos xH)) (pow e n)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (Rmult e (pow e n)) *) intros H' H'0; Contradict H'0; auto with arith. (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O n), Rlt (IZR (Zpos xH)) (pow e n)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (Rmult e (pow e n)) *) intros n0; case n0. (* Goal: forall (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O O), Rlt (IZR (Zpos xH)) (pow e O)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S O)), Rlt (IZR (Zpos xH)) (Rmult e (pow e O)) *) (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (pow e (S n))) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S (S n))), Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n))) *) simpl in |- *; rewrite Rmult_1_r; auto. (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (pow e (S n))) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S (S n))), Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n))) *) intros n1 H' H'0 H'1. (* Goal: Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n1))) *) replace 1%R with (1 * 1)%R; auto with real. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (IZR (Zpos xH))) (Rmult e (pow e (S n1))) *) apply Rlt_trans with (r2 := (e * 1)%R); auto with real. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (Rmult (pow e n) (IZR Z0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rmult_lt_compat_l; auto with real. (* Goal: Rlt (IZR Z0) e *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_trans with (r2 := 1%R); auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (S n1)) *) apply H'; auto with arith. Qed. Hint Resolve Rlt_pow_R1: real. Theorem Rlt_pow : forall (e : R) (n m : nat), (1 < e)%R -> n < m -> (e ^ n < e ^ m)%R. (* Goal: forall (e : R) (n m : nat) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt n m), Rlt (pow e n) (pow e m) *) intros e n m H' H'0; replace m with (m - n + n). (* Goal: Rlt (pow e n) (pow e (Init.Nat.add (Init.Nat.sub m n) n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite pow_add. pattern (e ^ n)%R at 1 in |- *; replace (e ^ n)%R with (1 * e ^ n)%R; auto with real. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (pow e n)) (Rmult (pow e (Init.Nat.sub m n)) (pow e n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rminus_lt. repeat rewrite (fun x : R => Rmult_comm x (e ^ n)); rewrite <- Rmult_minus_distr_l. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) replace 0%R with (e ^ n * 0)%R; auto with real. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (Rmult (pow e n) (IZR Z0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rmult_lt_compat_l; auto with real. (* Goal: Rlt (IZR Z0) (pow e n) *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply pow_lt; auto with real. (* Goal: Rlt (IZR Z0) e *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_trans with (r2 := 1%R); auto with real. (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_minus; auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_pow_R1; auto with arith. (* Goal: lt O (Init.Nat.sub m n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply plus_lt_reg_l with (p := n); auto with arith. (* Goal: lt (Init.Nat.add n O) (Init.Nat.add n (Init.Nat.sub m n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite le_plus_minus_r; auto with arith; rewrite <- plus_n_O; auto. (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite plus_comm; auto with arith. Qed. Hint Resolve Rlt_pow: real. Theorem pow_R1 : forall (r : R) (n : nat), (r ^ n)%R = 1%R -> Rabs r = 1%R \/ n = 0. intros r n H'. case (Req_dec (Rabs r) 1); auto; intros H'1. case (Rdichotomy _ _ H'1); intros H'2. generalize H'; case n; auto. intros n0 H'0. cut (r <> 0%R); [ intros Eq1 | idtac ]. 2: Contradict H'0; auto with arith. 2: simpl in |- *; rewrite H'0; rewrite Rmult_0_l; auto with real. cut (Rabs r <> 0%R); [ intros Eq2 | apply Rabs_no_R0 ]; auto. absurd (Rabs (/ r) ^ 0 < Rabs (/ r) ^ S n0)%R; auto. replace (Rabs (/ r) ^ S n0)%R with 1%R. simpl in |- *; apply Rlt_irrefl; auto. rewrite Rabs_Rinv; auto. rewrite <- Rinv_pow; auto. rewrite RPow_abs; auto. rewrite H'0; rewrite Rabs_right; auto with real. apply Rlt_pow; auto with arith. rewrite Rabs_Rinv; auto. apply Rmult_lt_reg_l with (r := Rabs r). case (Rabs_pos r); auto. intros H'3; case Eq2; auto. rewrite Rmult_1_r; rewrite Rinv_r; auto with real. generalize H'; case n; auto. intros n0 H'0. cut (r <> 0%R); [ intros Eq1 | auto with real ]. 2: Contradict H'0; simpl in |- *; rewrite H'0; rewrite Rmult_0_l; auto with real. cut (Rabs r <> 0%R); [ intros Eq2 | apply Rabs_no_R0 ]; auto. absurd (Rabs r ^ 0 < Rabs r ^ S n0)%R; auto with real arith. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) repeat rewrite RPow_abs; rewrite H'0; simpl in |- *; auto with real. Qed. Theorem Zpower_NR0 : forall (e : BinInt.Z) (n : nat), (0 <= e)%Z -> (0 <= Zpower_nat e n)%Z. intros e n; elim n; unfold Zpower_nat in |- *; simpl in |- *; (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. Theorem Zpower_NR1 : forall (e : BinInt.Z) (n : nat), (1 <= e)%Z -> (1 <= Zpower_nat e n)%Z. intros e n; elim n; unfold Zpower_nat in |- *; simpl in |- *; (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. Hint Resolve Zpower_NR0 Zpower_NR1: zarith. (* To define exponential over relative number, we simply do a case analysis on the sign of the number *) Definition powerRZ (e : R) (n : BinInt.Z) := match n with | BinInt.Z0 => 1%R | BinInt.Zpos p => (e ^ BinPos.nat_of_P p)%R | BinInt.Zneg p => (/ e ^ BinPos.nat_of_P p)%R end. (* we now prove some basic properties of our exponential *) Theorem powerRZ_O : forall e : R, powerRZ e 0 = 1%R. (* Goal: forall e : R, @eq R (powerRZ e Z0) (IZR (Zpos xH)) *) simpl in |- *; auto. Qed. Theorem powerRZ_1 : forall e : R, powerRZ e (Zsucc 0) = e. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem powerRZ_NOR : forall (e : R) (z : BinInt.Z), e <> 0%R -> powerRZ e z <> 0%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z; case z; simpl in |- *; auto with real. Qed. Hint Resolve powerRZ_O powerRZ_1 powerRZ_NOR: real. Theorem powerRZ_add : forall (e : R) (n m : BinInt.Z), e <> 0%R -> powerRZ e (n + m) = (powerRZ e n * powerRZ e m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n m; case n; case m; simpl in |- *; auto with real. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1; rewrite Pnat.nat_of_P_plus_morphism; auto with real. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare m1 n1 Datatypes.Eq); simpl in |- *; auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Eq) (_ : not (@eq R e (IZR Z0))), @eq R (IZR (Zpos xH)) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite BinPos.Pcompare_Eq_eq with (1 := H'); auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (Pnat.nat_of_P_minus_morphism n1 m1); auto with real. rewrite (pow_RN_plus e (BinPos.nat_of_P n1 - BinPos.nat_of_P m1) (BinPos.nat_of_P m1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1))))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: le (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_mult_distr; auto with real. (* Goal: @eq R (Rmult (Rinv (pow e (Pos.to_nat n1))) (Rinv (Rinv (pow e (Pos.to_nat m1))))) (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1)))) *) (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: @eq comparison (Pos.compare_cont Eq n1 m1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq m1 n1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub m1 n1))) (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1)))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_involutive; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply Pnat.nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply BinPos.ZC2; auto. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (Pnat.nat_of_P_minus_morphism m1 n1); auto with real. rewrite (pow_RN_plus e (BinPos.nat_of_P m1 - BinPos.nat_of_P n1) (BinPos.nat_of_P n1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) change (BinPos.nat_of_P m1 > BinPos.nat_of_P n1) in |- *. (* Goal: gt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply Pnat.nat_of_P_gt_Gt_compare_morphism; auto. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare n1 m1 Datatypes.Eq); simpl in |- *; auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Eq) (_ : not (@eq R e (IZR Z0))), @eq R (IZR (Zpos xH)) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite BinPos.Pcompare_Eq_eq with (1 := H'); auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (Pnat.nat_of_P_minus_morphism m1 n1); auto with real. rewrite (pow_RN_plus e (BinPos.nat_of_P m1 - BinPos.nat_of_P n1) (BinPos.nat_of_P n1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1))))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: le (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_mult_distr; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply Pnat.nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply BinPos.ZC2; auto. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (Pnat.nat_of_P_minus_morphism n1 m1); auto with real. rewrite (pow_RN_plus e (BinPos.nat_of_P n1 - BinPos.nat_of_P m1) (BinPos.nat_of_P m1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) change (BinPos.nat_of_P n1 > BinPos.nat_of_P m1) in |- *. (* Goal: gt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply Pnat.nat_of_P_gt_Gt_compare_morphism; auto. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1; rewrite Pnat.nat_of_P_plus_morphism; auto with real. (* Goal: forall _ : not (@eq R e (IZR Z0)), @eq R (Rinv (pow e (Init.Nat.add (Pos.to_nat m1) (Pos.to_nat n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat n1)))) *) intros H'; rewrite pow_add; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (pow e (Pos.to_nat n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat n1)))) *) apply Rinv_mult_distr; auto. (* Goal: not (@eq R (pow e (Pos.to_nat n1)) (IZR Z0)) *) apply pow_NR0; auto. (* Goal: not (@eq R (pow e (Pos.to_nat n1)) (IZR Z0)) *) apply pow_NR0; auto. Qed. Hint Resolve powerRZ_O powerRZ_1 powerRZ_NOR powerRZ_add: real. Theorem powerRZ_Zopp : forall (e : R) (z : BinInt.Z), e <> 0%R -> powerRZ e (- z) = (/ powerRZ e z)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z H; case z; simpl in |- *; auto with real. (* Goal: forall p : positive, @eq R (pow e (Pos.to_nat p)) (Rinv (Rinv (pow e (Pos.to_nat p)))) *) intros p; apply sym_eq; apply Rinv_involutive. (* Goal: not (@eq R (pow e (Pos.to_nat p)) (IZR Z0)) *) apply pow_nonzero; auto. Qed. Theorem powerRZ_Zs : forall (e : R) (n : BinInt.Z), e <> 0%R -> powerRZ e (Zsucc n) = (e * powerRZ e n)%R. (* Goal: forall (e : R) (n : Z) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.succ n)) (Rmult e (powerRZ e n)) *) intros e n H'0. (* Goal: @eq R (powerRZ e (Z.succ n)) (Rmult e (powerRZ e n)) *) replace (Zsucc n) with (n + Zsucc 0)%Z. (* Goal: @eq R (powerRZ e (Z.add n (Z.succ Z0))) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite powerRZ_add; auto. (* Goal: @eq R (Rmult (powerRZ e n) (powerRZ e (Z.succ Z0))) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite powerRZ_1. (* Goal: @eq R (Rmult (powerRZ e n) e) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite Rmult_comm; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. (* Conversion theorem between relative numbers and reals *) Theorem Zpower_nat_powerRZ : forall (n : BinInt.Z) (m : nat), IZR (Zpower_nat n m) = powerRZ (IZR n) (Z_of_nat m). (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros n m; elim m; simpl in |- *; auto with real. (* Goal: forall (n0 : nat) (_ : @eq R (IZR (Zpower_nat n n0)) (powerRZ (IZR n) (Z.of_nat n0))), @eq R (IZR (Z.mul n (Zpower_nat n n0))) (pow (IZR n) (Pos.to_nat (Pos.of_succ_nat n0))) *) intros m1 H'; rewrite Pnat.nat_of_P_o_P_of_succ_nat_eq_succ; simpl in |- *. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) replace (Zpower_nat n (S m1)) with (n * Zpower_nat n m1)%Z. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) rewrite Rmult_IZR; auto with real. (* Goal: @eq R (Rmult (IZR n) (IZR (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) rewrite H'; simpl in |- *. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) case m1; simpl in |- *; auto with real. (* Goal: forall n0 : nat, @eq R (Rmult (IZR n) (pow (IZR n) (Pos.to_nat (Pos.of_succ_nat n0)))) (Rmult (IZR n) (Rmult (IZR n) (pow (IZR n) n0))) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) intros m2; rewrite Pnat.nat_of_P_o_P_of_succ_nat_eq_succ; auto. (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) unfold Zpower_nat in |- *; auto. Qed. Theorem powerRZ_lt : forall (e : R) (z : BinInt.Z), (0 < e)%R -> (0 < powerRZ e z)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z; case z; simpl in |- *; auto with real. Qed. Hint Resolve powerRZ_lt: real. Theorem powerRZ_le : forall (e : R) (z : BinInt.Z), (0 < e)%R -> (0 <= powerRZ e z)%R. (* Goal: forall (e : R) (z : Z) (_ : Rlt (IZR Z0) e), Rle (IZR Z0) (powerRZ e z) *) intros e z H'; apply Rlt_le; auto with real. Qed. Hint Resolve powerRZ_le: real. Theorem Rlt_powerRZ : forall (e : R) (n m : BinInt.Z), (1 < e)%R -> (n < m)%Z -> (powerRZ e n < powerRZ e m)%R. intros e n m; case n; case m; simpl in |- *; try (unfold Zlt in |- *; intros; discriminate); auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zpos p0) (Zpos p)), Rlt (pow e (Pos.to_nat p0)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rlt_pow; auto with real. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply Pnat.nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p H' H'0; replace 1%R with (/ 1)%R; auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rlt_trans with (r2 := 1%R). (* Goal: Rlt (Rinv (pow e (Pos.to_nat p0))) (IZR (Zpos xH)) *) (* Goal: Rlt (IZR (Zpos xH)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) replace 1%R with (/ 1)%R; auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply Rlt_pow_R1; auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rinv_1_lt_contravar; auto with real. (* Goal: Rlt (pow e (Pos.to_nat p)) (pow e (Pos.to_nat p0)) *) apply Rlt_pow; auto with real. (* Goal: lt (Pos.to_nat p) (Pos.to_nat p0) *) apply Pnat.nat_of_P_lt_Lt_compare_morphism; rewrite BinPos.ZC4; auto. Qed. Hint Resolve Rlt_powerRZ: real. Theorem Rpow_R1 : forall (r : R) (z : BinInt.Z), r <> 0%R -> powerRZ r z = 1%R -> Rabs r = 1%R \/ z = 0%Z. (* Goal: forall (r : R) (z : Z) (_ : not (@eq R r (IZR Z0))) (_ : @eq R (powerRZ r z) (IZR (Zpos xH))), or (@eq R (Rabs r) (IZR (Zpos xH))) (@eq Z z Z0) *) intros r z; case z; simpl in |- *; auto; intros p H' H'1; left. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) case (pow_R1 _ _ H'1); auto. (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0; Contradict H'0; auto with zarith; apply convert_not_O. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite Rinv_pow in H'1; auto. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) case (pow_R1 _ _ H'1); auto. (* Goal: forall _ : @eq R (Rabs (Rinv r)) (IZR (Zpos xH)), @eq R (Rabs r) (IZR (Zpos xH)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite <- H'0. (* Goal: @eq R (Rabs r) (Rabs (Rinv r)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) apply Rmult_eq_reg_l with (r := 1%R); auto with real. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (Rabs r)) (Rmult (IZR (Zpos xH)) (Rabs (Rinv r))) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) pattern 1%R at 1 in |- *; rewrite <- H'0; auto with real. pattern (Rabs (/ r)) at 1 in |- *; rewrite Rabs_Rinv; try rewrite Rinv_l; auto with real. (* Goal: @eq R (IZR (Zpos xH)) (Rmult (IZR (Zpos xH)) (Rabs (Rinv r))) *) (* Goal: not (@eq R (Rabs r) (IZR Z0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite H'0; auto with real. (* Goal: not (@eq R (Rabs r) (IZR Z0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) apply Rabs_no_R0; auto. (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0; Contradict H'0; auto with zarith; apply convert_not_O. Qed. Theorem Rpow_eq_inv : forall (r : R) (p q : BinInt.Z), r <> 0%R -> Rabs r <> 1%R -> powerRZ r p = powerRZ r q -> p = q. (* Goal: forall (r : R) (p q : Z) (_ : not (@eq R r (IZR Z0))) (_ : not (@eq R (Rabs r) (IZR (Zpos xH)))) (_ : @eq R (powerRZ r p) (powerRZ r q)), @eq Z p q *) intros r p q H' H'0 H'1. (* Goal: @eq Z p q *) cut (powerRZ r (p - q) = 1%R); [ intros Eq0 | idtac ]. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) case (Rpow_R1 _ _ H' Eq0); auto with zarith. (* Goal: forall _ : @eq R (Rabs r) (IZR (Zpos xH)), @eq Z p q *) (* Goal: @eq R (powerRZ r (Z.sub p q)) (IZR (Zpos xH)) *) intros H'2; case H'0; auto. (* Goal: @eq R (powerRZ r (Z.sub p q)) (IZR (Zpos xH)) *) apply Rmult_eq_reg_l with (r := powerRZ r q); auto with real. (* Goal: @eq R (Rmult (powerRZ r q) (powerRZ r (Z.sub p q))) (Rmult (powerRZ r q) (IZR (Zpos xH))) *) rewrite <- powerRZ_add; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) replace (q + (p - q))%Z with p; auto with zarith. (* Goal: @eq R (powerRZ r p) (Rmult (powerRZ r q) (IZR (Zpos xH))) *) rewrite <- H'1; rewrite Rmult_1_r; auto with arith. Qed. Theorem Zpower_nat_powerRZ_absolu : forall n m : BinInt.Z, (0 <= m)%Z -> IZR (Zpower_nat n (Zabs_nat m)) = powerRZ (IZR n) m. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros n m; case m; simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros p H'; elim (BinPos.nat_of_P p); simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros n0 H'0; rewrite <- H'0; simpl in |- *; auto with zarith. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n n0))) (Rmult (IZR n) (IZR (Zpower_nat n n0))) *) (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq R (IZR (Zpower_nat n (Pos.to_nat p))) (Rinv (pow (IZR n) (Pos.to_nat p))) *) rewrite <- Rmult_IZR; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros p H'; Contradict H'; auto with zarith. Qed. Theorem powerRZ_R1 : forall n : BinInt.Z, powerRZ 1 n = 1%R. (* Goal: forall e : R, @eq R (powerRZ e Z0) (IZR (Zpos xH)) *) intros n; case n; simpl in |- *; auto. intros p; elim (BinPos.nat_of_P p); simpl in |- *; auto; intros n0 H'; rewrite H'; ring. (* Goal: forall p : positive, @eq R (Rinv (pow (IZR (Zpos xH)) (Pos.to_nat p))) (IZR (Zpos xH)) *) intros p; elim (BinPos.nat_of_P p); simpl in |- *. (* Goal: @eq R (Rinv (IZR (Zpos xH))) (IZR (Zpos xH)) *) (* Goal: forall (n : nat) (_ : @eq R (Rinv (pow (IZR (Zpos xH)) n)) (IZR (Zpos xH))), @eq R (Rinv (Rmult (IZR (Zpos xH)) (pow (IZR (Zpos xH)) n))) (IZR (Zpos xH)) *) exact Rinv_1. intros n1 H'; rewrite Rinv_mult_distr; try rewrite Rinv_1; try rewrite H'; auto with real. Qed. Theorem Rle_powerRZ : forall (e : R) (n m : BinInt.Z), (1 <= e)%R -> (n <= m)%Z -> (powerRZ e n <= powerRZ e m)%R. (* Goal: forall (e : R) (n m : Z) (_ : Rle (IZR (Zpos xH)) e) (_ : Rlt (powerRZ e n) (powerRZ e m)), Z.lt n m *) intros e n m H' H'0. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) case H'; intros E1. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) case (Zle_lt_or_eq _ _ H'0); intros E2. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) apply Rlt_le; auto with real. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) rewrite <- E2; auto with real. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) repeat rewrite <- E1; repeat rewrite powerRZ_R1; auto with real. Qed. Theorem Zlt_powerRZ : forall (e : R) (n m : BinInt.Z), (1 <= e)%R -> (powerRZ e n < powerRZ e m)%R -> (n < m)%Z. (* Goal: forall (e : R) (n m : Z) (_ : Rle (IZR (Zpos xH)) e) (_ : Rlt (powerRZ e n) (powerRZ e m)), Z.lt n m *) intros e n m H' H'0. (* Goal: Z.lt n m *) case (Zle_or_lt m n); auto; intros Z1. (* Goal: Z.lt n m *) Contradict H'0. (* Goal: not (Rlt (powerRZ e n) (powerRZ e m)) *) apply Rle_not_lt. (* Goal: Rle (powerRZ e m) (powerRZ e n) *) apply Rle_powerRZ; auto. Qed.
(**************************************************************************** IEEE754 : MSBProp Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export MSB. Section MSBProp. Variable b : Fbound. Variable precision : nat. Variable radix : Z. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO : (0 < radix)%Z := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem boundOnePrecision : forall a : float, Fbounded b a -> (Rabs a < Float 1%nat (precision + Fexp a))%R. (* Goal: forall (a : float) (_ : Fbounded b a), Rlt (Rabs (FtoRradix a)) (FtoRradix (Float (Z.of_nat (S O)) (Z.add (Z.of_nat precision) (Fexp a)))) *) intros a H. replace (FtoRradix (Float 1%nat (precision + Fexp a))) with (FtoRradix (Fshift radix precision (Float 1%nat (precision + Fexp a)))); [ idtac | apply (FshiftCorrect radix); auto ]. (* Goal: Rlt (Rabs (FtoRradix a)) (FtoRradix (Fshift radix precision (Float (Z.of_nat (S O)) (Z.add (Z.of_nat precision) (Fexp a))))) *) unfold Fshift, FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Rlt (Rabs (Rmult (IZR (Fnum a)) (powerRZ (IZR radix) (Fexp a)))) (Rmult (IZR match Zpower_nat radix precision with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end) (powerRZ (IZR radix) (Z.sub (Z.add (Z.of_nat precision) (Fexp a)) (Z.of_nat precision)))) *) rewrite <- pGivesBound. (* Goal: Rlt (Rabs (Rmult (IZR (Fnum a)) (powerRZ (IZR radix) (Fexp a)))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.sub (Z.add (Z.of_nat precision) (Fexp a)) (Z.of_nat precision)))) *) replace (precision + Fexp a - precision)%Z with (Fexp a); [ idtac | ring ]. rewrite Rabs_mult; rewrite (fun x y => Rabs_pos_eq (powerRZ x y)); auto with real zarith. (* Goal: Rlt (Rmult (Rabs (IZR (Fnum a))) (powerRZ (IZR radix) (Fexp a))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Fexp a))) *) apply Rlt_monotony_exp; auto with float real zarith. (* Goal: Rlt (Rabs (IZR (Fnum a))) (IZR (Zpos (vNum b))) *) rewrite Faux.Rabsolu_Zabs; auto with float real zarith. Qed. Theorem boundNormalMult : forall x y : float, Fnormal radix b x -> Fbounded b y -> (Rabs y * Float 1%nat (Fexp x) < radix * (Rabs x * Float 1%nat (Fexp y)))%R. (* Goal: forall (x y : float) (_ : Fnormal radix b x) (_ : Fbounded b y), Rlt (Rmult (Rabs (FtoRradix y)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rmult (Rabs (FtoRradix x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))))) *) intros x y H H0. apply Rlt_le_trans with (Float (Zpos (vNum b)) (Fexp y) * Float 1%nat (Fexp x))%R. (* Goal: Rlt (Rmult (Rabs (FtoRradix y)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: Rle (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rmult (Rabs (FtoRradix x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))))) *) apply Rmult_lt_compat_r. (* Goal: Rle (IZR Z0) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))) *) (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rabs (FtoRradix x))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *. replace (1 * powerRZ radix (Fexp x))%R with (powerRZ radix (Fexp x)); [ idtac | ring ]. (* Goal: Rlt (IZR Z0) (powerRZ (IZR radix) (Fexp x)) *) (* Goal: Rlt (Rabs (FtoRradix y)) (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) *) (* Goal: Rle (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rmult (Rabs (FtoRradix x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))))) *) apply powerRZ_lt; auto with real arith. (* Goal: Rlt (Rabs (FtoRradix y)) (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) *) (* Goal: Rle (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rmult (Rabs (FtoRradix x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))))) *) unfold FtoRradix in |- *; apply MaxFloat; auto. replace (Float (Zpos (vNum b)) (Fexp y) * Float 1%nat (Fexp x))%R with (Zpos (vNum b) * Float 1%nat (Fexp x) * Float 1%nat (Fexp y))%R. replace (radix * (Rabs x * Float 1%nat (Fexp y)))%R with (radix * Rabs x * Float 1%nat (Fexp y))%R; [ idtac | ring ]. (* Goal: Rle (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (Rmult (IZR radix) (Rabs (FtoRradix x))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) apply Rmult_le_compat_r. (* Goal: Rle (IZR Z0) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y))) *) (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rabs (FtoRradix x))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *. replace (1 * powerRZ radix (Fexp y))%R with (powerRZ radix (Fexp y)); [ idtac | ring ]. (* Goal: Rle (IZR Z0) (powerRZ (IZR radix) (Fexp y)) *) (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (Rmult (IZR radix) (Rabs (FtoRradix x))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) apply powerRZ_le; auto with real arith. replace (Zpos (vNum b) * Float 1%nat (Fexp x))%R with (FtoRradix (Float (Zpos (vNum b)) (Fexp x))). (* Goal: Rle (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR radix) (Rabs (FtoRradix x))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) rewrite <- (Fabs_correct radix); auto with real zarith. (* Goal: Rle (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR radix) (FtoR radix (Fabs x))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) unfold Fabs, FtoRradix, FtoR in |- *. (* Goal: Rle (Rmult (IZR (Fnum (Float (Zpos (vNum b)) (Fexp x)))) (powerRZ (IZR radix) (Fexp (Float (Zpos (vNum b)) (Fexp x))))) (Rmult (IZR radix) (Rmult (IZR (Fnum (Float (Z.abs (Fnum x)) (Fexp x)))) (powerRZ (IZR radix) (Fexp (Float (Z.abs (Fnum x)) (Fexp x)))))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) rewrite <- Rmult_assoc. (* Goal: Rle (Rmult (IZR (Fnum (Float (Zpos (vNum b)) (Fexp x)))) (powerRZ (IZR radix) (Fexp (Float (Zpos (vNum b)) (Fexp x))))) (Rmult (Rmult (IZR radix) (IZR (Fnum (Float (Z.abs (Fnum x)) (Fexp x))))) (powerRZ (IZR radix) (Fexp (Float (Z.abs (Fnum x)) (Fexp x))))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) apply Rle_monotone_exp; auto with real arith. (* Goal: Rle (IZR (Fnum (Float (Zpos (vNum b)) (Fexp x)))) (Rmult (IZR radix) (IZR (Fnum (Float (Z.abs (Fnum x)) (Fexp x))))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) rewrite <- Rmult_IZR; apply Rle_IZR; simpl in |- *. rewrite <- (Zabs_eq radix); auto with zarith; rewrite <- Zabs_Zmult; auto with float. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Fnum x))) *) (* Goal: @eq R (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) case H; simpl in |- *; auto. (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. (* Goal: @eq R (Rmult (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp y)))) (Rmult (FtoRradix (Float (Zpos (vNum b)) (Fexp y))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. Qed. End MSBProp.
(**************************************************************************** IEEE754 : Faux Laurent Thery ***************************************************************************** Auxillary properties about natural numbers, relative numbers and reals *) Require Export Min. Require Export Arith. Require Export Reals. Require Export Zpower. Require Export ZArith. Require Export Zcomplements. Require Export sTactic. Hint Resolve R1_neq_R0: real. (*Missing rule for nat *) Theorem minus_minus : forall a b : nat, a <= b -> b - (b - a) = a. (* Goal: forall (a b : nat) (_ : le a b), @eq nat (Init.Nat.sub b (Init.Nat.sub b a)) a *) intros a b H'. (* Goal: @eq nat (Init.Nat.sub b (Init.Nat.sub b a)) a *) apply sym_equal. (* Goal: @eq nat a (Init.Nat.sub b (Init.Nat.sub b a)) *) apply plus_minus; auto. (* Goal: @eq nat b (Init.Nat.add (Init.Nat.sub b a) a) *) rewrite plus_comm; apply le_plus_minus; auto. Qed. Theorem lte_comp_mult : forall p q r t : nat, p <= q -> r <= t -> p * r <= q * t. (* Goal: forall (p q r t : nat) (_ : le p q) (_ : le r t), le (Init.Nat.mul p r) (Init.Nat.mul q t) *) intros p q r t H'; elim H'; simpl in |- *; auto with arith. (* Goal: forall (m : nat) (_ : le p m) (_ : forall _ : le r t, le (Init.Nat.mul p r) (Init.Nat.mul m t)) (_ : le r t), le (Init.Nat.mul p r) (Init.Nat.add t (Init.Nat.mul m t)) *) elim p; simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : le n m) (_ : forall _ : le r t, le (Init.Nat.mul n r) (Init.Nat.mul m t)) (_ : le r t), le (Init.Nat.mul n r) (Init.Nat.add t (Init.Nat.mul m t))) (m : nat) (_ : le (S n) m) (_ : forall _ : le r t, le (Init.Nat.add r (Init.Nat.mul n r)) (Init.Nat.mul m t)) (_ : le r t), le (Init.Nat.add r (Init.Nat.mul n r)) (Init.Nat.add t (Init.Nat.mul m t)) *) intros n H m H0 H1 H2; apply plus_le_compat; auto with arith. (* Goal: le (Init.Nat.mul n r) (Init.Nat.mul m t) *) apply le_trans with (m := r + n * r); auto with arith. Qed. Hint Resolve lte_comp_mult: arith. Theorem le_refl_eq : forall n m : nat, n = m -> n <= m. (* Goal: forall (n m : nat) (_ : @eq nat n m), le n m *) intros n m H'; rewrite H'; auto. Qed. Theorem lt_le_pred : forall n m : nat, n < m -> n <= pred m. (* Goal: forall (n m : nat) (_ : lt n m), le n (Init.Nat.pred m) *) intros n m H'; inversion H'; simpl in |- *; auto. (* Goal: le n m0 *) apply le_trans with (S n); auto. Qed. Theorem lt_comp_mult_l : forall p q r : nat, 0 < p -> q < r -> p * q < p * r. (* Goal: forall (p q r : nat) (_ : lt O p) (_ : lt q r), lt (Init.Nat.mul p q) (Init.Nat.mul p r) *) intros p; elim p; simpl in |- *. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) auto with arith. (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n0; case n0. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.mul (S n) q) (Init.Nat.mul (S n) r)) (q r : nat) (_ : lt O (S (S n))) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul (S n) q)) (Init.Nat.add r (Init.Nat.mul (S n) r)) *) intros n1 H' q r H'0 H'1. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply lt_trans with (m := q + S n1 * r); auto with arith. Qed. Hint Resolve lt_comp_mult_l: arith. Theorem lt_comp_mult_r : forall p q r : nat, 0 < p -> q < r -> q * p < r * p. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros; repeat rewrite (fun x : nat => mult_comm x p); auto with arith. Qed. Hint Resolve lt_comp_mult_r: arith. Theorem lt_comp_mult : forall p q r s : nat, p < q -> r < s -> p * r < q * s. (* Goal: forall (p q r s : nat) (_ : lt p q) (_ : lt r s), lt (Init.Nat.mul p r) (Init.Nat.mul q s) *) intros p q r s; case q. (* Goal: forall (_ : lt p O) (_ : lt r s), lt (Init.Nat.mul p r) (Init.Nat.mul O s) *) (* Goal: forall (n : nat) (_ : lt p (S n)) (_ : lt r s), lt (Init.Nat.mul p r) (Init.Nat.mul (S n) s) *) intros H'; inversion H'. (* Goal: forall (n : nat) (_ : lt p (S n)) (_ : lt r s), lt (Init.Nat.mul p r) (Init.Nat.mul (S n) s) *) intros q'; case p. intros H' H'0; simpl in |- *; apply le_lt_trans with (m := r); (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros p' H' H'0; apply le_lt_trans with (m := S q' * r); auto with arith. Qed. Hint Resolve lt_comp_mult: arith. Theorem mult_eq_inv : forall n m p : nat, 0 < n -> n * m = n * p -> m = p. (* Goal: forall (n m p : nat) (_ : lt O n) (_ : @eq nat (Init.Nat.mul n m) (Init.Nat.mul n p)), @eq nat m p *) intros n m p H' H'0. (* Goal: @eq nat m p *) apply le_antisym; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) case (le_or_lt m p); intros H'1; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) absurd (n * p < n * m); auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite H'0; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) case (le_or_lt p m); intros H'1; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) absurd (n * m < n * p); auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite H'0; auto with arith. Qed. Definition natEq : forall n m : nat, {n = m} + {n <> m}. (* Goal: forall n m : nat, sumbool (@eq nat n m) (not (@eq nat n m)) *) intros n; elim n. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros m; case m; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n0 H' m; case m; auto with arith. Defined. Theorem notEqLt : forall n : nat, 0 < n -> n <> 0. (* Goal: forall (n : nat) (_ : lt O n), not (@eq nat n O) *) intros n H'; Contradict H'; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite H'; auto with arith. Qed. Hint Resolve notEqLt: arith. Theorem lt_next : forall n m : nat, n < m -> m = S n \/ S n < m. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n m H'; elim H'; auto with arith. Qed. Theorem le_next : forall n m : nat, n <= m -> m = n \/ S n <= m. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n m H'; case (le_lt_or_eq _ _ H'); auto with arith. Qed. Theorem min_or : forall n m : nat, min n m = n /\ n <= m \/ min n m = m /\ m < n. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n; elim n; simpl in |- *; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n' Rec m; case m; simpl in |- *; auto with arith. intros m'; elim (Rec m'); intros H'0; case H'0; clear H'0; intros H'0 H'1; (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite H'0; auto with arith. Qed. Theorem minus_inv_lt_aux : forall n m : nat, n - m = 0 -> n - S m = 0. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n; elim n; simpl in |- *; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n0 H' m; case m; auto with arith. (* Goal: forall _ : @eq nat (S n0) O, @eq nat (Init.Nat.sub n0 O) O *) intros H'0; discriminate. Qed. Theorem minus_inv_lt : forall n m : nat, m <= n -> m - n = 0. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n m H'; elim H'; simpl in |- *; auto with arith. (* Goal: forall (m0 : nat) (_ : le m m0) (_ : @eq nat (Init.Nat.sub m m0) O), @eq nat (Init.Nat.sub m (S m0)) O *) intros m0 H'0 H'1; apply minus_inv_lt_aux; auto. Qed. Theorem minus_le : forall m n p q : nat, m <= n -> p <= q -> m - q <= n - p. (* Goal: forall (m n p q : nat) (_ : le m n) (_ : le p q), le (Init.Nat.sub m q) (Init.Nat.sub n p) *) intros m n p q H' H'0. (* Goal: le (Init.Nat.sub m q) (Init.Nat.sub n p) *) case (le_or_lt m q); intros H'1. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite minus_inv_lt with (1 := H'1); auto with arith. (* Goal: le (Init.Nat.sub m q) (Init.Nat.sub n p) *) apply (fun p n m : nat => plus_le_reg_l n m p) with (p := q). (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite le_plus_minus_r; auto with arith. (* Goal: le m (Init.Nat.add q (Init.Nat.sub n p)) *) rewrite (le_plus_minus p q); auto. (* Goal: le m (Init.Nat.add (Init.Nat.add p (Init.Nat.sub q p)) (Init.Nat.sub n p)) *) rewrite (plus_comm p). (* Goal: le m (Init.Nat.add (Nat.add (Init.Nat.sub q p) p) (Init.Nat.sub n p)) *) rewrite plus_assoc_reverse. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite le_plus_minus_r; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply le_trans with (1 := H'); auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply le_trans with (1 := H'0); auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply le_trans with (2 := H'); auto with arith. Qed. Theorem lt_minus_inv : forall n m p : nat, n <= p -> m < n -> p - n < p - m. (* Goal: forall (n m p : nat) (_ : le n p) (_ : lt m n), lt (Init.Nat.sub p n) (Init.Nat.sub p m) *) intros n m p H'; generalize m; clear m; elim H'. (* Goal: forall (m : nat) (_ : lt m n), lt (Init.Nat.sub n n) (Init.Nat.sub n m) *) (* Goal: forall (m : nat) (_ : le n m) (_ : forall (m0 : nat) (_ : lt m0 n), lt (Init.Nat.sub m n) (Init.Nat.sub m m0)) (m0 : nat) (_ : lt m0 n), lt (Init.Nat.sub (S m) n) (Init.Nat.sub (S m) m0) *) intros m H'0; rewrite <- minus_n_n; elim H'0. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) rewrite <- minus_Sn_m; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros m0 H'1 H'2; rewrite <- minus_Sn_m; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros m H'0 H'1 m0 H'2; repeat rewrite <- minus_Sn_m; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply le_trans with n; auto with arith. Qed. Theorem lt_mult_anti_compatibility : forall n n1 n2 : nat, 0 < n -> n * n1 < n * n2 -> n1 < n2. (* Goal: forall (n n1 n2 : nat) (_ : lt O n) (_ : lt (Init.Nat.mul n n1) (Init.Nat.mul n n2)), lt n1 n2 *) intros n n1 n2 H' H'0; case (le_or_lt n2 n1); auto. (* Goal: forall _ : lt n2 n1, le n1 n2 *) intros H'1; Contradict H'0; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply le_not_lt; auto with arith. Qed. Theorem le_mult_anti_compatibility : forall n n1 n2 : nat, 0 < n -> n * n1 <= n * n2 -> n1 <= n2. (* Goal: forall (n n1 n2 : nat) (_ : lt O n) (_ : le (Init.Nat.mul n n1) (Init.Nat.mul n n2)), le n1 n2 *) intros n n1 n2 H' H'0; case (le_or_lt n1 n2); auto. (* Goal: forall _ : lt n2 n1, le n1 n2 *) intros H'1; Contradict H'0; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) apply lt_not_le; auto with arith. Qed. Theorem min_n_0 : forall n : nat, min n 0 = 0. (* Goal: forall n : nat, @eq nat (Nat.min n O) O *) intros n; case n; simpl in |- *; auto. Qed. (*Simplification rules missing in R *) Hint Resolve Rabs_pos: real. Theorem Rlt_Rminus_ZERO : forall r1 r2 : R, (r2 < r1)%R -> (0 < r1 - r2)%R. intros r1 r2 H; replace 0%R with (r1 - r1)%R; unfold Rminus in |- *; auto with real. Qed. Hint Resolve Rlt_Rminus_ZERO: real. Theorem Rabsolu_left1 : forall a : R, (a <= 0)%R -> Rabs a = (- a)%R. (* Goal: forall (a : R) (_ : Rle a (IZR Z0)), @eq R (Rabs a) (Ropp a) *) intros a H; case H; intros H1. (* Goal: @eq R (Rabs a) (Ropp a) *) (* Goal: @eq R (Rabs a) (Ropp a) *) apply Rabs_left; auto. (* Goal: @eq R (Rabs a) (Ropp a) *) rewrite H1; simpl in |- *; rewrite Rabs_right; auto with real. Qed. Theorem RmaxLess1 : forall r1 r2 : R, (r1 <= Rmax r1 r2)%R. (* Goal: forall r1 r2 : R, Rle r1 (Rmax r1 r2) *) intros r1 r2; unfold Rmax in |- *; case (Rle_dec r1 r2); auto with real. Qed. Theorem RmaxLess2 : forall r1 r2 : R, (r2 <= Rmax r1 r2)%R. intros r1 r2; unfold Rmax in |- *; case (Rle_dec r1 r2); auto with real; intros; apply Ropp_le_cancel; auto with real. Qed. Theorem RmaxSym : forall p q : R, Rmax p q = Rmax q p. (* Goal: forall p q : R, @eq R (Rmax p q) (Rmax q p) *) intros p q; unfold Rmax in |- *. case (Rle_dec p q); case (Rle_dec q p); auto; intros H1 H2; apply Rle_antisym; auto. (* Goal: Rle p q *) (* Goal: Rle q p *) case (Rle_or_lt p q); auto; intros H'0; Contradict H1; apply Rlt_le; auto. (* Goal: Rle q p *) case (Rle_or_lt q p); auto; intros H'0; Contradict H2; apply Rlt_le; auto. Qed. Theorem RmaxAbs : forall p q r : R, (p <= q)%R -> (q <= r)%R -> (Rabs q <= Rmax (Rabs p) (Rabs r))%R. (* Goal: forall (p q r : R) (_ : Rle p q) (_ : Rle q r), Rle (Rabs q) (Rmax (Rabs p) (Rabs r)) *) intros p q r H' H'0; case (Rle_or_lt 0 p); intros H'1. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle q (Rmax p r) *) (* Goal: Rge r (IZR Z0) *) (* Goal: Rge q (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Rabs p) (Rabs r)) *) apply Rle_trans with r; auto with real. (* Goal: Rle r (Rmax (Ropp p) r) *) (* Goal: Rge r (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) apply RmaxLess2; auto. apply Rge_trans with p; auto with real; apply Rge_trans with q; auto with real. (* Goal: Rge q (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Rabs p) (Rabs r)) *) apply Rge_trans with p; auto with real. (* Goal: Rle (Rabs q) (Rmax (Rabs p) (Rabs r)) *) rewrite (Rabs_left p); auto. (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) case (Rle_or_lt 0 q); intros H'2. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle q (Rmax (Ropp p) r) *) (* Goal: Rge r (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) apply Rle_trans with r; auto. (* Goal: Rle r (Rmax (Ropp p) r) *) (* Goal: Rge r (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) apply RmaxLess2; auto. (* Goal: Rge r (IZR Z0) *) (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) apply Rge_trans with q; auto with real. (* Goal: Rle (Rabs q) (Rmax (Ropp p) (Rabs r)) *) rewrite (Rabs_left q); auto. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) case (Rle_or_lt 0 r); intros H'3. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Ropp r)) *) apply Rle_trans with (- p)%R; auto with real. (* Goal: Rle (Ropp p) (Rmax (Ropp p) (Ropp r)) *) apply RmaxLess1; auto. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Rabs r)) *) rewrite (Rabs_left r); auto. (* Goal: Rle (Ropp q) (Rmax (Ropp p) (Ropp r)) *) apply Rle_trans with (- p)%R; auto with real. (* Goal: Rle (Ropp p) (Rmax (Ropp p) (Ropp r)) *) apply RmaxLess1; auto. Qed. Theorem Rabsolu_Zabs : forall z : Z, Rabs (IZR z) = IZR (Zabs z). (* Goal: forall z : Z, @eq R (Rabs (IZR z)) (IZR (Z.abs z)) *) intros z; case z; simpl in |- *; auto with real. (* Goal: @eq R (Rabs (IZR Z0)) (IZR Z0) *) (* Goal: forall p : positive, @eq R (Rabs (IZR (Zpos p))) (IZR (Zpos p)) *) (* Goal: forall p : positive, @eq R (Rabs (IZR (Zneg p))) (IZR (Zpos p)) *) apply Rabs_right; auto with real. (* Goal: forall p : positive, @eq R (Rabs (IZR (Zpos p))) (IZR (Zpos p)) *) (* Goal: forall p : positive, @eq R (Rabs (IZR (Zneg p))) (IZR (Zpos p)) *) intros p0; apply Rabs_right; auto with real zarith. (* Goal: forall p : positive, @eq R (Rabs (IZR (Zneg p))) (IZR (Zpos p)) *) intros p0; unfold IZR; rewrite <- INR_IPR; rewrite Rabs_Ropp. (* Goal: @eq R (Rabs (INR (Pos.to_nat p0))) (INR (Pos.to_nat p0)) *) apply Rabs_right; auto with real zarith. Qed. Theorem RmaxRmult : forall p q r : R, (0 <= r)%R -> Rmax (r * p) (r * q) = (r * Rmax p q)%R. (* Goal: forall (p q r : R) (_ : Rle (IZR Z0) r), @eq R (Rmax (Rmult r p) (Rmult r q)) (Rmult r (Rmax p q)) *) intros p q r H; unfold Rmax in |- *. (* Goal: @eq R (if Rle_dec (Rmult r p) (Rmult r q) then Rmult r q else Rmult r p) (Rmult r (if Rle_dec p q then q else p)) *) case (Rle_dec p q); case (Rle_dec (r * p) (r * q)); auto; intros H1 H2; auto. (* Goal: @eq R (Rmult r q) (Rmult r p) *) case H; intros E1. (* Goal: @eq R (Rmult r p) (Rmult r q) *) (* Goal: @eq R (Rmult r p) (Rmult r q) *) (* Goal: @eq R (Rmult r q) (Rmult r p) *) case H1; auto with real. (* Goal: @eq R (Rmult r q) (Rmult r p) *) rewrite <- E1; repeat rewrite Rmult_0_l; auto. (* Goal: @eq R (Rmult r q) (Rmult r p) *) case H; intros E1. (* Goal: @eq R (Rmult r q) (Rmult r p) *) (* Goal: @eq R (Rmult r q) (Rmult r p) *) case H2; auto with real. (* Goal: Rle p q *) (* Goal: @eq R (Rmult r q) (Rmult r p) *) apply Rmult_le_reg_l with (r := r); auto. (* Goal: @eq R (Rmult r q) (Rmult r p) *) rewrite <- E1; repeat rewrite Rmult_0_l; auto. Qed. Theorem Rle_R0_Ropp : forall p : R, (p <= 0)%R -> (0 <= - p)%R. (* Goal: forall (p : R) (_ : Rlt p (IZR Z0)), Rlt (IZR Z0) (Ropp p) *) intros p H; rewrite <- Ropp_0; auto with real. Qed. Theorem Rlt_R0_Ropp : forall p : R, (p < 0)%R -> (0 < - p)%R. (* Goal: forall (p : R) (_ : Rlt p (IZR Z0)), Rlt (IZR Z0) (Ropp p) *) intros p H; rewrite <- Ropp_0; auto with real. Qed. Hint Resolve Rle_R0_Ropp Rlt_R0_Ropp: real. (* Properties of Z *) Theorem convert_not_O : forall p : positive, nat_of_P p <> 0. (* Goal: forall p : positive, not (@eq nat (Pos.to_nat p) O) *) intros p; elim p. (* Goal: forall (p : positive) (_ : not (@eq nat (Pos.to_nat p) O)), not (@eq nat (Pos.to_nat (xO p)) O) *) (* Goal: not (@eq nat (Pos.to_nat xH) O) *) intros p0 H'; unfold nat_of_P in |- *; simpl in |- *; rewrite ZL6. (* Goal: not (@eq nat (S (Init.Nat.add (Pos.to_nat p0) (Pos.to_nat p0))) O) *) (* Goal: forall (p : positive) (_ : not (@eq nat (Pos.to_nat p) O)), not (@eq nat (Pos.to_nat (xO p)) O) *) (* Goal: not (@eq nat (Pos.to_nat xH) O) *) generalize H'; case (nat_of_P p0); auto. (* Goal: forall (p : positive) (_ : not (@eq nat (Pos.to_nat p) O)), not (@eq nat (Pos.to_nat (xO p)) O) *) (* Goal: not (@eq nat (Pos.to_nat xH) O) *) intros p0 H'; unfold nat_of_P in |- *; simpl in |- *; rewrite ZL6. (* Goal: not (@eq nat (Init.Nat.add (Pos.to_nat p0) (Pos.to_nat p0)) O) *) (* Goal: not (@eq nat (Pos.to_nat xH) O) *) generalize H'; case (nat_of_P p0); simpl in |- *; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) unfold nat_of_P in |- *; simpl in |- *; auto with arith. Qed. Hint Resolve convert_not_O: zarith arith. Hint Resolve Zlt_le_weak Zle_not_gt Zgt_irrefl Zlt_irrefl Zle_not_lt Zlt_not_le Zlt_asym inj_lt inj_le: zarith. Theorem inj_abs : forall x : Z, (0 <= x)%Z -> Z_of_nat (Zabs_nat x) = x. (* Goal: forall (x : Z) (_ : Z.le Z0 x), @eq Z (Z.of_nat (Z.abs_nat x)) x *) intros x; elim x; auto. (* Goal: forall (p : positive) (_ : Z.le Z0 (Zpos p)), @eq Z (Z.of_nat (Z.abs_nat (Zpos p))) (Zpos p) *) (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *) unfold Zabs_nat in |- *. (* Goal: forall (p : positive) (_ : Z.le Z0 (Zpos p)), @eq Z (Z.of_nat (Pos.to_nat p)) (Zpos p) *) (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *) intros p. pattern p at 1 3 in |- *; rewrite <- (pred_o_P_of_succ_nat_o_nat_of_P_eq_id p). generalize (convert_not_O p); case (nat_of_P p); simpl in |- *; (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) auto with arith. (* Goal: forall _ : not (@eq comparison Gt Gt), @eq Z z1 z2 *) intros H'; case H'; auto. (* Goal: forall (n : nat) (_ : not (@eq nat (S n) O)) (_ : Z.le Z0 (Zpos (Pos.pred (Pos.succ (Pos.of_succ_nat n))))), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos (Pos.pred (Pos.succ (Pos.of_succ_nat n)))) *) (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *) intros n H' H'0; rewrite Ppred_succ; auto. (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq Z (Z.of_nat (Z.abs_nat (Zneg p))) (Zneg p) *) intros p H'; Contradict H'; auto. Qed. Theorem inject_nat_convert : forall (p : Z) (q : positive), p = Zpos q -> Z_of_nat (nat_of_P q) = p. (* Goal: forall (p : Z) (q : positive) (_ : @eq Z p (Zpos q)), @eq Z (Z.of_nat (Pos.to_nat q)) p *) intros p q H'; rewrite H'. (* Goal: @eq Z (Z.of_nat (Pos.to_nat q)) (Zpos q) *) CaseEq (nat_of_P q); simpl in |- *. elim q; unfold nat_of_P in |- *; simpl in |- *; intros; try discriminate. (* Goal: @eq Z Z0 (Zpos (xO p0)) *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat q) (S n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) absurd (0%Z = Zpos p0); auto. (* Goal: not (@eq Z Z0 (Zpos p0)) *) (* Goal: @eq Z Z0 (Zpos p0) *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat q) (S n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) red in |- *; intros H'0; try discriminate. (* Goal: @eq Z Z0 (Zpos p0) *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat q) (S n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) apply H; auto. (* Goal: @eq nat (Pos.iter_op nat Init.Nat.add p0 (S O)) O *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat q) (S n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) change (nat_of_P p0 = 0) in |- *. generalize H0; rewrite ZL6; case (nat_of_P p0); simpl in |- *; auto; intros; try discriminate. (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat q) (S n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) intros n; rewrite <- nat_of_P_o_P_of_succ_nat_eq_succ. (* Goal: forall _ : @eq nat (Pos.to_nat q) (Pos.to_nat (Pos.of_succ_nat n)), @eq Z (Zpos (Pos.of_succ_nat n)) (Zpos q) *) intros H'0; apply f_equal with (f := Zpos). (* Goal: @eq positive (Pos.of_succ_nat n) q *) apply nat_of_P_inj; auto. Qed. Hint Resolve inj_le inj_lt: zarith. Theorem ZleLe : forall x y : nat, (Z_of_nat x <= Z_of_nat y)%Z -> x <= y. (* Goal: forall (x y : Z) (_ : Z.le x y), Rle (IZR x) (IZR y) *) intros x y H'. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) case (le_or_lt x y); auto with arith. (* Goal: forall _ : lt y x, le x y *) intros H'0; Contradict H'; auto with zarith. Qed. Theorem inject_nat_eq : forall x y : nat, Z_of_nat x = Z_of_nat y -> x = y. (* Goal: forall (x y : nat) (_ : @eq Z (Z.of_nat x) (Z.of_nat y)), @eq nat x y *) intros x y H'; apply le_antisym. (* Goal: le y x *) apply ZleLe; auto. (* Goal: Z.le (Z.of_nat y) (Z.of_nat x) *) idtac; rewrite H'; auto with zarith. (* Goal: le y x *) apply ZleLe; auto. (* Goal: Z.le (Z.of_nat y) (Z.of_nat x) *) idtac; rewrite H'; auto with zarith. Qed. Theorem Zcompare_EGAL : forall p q : Z, (p ?= q)%Z = Datatypes.Eq -> p = q. intros p q; case p; case q; simpl in |- *; auto with arith; try (intros; discriminate); intros q1 p1. (* Goal: forall _ : @eq comparison (Pos.compare p1 q1) Eq, @eq Z (Zpos p1) (Zpos q1) *) (* Goal: forall _ : @eq comparison (CompOpp (Pos.compare p1 q1)) Eq, @eq Z (Zneg p1) (Zneg q1) *) intros H1; rewrite (Pcompare_Eq_eq p1 q1); auto. (* Goal: forall _ : @eq comparison (CompOpp (Pos.compare p1 q1)) Eq, @eq Z (Zneg p1) (Zneg q1) *) unfold Pos.compare. generalize (Pcompare_Eq_eq p1 q1); case (Pcompare p1 q1 Datatypes.Eq); simpl in |- *; intros H H1; try discriminate; rewrite H; auto. Qed. Theorem Zlt_Zopp : forall x y : Z, (x < y)%Z -> (- y < - x)%Z. intros x y; case x; case y; simpl in |- *; auto with zarith; intros p p0; unfold Zlt in |- *; simpl in |- *; unfold Pos.compare; rewrite <- ZC4; auto. Qed. Hint Resolve Zlt_Zopp: zarith. Theorem Zle_Zopp : forall x y : Z, (x <= y)%Z -> (- y <= - x)%Z. (* Goal: forall (x y : Z) (_ : Z.le x y), Z.le (Z.opp y) (Z.opp x) *) intros x y H'; case (Zle_lt_or_eq _ _ H'); auto with zarith. Qed. Hint Resolve Zle_Zopp: zarith. Theorem absolu_INR : forall n : nat, Zabs_nat (Z_of_nat n) = n. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n; case n; simpl in |- *; auto with arith. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n0; rewrite nat_of_P_o_P_of_succ_nat_eq_succ; auto with arith. Qed. Theorem absolu_Zopp : forall p : Z, Zabs_nat (- p) = Zabs_nat p. (* Goal: forall (p : Z) (_ : @eq R (IZR p) (IZR Z0)), @eq Z p Z0 *) intros p; case p; simpl in |- *; auto. Qed. Theorem Zabs_absolu : forall z : Z, Zabs z = Z_of_nat (Zabs_nat z). intros z; case z; simpl in |- *; auto; intros p; apply sym_equal; apply inject_nat_convert; auto. Qed. Theorem absolu_comp_mult : forall p q : Z, Zabs_nat (p * q) = Zabs_nat p * Zabs_nat q. intros p q; case p; case q; simpl in |- *; auto; intros p0 p1; apply ((fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y) p1 p0 (fun x => x)). Qed. Theorem Zmin_sym : forall m n : Z, Zmin n m = Zmin m n. (* Goal: forall m n : Z, @eq Z (Z.min n m) (Z.min m n) *) intros m n; unfold Zmin in |- *. (* Goal: forall _ : @eq comparison (CompOpp (Pos.compare p1 q1)) Eq, @eq Z (Zneg p1) (Zneg q1) *) case n; case m; simpl in |- *; auto; unfold Pos.compare. (* Goal: forall p p0 : positive, @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (Pos.compare_cont Eq p p0) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) intros p p0; rewrite (ZC4 p p0). (* Goal: @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (CompOpp (Pos.compare_cont Eq p0 p)) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) generalize (Pcompare_Eq_eq p0 p). (* Goal: forall _ : forall _ : @eq comparison (Pos.compare_cont Eq p0 p) Eq, @eq positive p0 p, @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (CompOpp (Pos.compare_cont Eq p0 p)) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) case (Pcompare p0 p Datatypes.Eq); simpl in |- *; auto. (* Goal: forall _ : forall _ : @eq comparison Eq Eq, @eq positive p0 p, @eq Z (Zneg p0) (Zneg p) *) intros H'; rewrite H'; auto. (* Goal: forall p p0 : positive, @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (Pos.compare_cont Eq p p0) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) intros p p0; rewrite (ZC4 p p0). (* Goal: @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (CompOpp (Pos.compare_cont Eq p0 p)) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) generalize (Pcompare_Eq_eq p0 p). (* Goal: forall _ : forall _ : @eq comparison (Pos.compare_cont Eq p0 p) Eq, @eq positive p0 p, @eq Z match CompOpp (Pos.compare_cont Eq p0 p) with | Eq => Zneg p0 | Lt => Zneg p0 | Gt => Zneg p end match CompOpp (CompOpp (Pos.compare_cont Eq p0 p)) with | Eq => Zneg p | Lt => Zneg p | Gt => Zneg p0 end *) case (Pcompare p0 p Datatypes.Eq); simpl in |- *; auto. (* Goal: forall _ : forall _ : @eq comparison Eq Eq, @eq positive p0 p, @eq Z (Zneg p0) (Zneg p) *) intros H'; rewrite H'; auto. Qed. Theorem Zpower_nat_O : forall z : Z, Zpower_nat z 0 = Z_of_nat 1. (* Goal: forall z : Z, @eq Z (Zpower_nat z O) (Z.of_nat (S O)) *) intros z; unfold Zpower_nat in |- *; simpl in |- *; auto. Qed. Theorem Zpower_nat_1 : forall z : Z, Zpower_nat z 1 = z. (* Goal: forall z : Z, @eq Z (Zpower_nat z (S O)) z *) intros z; unfold Zpower_nat in |- *; simpl in |- *; rewrite Zmult_1_r; auto. Qed. Theorem Zmin_le1 : forall z1 z2 : Z, (z1 <= z2)%Z -> Zmin z1 z2 = z1. intros z1 z2; unfold Zle, Zmin in |- *; case (z1 ?= z2)%Z; auto; intros H; Contradict H; auto. Qed. Theorem Zmin_le2 : forall z1 z2 : Z, (z2 <= z1)%Z -> Zmin z1 z2 = z2. (* Goal: forall (z1 z2 : Z) (_ : Z.le z2 z1), @eq Z (Z.min z1 z2) z2 *) intros z1 z2 H; rewrite Zmin_sym; apply Zmin_le1; auto. Qed. Theorem Zmin_Zle : forall z1 z2 z3 : Z, (z1 <= z2)%Z -> (z1 <= z3)%Z -> (z1 <= Zmin z2 z3)%Z. (* Goal: forall (z1 z2 z3 : Z) (_ : Z.le z1 z2) (_ : Z.le z1 z3), Z.le z1 (Z.min z2 z3) *) intros z1 z2 z3 H' H'0; unfold Zmin in |- *. (* Goal: Z.le z1 match Z.compare z2 z3 with | Eq => z2 | Lt => z2 | Gt => z3 end *) case (z2 ?= z3)%Z; auto. Qed. Theorem Zminus_n_predm : forall n m : Z, Zsucc (n - m) = (n - Zpred m)%Z. (* Goal: forall n m : Z, @eq Z (Z.succ (Z.sub n m)) (Z.sub n (Z.pred m)) *) intros n m. (* Goal: @eq Z (Z.succ (Z.sub n m)) (Z.sub n (Z.pred m)) *) unfold Zpred in |- *; unfold Zsucc in |- *; ring. Qed. Theorem Zopp_Zpred_Zs : forall z : Z, (- Zpred z)%Z = Zsucc (- z). (* Goal: forall z : Z, @eq Z (Z.pred (Z.opp z)) (Z.opp (Z.succ z)) *) intros z; unfold Zpred, Zsucc in |- *; ring. Qed. Theorem Zle_mult_gen : forall x y : Z, (0 <= x)%Z -> (0 <= y)%Z -> (0 <= x * y)%Z. (* Goal: forall (x y : Z) (_ : Z.le Z0 x) (_ : Z.le Z0 y), Z.le Z0 (Z.mul x y) *) intros x y H' H'0; case (Zle_lt_or_eq _ _ H'). intros H'1; rewrite Zmult_comm; apply Zmult_gt_0_le_0_compat; auto; (* Goal: Z.gt z Z0 *) (* Goal: Z.le (Z.mul x z) (Z.mul y z) *) apply Zlt_gt; auto. (* Goal: forall _ : @eq Z Z0 x, Z.le Z0 (Z.mul x y) *) intros H'1; rewrite <- H'1; simpl in |- *; auto with zarith. Qed. Hint Resolve Zle_mult_gen: zarith. Definition Zmax : forall x_ x_ : Z, Z := fun n m : Z => match (n ?= m)%Z with | Datatypes.Eq => m | Datatypes.Lt => m | Datatypes.Gt => n end. Theorem ZmaxLe1 : forall z1 z2 : Z, (z1 <= Zmax z1 z2)%Z. intros z1 z2; unfold Zmax in |- *; CaseEq (z1 ?= z2)%Z; simpl in |- *; auto with zarith. (* Goal: forall _ : @eq comparison (Z.compare z1 z2) Eq, Z.le z1 z2 *) unfold Zle in |- *; intros H; rewrite H; red in |- *; intros; discriminate. Qed. Theorem ZmaxSym : forall z1 z2 : Z, Zmax z1 z2 = Zmax z2 z1. intros z1 z2; unfold Zmax in |- *; CaseEq (z1 ?= z2)%Z; CaseEq (z2 ?= z1)%Z; intros H1 H2; try case (Zcompare_EGAL _ _ H1); auto; try case (Zcompare_EGAL _ _ H2); auto; Contradict H1. (* Goal: not (@eq comparison (Z.compare z2 z1) Lt) *) (* Goal: not (@eq comparison (Z.compare z2 z1) Gt) *) case (Zcompare.Zcompare_Gt_Lt_antisym z2 z1); auto. (* Goal: forall (_ : forall _ : @eq comparison (Z.compare z2 z1) Gt, @eq comparison (Z.compare z1 z2) Lt) (_ : forall _ : @eq comparison (Z.compare z1 z2) Lt, @eq comparison (Z.compare z2 z1) Gt), not (@eq comparison (Z.compare z2 z1) Lt) *) (* Goal: not (@eq comparison (Z.compare z2 z1) Gt) *) intros H' H'0; rewrite H'0; auto; red in |- *; intros; discriminate. (* Goal: not (@eq comparison (Z.compare z2 z1) Gt) *) case (Zcompare.Zcompare_Gt_Lt_antisym z1 z2); auto. (* Goal: forall (_ : forall _ : @eq comparison (Z.compare z1 z2) Gt, @eq comparison (Z.compare z2 z1) Lt) (_ : forall _ : @eq comparison (Z.compare z2 z1) Lt, @eq comparison (Z.compare z1 z2) Gt), not (@eq comparison (Z.compare z2 z1) Gt) *) intros H'; rewrite H'; auto; intros; red in |- *; intros; discriminate. Qed. Theorem Zmax_le2 : forall z1 z2 : Z, (z1 <= z2)%Z -> Zmax z1 z2 = z2. (* Goal: forall (z1 z2 : Z) (_ : Z.le z1 z2), @eq Z (Zmax z1 z2) z2 *) intros z1 z2; unfold Zle, Zmax in |- *; case (z1 ?= z2)%Z; auto. (* Goal: forall _ : not (@eq comparison Gt Gt), @eq Z z1 z2 *) intros H'; case H'; auto. Qed. Theorem Zmax_le1 : forall z1 z2 : Z, (z2 <= z1)%Z -> Zmax z1 z2 = z1. (* Goal: forall (z1 z2 : Z) (_ : Z.le z2 z1), @eq Z (Zmax z1 z2) z1 *) intros z1 z2 H'; rewrite ZmaxSym; apply Zmax_le2; auto. Qed. Theorem ZmaxLe2 : forall z1 z2 : Z, (z2 <= Zmax z1 z2)%Z. (* Goal: forall z1 z2 : Z, Z.le z2 (Zmax z1 z2) *) intros z1 z2; rewrite ZmaxSym; apply ZmaxLe1. Qed. Hint Resolve ZmaxLe1 ZmaxLe2: zarith. Theorem Zeq_Zs : forall p q : Z, (p <= q)%Z -> (q < Zsucc p)%Z -> p = q. (* Goal: forall (p q : Z) (_ : Z.le p q) (_ : Z.lt q (Z.succ p)), @eq Z p q *) intros p q H' H'0; apply Zle_antisym; auto. (* Goal: Z.le q p *) apply Zlt_succ_le; auto. Qed. Theorem Zmin_Zmax : forall z1 z2 : Z, (Zmin z1 z2 <= Zmax z1 z2)%Z. intros z1 z2; case (Zle_or_lt z1 z2); unfold Zle, Zlt, Zmin, Zmax in |- *; CaseEq (z1 ?= z2)%Z; auto; intros H1 H2; try rewrite H1; try rewrite H2; red in |- *; intros; discriminate. Qed. Theorem Zabs_Zmult : forall z1 z2 : Z, Zabs (z1 * z2) = (Zabs z1 * Zabs z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.lt (Z.opp z2) z1) (_ : Z.lt z1 z2), Z.lt (Z.abs z1) z2 *) intros z1 z2; case z1; case z2; simpl in |- *; auto with zarith. Qed. Theorem Zle_Zmult_comp_r : forall x y z : Z, (0 <= z)%Z -> (x <= y)%Z -> (x * z <= y * z)%Z. (* Goal: forall (x y z : Z) (_ : Z.le Z0 z) (_ : Z.le x y), Z.le (Z.mul x z) (Z.mul y z) *) intros x y z H' H'0; case (Zle_lt_or_eq _ _ H'); intros Zlt1. (* Goal: Z.le (Z.mul x z) (Z.mul y z) *) (* Goal: Z.le (Z.mul x z) (Z.mul y z) *) apply Zmult_gt_0_le_compat_r; auto. (* Goal: Z.gt z Z0 *) (* Goal: Z.le (Z.mul x z) (Z.mul y z) *) apply Zlt_gt; auto. (* Goal: Z.le (Z.mul x z) (Z.mul y z) *) rewrite <- Zlt1; repeat rewrite <- Zmult_0_r_reverse; auto with zarith. Qed. Theorem Zle_Zmult_comp_l : forall x y z : Z, (0 <= z)%Z -> (x <= y)%Z -> (z * x <= z * y)%Z. intros x y z H' H'0; repeat rewrite (Zmult_comm z); apply Zle_Zmult_comp_r; auto. Qed. Theorem NotZmultZero : forall z1 z2 : Z, z1 <> 0%Z -> z2 <> 0%Z -> (z1 * z2)%Z <> 0%Z. (* Goal: forall (z1 z2 : Z) (_ : not (@eq Z z1 Z0)) (_ : not (@eq Z z2 Z0)), not (@eq Z (Z.mul z1 z2) Z0) *) intros z1 z2; case z1; case z2; simpl in |- *; intros; auto; try discriminate. Qed. Hint Resolve NotZmultZero: zarith. (* Conversions from R <-> Z <-> N *) Theorem IZR_zero : forall p : Z, p = 0%Z -> IZR p = 0%R. (* Goal: forall (p : Z) (_ : @eq Z p Z0), @eq R (IZR p) (IZR Z0) *) intros p H'; rewrite H'; auto. Qed. Hint Resolve not_O_INR: real. Theorem IZR_zero_r : forall p : Z, IZR p = 0%R -> p = 0%Z. (* Goal: forall (p : Z) (_ : @eq R (IZR p) (IZR Z0)), @eq Z p Z0 *) intros p; case p; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : @eq R (IZR (Zpos p)) (IZR Z0)), @eq Z (Zpos p) Z0 *) (* Goal: forall (p : positive) (_ : @eq R (IZR (Zneg p)) (IZR Z0)), @eq Z (Zneg p) Z0 *) intros p1 H'; Contradict H'; auto with real zarith. (* Goal: forall (p : positive) (_ : @eq R (IZR (Zneg p)) (IZR Z0)), @eq Z (Zneg p) Z0 *) intros p1 H'; absurd (INR (nat_of_P p1) = 0%R); auto with real zarith. (* Goal: @eq R (INR (Pos.to_nat p1)) (IZR Z0) *) rewrite <- (Ropp_involutive (INR (nat_of_P p1))). (* Goal: @eq R (Ropp (Ropp (INR (Pos.to_nat p1)))) (IZR Z0) *) unfold IZR in H'; rewrite <- INR_IPR in H'. (* Goal: @eq R (Ropp (Ropp (INR (Pos.to_nat p1)))) (IZR Z0) *) rewrite H'; auto with real. Qed. Theorem INR_lt_nm : forall n m : nat, n < m -> (INR n < INR m)%R. (* Goal: forall (n m : nat) (_ : lt n m), Rlt (INR n) (INR m) *) intros n m H'; elim H'; auto. replace (INR n) with (INR n + 0)%R; auto with real; rewrite S_INR; auto with real. (* Goal: forall (m : nat) (_ : le (S n) m) (_ : Rlt (INR n) (INR m)), Rlt (INR n) (INR (S m)) *) intros m0 H'0 H'1. replace (INR n) with (INR n + 0)%R; auto with real; rewrite S_INR; auto with real. Qed. Hint Resolve INR_lt_nm: real. Theorem Rlt_INR1 : forall n : nat, 1 < n -> (1 < INR n)%R. (* Goal: forall (n : nat) (_ : not (@eq nat n (S O))), not (@eq R (INR n) (IZR (Zpos xH))) *) replace 1%R with (INR 1); auto with real. Qed. Hint Resolve Rlt_INR1: real. Theorem NEq_INR : forall n m : nat, n <> m -> INR n <> INR m. (* Goal: forall (n m : nat) (_ : not (@eq nat n m)), not (@eq R (INR n) (INR m)) *) intros n m H'; (case (le_or_lt n m); intros H'1). (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) case (le_lt_or_eq _ _ H'1); intros H'2. (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) apply Rlt_dichotomy_converse; auto with real. (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) Contradict H'; auto. (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) apply Compare.not_eq_sym; apply Rlt_dichotomy_converse; auto with real. Qed. Hint Resolve NEq_INR: real. Theorem NEq_INRO : forall n : nat, n <> 0 -> INR n <> 0%R. (* Goal: forall (n : nat) (_ : not (@eq nat n O)), not (@eq R (INR n) (IZR Z0)) *) replace 0%R with (INR 0); auto with real. Qed. Hint Resolve NEq_INRO: real. Theorem NEq_INR1 : forall n : nat, n <> 1 -> INR n <> 1%R. (* Goal: forall (n : nat) (_ : not (@eq nat n (S O))), not (@eq R (INR n) (IZR (Zpos xH))) *) replace 1%R with (INR 1); auto with real. Qed. Hint Resolve NEq_INR1: real. Theorem not_O_lt : forall n : nat, n <> 0 -> 0 < n. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros n; elim n; simpl in |- *; auto with arith. Qed. Hint Resolve not_O_lt: arith. Theorem NEq_IZRO : forall n : Z, n <> 0%Z -> IZR n <> 0%R. (* Goal: forall (n : Z) (_ : not (@eq Z n Z0)), not (@eq R (IZR n) (IZR Z0)) *) intros n H; Contradict H. (* Goal: @eq Z n Z0 *) apply IZR_zero_r; auto. Qed. Hint Resolve NEq_IZRO: real. Theorem Rlt_IZR : forall p q : Z, (p < q)%Z -> (IZR p < IZR q)%R. (* Goal: forall (p q : Z) (_ : Z.lt p q), Rlt (IZR p) (IZR q) *) intros p q H; case (Rle_or_lt (IZR q) (IZR p)); auto. (* Goal: forall _ : Rle (IZR q) (IZR p), Rlt (IZR p) (IZR q) *) intros H1; Contradict H; apply Zle_not_lt. (* Goal: Z.le q p *) apply le_IZR; auto. Qed. Hint Resolve Rlt_IZR: real. Theorem Rle_IZR : forall x y : Z, (x <= y)%Z -> (IZR x <= IZR y)%R. (* Goal: forall (x y : Z) (_ : Z.le x y), Rle (IZR x) (IZR y) *) intros x y H'. (* Goal: Rle (IZR x) (IZR y) *) case (Zle_lt_or_eq _ _ H'); clear H'; intros H'. (* Goal: Rle (IZR x) (IZR y) *) (* Goal: Rle (IZR x) (IZR y) *) apply Rlt_le; auto with real. (* Goal: Rle (IZR x) (IZR y) *) rewrite <- H'; auto with real. Qed. Hint Resolve Rle_IZR: real. Theorem Rlt_IZRO : forall p : Z, (0 < p)%Z -> (0 < IZR p)%R. (* Goal: forall (p : Z) (_ : Z.lt Z0 p), Rlt (IZR Z0) (IZR p) *) intros p H; replace 0%R with (IZR 0); auto with real. Qed. Hint Resolve Rlt_IZRO: real. Theorem Rle_IZRO : forall x y : Z, (0 <= y)%Z -> (0 <= IZR y)%R. (* Goal: forall (_ : Z) (y : Z) (_ : Z.le Z0 y), Rle (IZR Z0) (IZR y) *) intros; replace 0%R with (IZR 0); auto with real. Qed. Hint Resolve Rle_IZRO: real. Theorem Rlt_IZR1 : forall p q : Z, (1 < q)%Z -> (1 < IZR q)%R. (* Goal: forall (_ : Z) (y : Z) (_ : Z.le (Zpos xH) y), Rle (IZR (Zpos xH)) (IZR y) *) intros; replace 1%R with (IZR 1); auto with real. Qed. Hint Resolve Rlt_IZR1: real. Theorem Rle_IZR1 : forall x y : Z, (1 <= y)%Z -> (1 <= IZR y)%R. (* Goal: forall (_ : Z) (y : Z) (_ : Z.le (Zpos xH) y), Rle (IZR (Zpos xH)) (IZR y) *) intros; replace 1%R with (IZR 1); auto with real. Qed. Hint Resolve Rle_IZR1: real. Theorem lt_Rlt : forall n m : nat, (INR n < INR m)%R -> n < m. intros n m H'; case (le_or_lt m n); auto; intros H0; Contradict H'; auto with real. (* Goal: not (Rlt (INR n) (INR m)) *) case (le_lt_or_eq _ _ H0); intros H1; auto with real. (* Goal: not (Rlt (INR n) (INR m)) *) rewrite H1; apply Rlt_irrefl. Qed. Theorem INR_inv : forall n m : nat, INR n = INR m -> n = m. (* Goal: forall (n m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m *) intros n; elim n; auto; try rewrite S_INR. (* Goal: forall (m : nat) (_ : @eq R (INR O) (INR m)), @eq nat O m *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) intros m; case m; auto. (* Goal: forall (n : nat) (_ : @eq R (INR O) (INR (S n))), @eq nat O (S n) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) intros m' H1; Contradict H1; auto. (* Goal: not (@eq R (INR (S n')) (INR O)) *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) rewrite S_INR. (* Goal: not (@eq R (INR O) (Rplus (INR m') (IZR (Zpos xH)))) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) apply Rlt_dichotomy_converse; left. (* Goal: Rlt (INR O) (Rplus (INR m') (IZR (Zpos xH))) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) apply Rle_lt_0_plus_1. (* Goal: Rle (IZR Z0) (INR n') *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) apply pos_INR. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) intros n' H' m; case m. (* Goal: forall _ : @eq R (INR (S n')) (INR O), @eq nat (S n') O *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) intros H'0; Contradict H'0; auto. (* Goal: not (@eq R (INR (S n')) (INR O)) *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) rewrite S_INR. (* Goal: not (@eq R (Rplus (INR n') (IZR (Zpos xH))) (INR O)) *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) apply Rlt_dichotomy_converse; right. (* Goal: Rlt (INR O) (Rplus (INR m') (IZR (Zpos xH))) *) (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : @eq R (INR n) (INR m)), @eq nat n m) (m : nat) (_ : @eq R (INR (S n)) (INR m)), @eq nat (S n) m *) red in |- *; apply Rle_lt_0_plus_1. (* Goal: Rle (IZR Z0) (INR n') *) (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) apply pos_INR. (* Goal: forall (n : nat) (_ : @eq R (INR (S n')) (INR (S n))), @eq nat (S n') (S n) *) intros m' H'0. (* Goal: @eq nat (S n') (S m') *) rewrite (H' m'); auto. (* Goal: @eq R (INR n') (INR m') *) repeat rewrite S_INR in H'0. apply Rplus_eq_reg_l with (r := 1%R); repeat rewrite (Rplus_comm 1); auto with real. Qed. Theorem Rle_INR : forall x y : nat, x <= y -> (INR x <= INR y)%R. (* Goal: forall (x y : nat) (_ : le x y), Rle (INR x) (INR y) *) intros x y H; repeat rewrite INR_IZR_INZ. (* Goal: Rle (IZR (Z.of_nat x)) (IZR (Z.of_nat y)) *) apply Rle_IZR; auto with zarith. Qed. Hint Resolve Rle_INR: real. Theorem le_Rle : forall n m : nat, (INR n <= INR m)%R -> n <= m. (* Goal: forall (n m : nat) (_ : Rle (INR n) (INR m)), le n m *) intros n m H'; case H'; auto. (* Goal: forall _ : Rlt (INR n) (INR m), le n m *) (* Goal: forall _ : @eq R (INR n) (INR m), le n m *) intros H'0; apply lt_le_weak; apply lt_Rlt; auto. (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros H'0; rewrite <- (INR_inv _ _ H'0); auto with arith. Qed. Theorem Rmult_IZR : forall z t : Z, IZR (z * t) = (IZR z * IZR t)%R. (* Goal: forall z t : Z, @eq R (IZR (Z.mul z t)) (Rmult (IZR z) (IZR t)) *) intros z t; case z; case t; simpl in |- *; auto with real; unfold IZR; intros t1 z1; repeat rewrite <- INR_IPR. - rewrite nat_of_P_mult_morphism; auto with real. - rewrite nat_of_P_mult_morphism; auto with real. (* Goal: @eq R (Ropp (INR (Init.Nat.mul (Pos.to_nat z1) (Pos.to_nat t1)))) (Rmult (INR (Pos.to_nat z1)) (Ropp (INR (Pos.to_nat t1)))) *) rewrite Rmult_comm. (* Goal: @eq R (Ropp (INR (Init.Nat.mul (Pos.to_nat z1) (Pos.to_nat t1)))) (Rmult (Ropp (INR (Pos.to_nat z1))) (INR (Pos.to_nat t1))) *) rewrite Ropp_mult_distr_l_reverse; auto with real. (* Goal: @eq R (Ropp (INR (Init.Nat.mul (Pos.to_nat z1) (Pos.to_nat t1)))) (Ropp (Rmult (INR (Pos.to_nat t1)) (INR (Pos.to_nat z1)))) *) apply Ropp_eq_compat; rewrite mult_comm; auto with real. - rewrite nat_of_P_mult_morphism; auto with real. (* Goal: @eq R (Ropp (INR (Init.Nat.mul (Pos.to_nat z1) (Pos.to_nat t1)))) (Rmult (Ropp (INR (Pos.to_nat z1))) (INR (Pos.to_nat t1))) *) rewrite Ropp_mult_distr_l_reverse; auto with real. - rewrite nat_of_P_mult_morphism; auto with real. (* Goal: @eq R (INR (Init.Nat.mul (Pos.to_nat z1) (Pos.to_nat t1))) (Rmult (Ropp (INR (Pos.to_nat z1))) (Ropp (INR (Pos.to_nat t1)))) *) rewrite Rmult_opp_opp; auto with real. Qed. Theorem absolu_Zs : forall z : Z, (0 <= z)%Z -> Zabs_nat (Zsucc z) = S (Zabs_nat z). intros z; case z. 3: intros p H'; Contradict H'; auto with zarith. replace (Zsucc 0) with (Z_of_nat 1). intros H'; rewrite absolu_INR; simpl in |- *; auto. simpl in |- *; auto. intros p H'; rewrite <- Zpos_succ_morphism; simpl in |- *; auto with zarith. unfold nat_of_P in |- *; rewrite Pmult_nat_succ_morphism; auto. Qed. Hint Resolve Zlt_le_succ: zarith. Theorem Zlt_next : forall n m : Z, (n < m)%Z -> m = Zsucc n \/ (Zsucc n < m)%Z. (* Goal: forall (n m : Z) (_ : Z.lt n m), or (@eq Z m (Z.succ n)) (Z.lt (Z.succ n) m) *) intros n m H'; case (Zle_lt_or_eq (Zsucc n) m); auto with zarith. Qed. Theorem Zle_next : forall n m : Z, (n <= m)%Z -> m = n \/ (Zsucc n <= m)%Z. (* Goal: forall (n m : Z) (_ : Z.le n m), or (@eq Z m n) (Z.le (Z.succ n) m) *) intros n m H'; case (Zle_lt_or_eq _ _ H'); auto with zarith. Qed. Theorem Zlt_Zopp_Inv : forall p q : Z, (- p < - q)%Z -> (q < p)%Z. (* Goal: forall (p q : Z) (_ : Z.lt (Z.opp p) (Z.opp q)), Z.lt q p *) intros x y H'; case (Zle_or_lt x y); auto with zarith. Qed. Theorem Zle_Zopp_Inv : forall p q : Z, (- p <= - q)%Z -> (q <= p)%Z. (* Goal: forall (p q : Z) (_ : Z.le (Z.opp p) (Z.opp q)), Z.le q p *) intros p q H'; case (Zle_lt_or_eq _ _ H'); auto with zarith. Qed. Theorem absolu_Zs_neg : forall z : Z, (z < 0)%Z -> S (Zabs_nat (Zsucc z)) = Zabs_nat z. (* Goal: forall (z : Z) (_ : Z.lt z Z0), @eq nat (S (Z.abs_nat (Z.succ z))) (Z.abs_nat z) *) intros z H'; apply inject_nat_eq. (* Goal: @eq Z (Z.of_nat (S (Z.abs_nat (Z.succ z)))) (Z.of_nat (Z.abs_nat z)) *) rewrite inj_S. repeat rewrite <- (absolu_Zopp (Zsucc z)). repeat rewrite <- (absolu_Zopp z). repeat rewrite inj_abs; replace 0%Z with (- (0))%Z; auto with zarith. Qed. Theorem Zlt_absolu : forall (x : Z) (n : nat), Zabs_nat x < n -> (x < Z_of_nat n)%Z. intros x n; case x; simpl in |- *; auto with zarith. (* Goal: forall (p : positive) (_ : lt (Pos.to_nat p) n), Z.lt (Zpos p) (Z.of_nat n) *) (* Goal: forall (p : positive) (_ : lt (Pos.to_nat p) n), Z.lt (Zneg p) (Z.of_nat n) *) replace 0%Z with (Z_of_nat 0); auto with zarith. intros p; rewrite <- (inject_nat_convert (Zpos p) p); auto with zarith. case n; simpl in |- *; intros; red in |- *; simpl in |- *; auto. Qed. Theorem inj_pred : forall n : nat, n <> 0 -> Z_of_nat (pred n) = Zpred (Z_of_nat n). (* Goal: forall (n : nat) (_ : not (@eq nat n O)), @eq Z (Z.of_nat (Init.Nat.pred n)) (Z.pred (Z.of_nat n)) *) intros n; case n; auto. (* Goal: not (@eq R (INR n) (INR m)) *) (* Goal: not (@eq R (INR n) (INR m)) *) intros H'; Contradict H'; auto. intros n0 H'; rewrite inj_S; rewrite <- Zpred_succ; auto. Qed. Theorem Zle_abs : forall p : Z, (p <= Z_of_nat (Zabs_nat p))%Z. intros p; case p; simpl in |- *; auto with zarith; intros q; rewrite inject_nat_convert with (p := Zpos q); auto with zarith. unfold Zle in |- *; red in |- *; intros H'2; discriminate. Qed. Hint Resolve Zle_abs: zarith. Theorem ZleAbs : forall (z : Z) (n : nat), (- Z_of_nat n <= z)%Z -> (z <= Z_of_nat n)%Z -> Zabs_nat z <= n. (* Goal: forall (z : Z) (n : nat) (_ : Z.le (Z.opp (Z.of_nat n)) z) (_ : Z.le z (Z.of_nat n)), le (Z.abs_nat z) n *) intros z n H' H'0; case (le_or_lt (Zabs_nat z) n); auto; intros lt. (* Goal: le (Z.abs_nat z) n *) case (Zle_or_lt 0 z); intros Zle0. (* Goal: le (Z.abs_nat z) n *) (* Goal: le (Z.abs_nat z) n *) Contradict H'0. (* Goal: not (Z.le (Z.opp (Z.of_nat n)) z) *) apply Zlt_not_le; auto. rewrite <- (inj_abs z); auto with zarith. (* Goal: lt n m *) Contradict H'. (* Goal: not (Z.le (Z.opp (Z.of_nat n)) z) *) apply Zlt_not_le; auto. replace z with (- Z_of_nat (Zabs_nat z))%Z. (* Goal: Z.lt (Z.opp (Z.of_nat (Z.abs_nat z))) (Z.opp (Z.of_nat n)) *) (* Goal: @eq Z (Z.opp (Z.of_nat (Z.abs_nat z))) z *) apply Zlt_Zopp; auto with zarith. rewrite <- absolu_Zopp. (* Goal: @eq Z (Z.opp (Z.of_nat (Z.abs_nat (Z.opp z)))) z *) rewrite inj_abs; auto with zarith. Qed. Theorem lt_Zlt_inv : forall n m : nat, (Z_of_nat n < Z_of_nat m)%Z -> n < m. (* Goal: forall (n m : nat) (_ : Z.lt (Z.of_nat n) (Z.of_nat m)), lt n m *) intros n m H'; case (le_or_lt n m); auto. (* Goal: forall _ : le n m, lt n m *) (* Goal: forall _ : lt m n, lt n m *) intros H'0. (* Goal: lt n m *) (* Goal: forall _ : lt m n, lt n m *) case (le_lt_or_eq _ _ H'0); auto with zarith. (* Goal: forall _ : lt m n, lt n m *) intros H'1. (* Goal: lt n m *) Contradict H'. (* Goal: not (Z.lt (Z.of_nat n) (Z.of_nat m)) *) apply Zle_not_lt; auto with zarith. Qed. Theorem NconvertO : forall p : positive, nat_of_P p <> 0. intros p; elim p; unfold nat_of_P in |- *; simpl in |- *. (* Goal: forall _ : @eq nat (S n0) O, @eq nat (Init.Nat.sub n0 O) O *) intros p0 H'; red in |- *; intros H'0; discriminate. intros p0; rewrite ZL6; unfold nat_of_P in |- *. case (Pmult_nat p0 1); simpl in |- *; auto. red in |- *; intros H'; discriminate. Qed. Hint Resolve NconvertO: zarith. Theorem absolu_lt_nz : forall z : Z, z <> 0%Z -> 0 < Zabs_nat z. intros z; case z; simpl in |- *; auto; try (intros H'; case H'; auto; fail); (* Goal: forall (q r : nat) (_ : lt O O) (_ : lt q r), lt O O *) (* Goal: forall (n : nat) (_ : forall (q r : nat) (_ : lt O n) (_ : lt q r), lt (Init.Nat.mul n q) (Init.Nat.mul n r)) (q r : nat) (_ : lt O (S n)) (_ : lt q r), lt (Init.Nat.add q (Init.Nat.mul n q)) (Init.Nat.add r (Init.Nat.mul n r)) *) intros p; generalize (NconvertO p); auto with arith. Qed. Theorem Rlt2 : (0 < INR 2)%R. (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) replace 0%R with (INR 0); auto with real arith. Qed. Hint Resolve Rlt2: real. Theorem RlIt2 : (0 < / INR 2)%R. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) r) r *) apply Rmult_lt_reg_l with (r := INR 2); auto with real. Qed. Hint Resolve RlIt2: real. Theorem Rledouble : forall r : R, (0 <= r)%R -> (r <= INR 2 * r)%R. (* Goal: forall (r : R) (_ : Rlt (IZR Z0) r), Rlt (Rmult (Rinv (INR (S (S O)))) r) r *) intros r H'. replace (INR 2 * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. pattern r at 1 in |- *; replace r with (r + 0)%R; [ idtac | ring ]. (* Goal: Rle (Rplus r (IZR Z0)) (Rplus r r) *) apply Rplus_le_compat_l; auto. Qed. Theorem Rltdouble : forall r : R, (0 < r)%R -> (r < INR 2 * r)%R. (* Goal: forall (r : R) (_ : Rlt (IZR Z0) r), Rlt (Rmult (Rinv (INR (S (S O)))) r) r *) intros r H'. pattern r at 1 in |- *; replace r with (r + 0)%R; try ring. replace (INR 2 * r)%R with (r + r)%R; simpl in |- *; try ring; auto with real. Qed. Theorem Rlt_RinvDouble : forall r : R, (0 < r)%R -> (/ INR 2 * r < r)%R. (* Goal: forall (r : R) (_ : Rlt (IZR Z0) r), Rlt (Rmult (Rinv (INR (S (S O)))) r) r *) intros r H'. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) r) r *) apply Rmult_lt_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r. (* Goal: Rlt (Rmult (IZR (Zpos xH)) r) (Rmult (INR (S (S O))) r) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) apply Rmult_lt_compat_r; replace 1%R with (INR 1); auto with real arith. (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) replace 0%R with (INR 0); auto with real arith. Qed. Hint Resolve Rledouble: real. Theorem Rle_Rinv : forall x y : R, (0 < x)%R -> (x <= y)%R -> (/ y <= / x)%R. (* Goal: forall (x y : R) (_ : Rlt (IZR Z0) x) (_ : Rle x y), Rle (Rinv y) (Rinv x) *) intros x y H H1; case H1; intros H2. (* Goal: Rle (Rinv y) (Rinv x) *) (* Goal: Rle (Rinv y) (Rinv x) *) left; apply Rinv_lt_contravar; auto. (* Goal: Rlt (IZR Z0) (Rmult x y) *) (* Goal: Rle (Rinv y) (Rinv x) *) apply Rmult_lt_0_compat; auto. (* Goal: Rlt (IZR Z0) y *) (* Goal: Rle (Rinv y) (Rinv x) *) apply Rlt_trans with (2 := H2); auto. (* Goal: Rle (Rinv y) (Rinv x) *) rewrite H2; auto with real. Qed. Theorem Int_part_INR : forall n : nat, Int_part (INR n) = Z_of_nat n. intros n; unfold Int_part in |- *. (* Goal: @eq Z (Z.sub (up (INR n)) (Zpos xH)) (Z.of_nat n) *) cut (up (INR n) = (Z_of_nat n + Z_of_nat 1)%Z). intros H'; rewrite H'; simpl in |- *; ring. (* Goal: @eq Z (up (INR n)) (Z.add (Z.of_nat n) (Z.of_nat (S O))) *) apply sym_equal; apply tech_up; auto. (* Goal: Rlt (INR n) (IZR (Z.add (Z.of_nat n) (Z.of_nat (S O)))) *) (* Goal: Rle (IZR (Z.add (Z.of_nat n) (Z.of_nat (S O)))) (Rplus (INR n) (IZR (Zpos xH))) *) replace (Z_of_nat n + Z_of_nat 1)%Z with (Z_of_nat (S n)). repeat rewrite <- INR_IZR_INZ. (* Goal: Rlt (INR n) (INR (S n)) *) (* Goal: @eq Z (Z.of_nat (S n)) (Z.add (Z.of_nat n) (Z.of_nat (S O))) *) (* Goal: Rle (IZR (Z.add (Z.of_nat n) (Z.of_nat (S O)))) (Rplus (INR n) (IZR (Zpos xH))) *) apply INR_lt_nm; auto. rewrite Zplus_comm; rewrite <- inj_plus; simpl in |- *; auto. rewrite plus_IZR; simpl in |- *; auto with real. repeat rewrite <- INR_IZR_INZ; auto with real. Qed. Theorem Int_part_IZR : forall z : Z, Int_part (IZR z) = z. intros z; unfold Int_part in |- *. (* Goal: @eq Z (Z.sub (up (IZR z)) (Zpos xH)) z *) cut (up (IZR z) = (z + 1)%Z). intros Z1; rewrite Z1; rewrite Zplus_comm; apply Zminus_plus; auto with zarith. apply sym_equal; apply tech_up; simpl in |- *; auto with real zarith. replace (IZR z) with (IZR z + IZR 0)%R; try rewrite plus_IZR; auto with real zarith. Qed. Theorem Zlt_Rlt : forall z1 z2 : Z, (IZR z1 < IZR z2)%R -> (z1 < z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Rlt (IZR z1) (IZR z2)), Z.lt z1 z2 *) intros z1 z2 H; case (Zle_or_lt z2 z1); auto. (* Goal: forall _ : Z.lt z2 z1, Z.le z1 z2 *) intros H1; Contradict H; auto with real zarith. (* Goal: not (Rlt (IZR z1) (IZR z2)) *) apply Rle_not_lt; auto with real zarith. Qed. Theorem Zle_Rle : forall z1 z2 : Z, (IZR z1 <= IZR z2)%R -> (z1 <= z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Rle (IZR z1) (IZR z2)), Z.le z1 z2 *) intros z1 z2 H; case (Zle_or_lt z1 z2); auto. (* Goal: forall _ : Z.lt z2 z1, Z.le z1 z2 *) intros H1; Contradict H; auto with real zarith. (* Goal: not (Rle (IZR z1) (IZR z2)) *) apply Rlt_not_le; auto with real zarith. Qed. Theorem IZR_inv : forall z1 z2 : Z, IZR z1 = IZR z2 :>R -> z1 = z2. (* Goal: forall (z1 z2 : Z) (_ : @eq R (IZR z1) (IZR z2)), @eq Z z1 z2 *) intros z1 z2 H; apply Zle_antisym; apply Zle_Rle; rewrite H; auto with real. Qed. Theorem Zabs_eq_opp : forall x, (x <= 0)%Z -> Zabs x = (- x)%Z. intros x; case x; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : Z.le (Zpos p) Z0), @eq Z (Zpos p) (Zneg p) *) intros p H; Contradict H; auto with zarith. Qed. Theorem Zabs_Zs : forall z : Z, (Zabs (Zsucc z) <= Zsucc (Zabs z))%Z. intros z; case z; auto. simpl in |- *; auto with zarith. repeat rewrite Zabs_eq; auto with zarith. intros p; rewrite Zabs_eq_opp; auto with zarith. 2: unfold Zsucc in |- *; replace 0%Z with (-1 + 1)%Z; auto with zarith. 2: case p; simpl in |- *; intros; red in |- *; simpl in |- *; intros; red in |- *; intros; discriminate. replace (- Zsucc (Zneg p))%Z with (Zpos p - 1)%Z. replace (Zsucc (Zabs (Zneg p))) with (Zpos p + 1)%Z; auto with zarith. unfold Zsucc in |- *; rewrite Zopp_plus_distr. auto with zarith. Qed. Hint Resolve Zabs_Zs: zarith. Theorem Zle_Zpred : forall x y : Z, (x < y)%Z -> (x <= Zpred y)%Z. (* Goal: forall (x y : Z) (_ : Z.lt x y), Z.le x (Z.pred y) *) intros x y H; apply Zlt_succ_le. rewrite <- Zsucc_pred; auto. Qed. Hint Resolve Zle_Zpred: zarith. Theorem Zabs_Zopp : forall z : Z, Zabs (- z) = Zabs z. intros z; case z; simpl in |- *; auto. Qed. Theorem Zle_Zabs : forall z : Z, (z <= Zabs z)%Z. intros z; case z; simpl in |- *; red in |- *; simpl in |- *; auto; try (red in |- *; intros; discriminate; fail). intros p; elim p; simpl in |- *; auto; try (red in |- *; intros; discriminate; fail). Qed. Hint Resolve Zle_Zabs: zarith. Theorem Zlt_mult_simpl_l : forall a b c : Z, (0 < c)%Z -> (c * a < c * b)%Z -> (a < b)%Z. (* Goal: forall (a b c : Z) (_ : Z.lt Z0 c) (_ : Z.lt (Z.mul c a) (Z.mul c b)), Z.lt a b *) intros a b0 c H H0; apply Zgt_lt. apply Zmult_gt_reg_r with (p := c); try apply Zlt_gt; auto with zarith. repeat rewrite (fun x => Zmult_comm x c); auto with zarith. Qed. (* An equality function on Z that return a bool *) Fixpoint pos_eq_bool (a b : positive) {struct b} : bool := match a, b with | xH, xH => true | xI a', xI b' => pos_eq_bool a' b' | xO a', xO b' => pos_eq_bool a' b' | _, _ => false end. Theorem pos_eq_bool_correct : forall p q : positive, match pos_eq_bool p q with | true => p = q | false => p <> q end. intros p q; generalize p; elim q; simpl in |- *; auto; clear p q. intros p Rec q; case q; simpl in |- *; try (intros; red in |- *; intros; discriminate; fail). intros q'; generalize (Rec q'); case (pos_eq_bool q' p); simpl in |- *; auto. (* Goal: forall _ : @eq positive q' p', @eq Z (Zneg q') (Zneg p') *) (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; rewrite H1; auto. (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; Contradict H1; injection H1; auto. intros p Rec q; case q; simpl in |- *; try (intros; red in |- *; intros; discriminate; fail). intros q'; generalize (Rec q'); case (pos_eq_bool q' p); simpl in |- *; auto. (* Goal: forall _ : @eq positive q' p', @eq Z (Zneg q') (Zneg p') *) (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; rewrite H1; auto. (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; Contradict H1; injection H1; auto. intros q; case q; simpl in |- *; try (intros; red in |- *; intros; discriminate; fail); auto. Qed. Theorem Z_O_1 : (0 < 1)%Z. red in |- *; simpl in |- *; auto; intros; red in |- *; intros; discriminate. Qed. Hint Resolve Z_O_1: zarith. Definition Z_eq_bool a b := match a, b with | Z0, Z0 => true | Zpos a', Zpos b' => pos_eq_bool a' b' | Zneg a', Zneg b' => pos_eq_bool a' b' | _, _ => false end. Theorem Z_eq_bool_correct : forall p q : Z, match Z_eq_bool p q with | true => p = q | false => p <> q end. intros p q; case p; case q; simpl in |- *; auto; try (intros; red in |- *; intros; discriminate; fail). intros p' q'; generalize (pos_eq_bool_correct q' p'); case (pos_eq_bool q' p'); simpl in |- *; auto. (* Goal: forall _ : @eq positive q' p', @eq Z (Zneg q') (Zneg p') *) (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; rewrite H1; auto. (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; Contradict H1; injection H1; auto. intros p' q'; generalize (pos_eq_bool_correct q' p'); case (pos_eq_bool q' p'); simpl in |- *; auto. (* Goal: forall _ : @eq positive q' p', @eq Z (Zneg q') (Zneg p') *) (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; rewrite H1; auto. (* Goal: forall _ : not (@eq positive q' p'), not (@eq Z (Zneg q') (Zneg p')) *) intros H1; Contradict H1; injection H1; auto. Qed. Theorem Zlt_mult_ZERO : forall x y : Z, (0 < x)%Z -> (0 < y)%Z -> (0 < x * y)%Z. intros x y; case x; case y; unfold Zlt in |- *; simpl in |- *; auto. Qed. Hint Resolve Zlt_mult_ZERO: zarith. Theorem Zlt_Zminus_ZERO : forall z1 z2 : Z, (z2 < z1)%Z -> (0 < z1 - z2)%Z. intros z1 z2; rewrite (Zminus_diag_reverse z2); auto with zarith. Qed. Theorem Zle_Zminus_ZERO : forall z1 z2 : Z, (z2 <= z1)%Z -> (0 <= z1 - z2)%Z. intros z1 z2; rewrite (Zminus_diag_reverse z2); auto with zarith. Qed. Hint Resolve Zle_Zminus_ZERO Zlt_Zminus_ZERO: zarith. Theorem Zle_Zpred_Zpred : forall z1 z2 : Z, (z1 <= z2)%Z -> (Zpred z1 <= Zpred z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le z1 z2), Z.le (Z.pred z1) (Z.pred z2) *) intros z1 z2 H; apply Zsucc_le_reg. repeat rewrite <- Zsucc_pred; auto. Qed. Hint Resolve Zle_Zpred_Zpred: zarith. Theorem Zle_ZERO_Zabs : forall z : Z, (0 <= Zabs z)%Z. intros z; case z; simpl in |- *; auto with zarith. Qed. Hint Resolve Zle_ZERO_Zabs: zarith. Theorem Zlt_Zabs_inv1 : forall z1 z2 : Z, (Zabs z1 < z2)%Z -> (- z2 < z1)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le (Z.abs z1) z2), Z.le z1 z2 *) intros z1 z2 H; case (Zle_or_lt 0 z1); intros H1. apply Zlt_le_trans with (- (0))%Z; auto with zarith. apply Zlt_Zopp; apply Zle_lt_trans with (2 := H); auto with zarith. rewrite <- (Zopp_involutive z1); rewrite <- (Zabs_eq_opp z1); auto with zarith. Qed. Theorem Zlt_Zabs_inv2 : forall z1 z2 : Z, (Zabs z1 < Zabs z2)%Z -> (z1 < Zabs z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.lt (Z.opp z2) z1) (_ : Z.lt z1 z2), Z.lt (Z.abs z1) z2 *) intros z1 z2; case z1; case z2; simpl in |- *; auto with zarith. Qed. Theorem Zle_Zabs_inv1 : forall z1 z2 : Z, (Zabs z1 <= z2)%Z -> (- z2 <= z1)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le (Z.abs z1) z2), Z.le z1 z2 *) intros z1 z2 H; case (Zle_or_lt 0 z1); intros H1. apply Zle_trans with (- (0))%Z; auto with zarith. apply Zle_Zopp; apply Zle_trans with (2 := H); auto with zarith. rewrite <- (Zopp_involutive z1); rewrite <- (Zabs_eq_opp z1); auto with zarith. Qed. Theorem Zle_Zabs_inv2 : forall z1 z2 : Z, (Zabs z1 <= z2)%Z -> (z1 <= z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le (Z.abs z1) z2), Z.le z1 z2 *) intros z1 z2 H; case (Zle_or_lt 0 z1); intros H1. rewrite <- (Zabs_eq z1); auto. apply Zle_trans with (Zabs z1); auto with zarith. Qed. Theorem Zlt_Zabs_Zpred : forall z1 z2 : Z, (Zabs z1 < z2)%Z -> z1 <> Zpred z2 -> (Zabs (Zsucc z1) < z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.lt (Z.abs z1) z2) (_ : not (@eq Z z1 (Z.pred z2))), Z.lt (Z.abs (Z.succ z1)) z2 *) intros z1 z2 H H0; case (Zle_or_lt 0 z1); intros H1. rewrite Zabs_eq; auto with zarith. rewrite Zabs_eq in H; auto with zarith. (* Goal: Z.lt (Z.abs (Z.succ z1)) z2 *) apply Zlt_trans with (2 := H). repeat rewrite Zabs_eq_opp; auto with zarith. Qed. Theorem Zle_n_Zpred : forall z1 z2 : Z, (Zpred z1 <= Zpred z2)%Z -> (z1 <= z2)%Z. intros z1 z2 H; rewrite (Zsucc_pred z1); rewrite (Zsucc_pred z2); auto with zarith. Qed. Theorem Zpred_Zopp_Zs : forall z : Z, Zpred (- z) = (- Zsucc z)%Z. (* Goal: forall z : Z, @eq Z (Z.pred (Z.opp z)) (Z.opp (Z.succ z)) *) intros z; unfold Zpred, Zsucc in |- *; ring. Qed. Theorem Zlt_1_O : forall z : Z, (1 <= z)%Z -> (0 < z)%Z. intros z H; apply Zsucc_lt_reg; simpl in |- *; auto with zarith. Qed. Hint Resolve Zlt_succ Zsucc_lt_compat Zle_lt_succ: zarith. Theorem Zlt_not_eq : forall p q : Z, (p < q)%Z -> p <> q. intros p q H; Contradict H; rewrite H; auto with zarith. Qed. Theorem Zlt_not_eq_rev : forall p q : Z, (q < p)%Z -> p <> q. intros p q H; Contradict H; rewrite H; auto with zarith. Qed. Hint Resolve Zlt_not_eq Zlt_not_eq_rev: zarith. Theorem Zle_Zpred_Zlt : forall z1 z2 : Z, (z1 <= z2)%Z -> (Zpred z1 < z2)%Z. intros z1 z2 H; apply Zsucc_lt_reg; rewrite <- Zsucc_pred; auto with zarith. Qed. Hint Resolve Zle_Zpred_Zlt: zarith. Theorem Zle_Zpred_inv : forall z1 z2 : Z, (z1 <= Zpred z2)%Z -> (z1 < z2)%Z. intros z1 z2 H; rewrite (Zsucc_pred z2); auto with zarith. Qed. Theorem Zabs_intro : forall (P : Z -> Prop) (z : Z), P (- z)%Z -> P z -> P (Zabs z). intros P z; case z; simpl in |- *; auto. Qed. Theorem Zpred_Zle_Zabs_intro : forall z1 z2 : Z, (- Zpred z2 <= z1)%Z -> (z1 <= Zpred z2)%Z -> (Zabs z1 < z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le (Z.opp (Z.pred z2)) z1) (_ : Z.le z1 (Z.pred z2)), Z.lt (Z.abs z1) z2 *) intros z1 z2 H H0; apply Zle_Zpred_inv. apply Zabs_intro with (P := fun x => (x <= Zpred z2)%Z); auto with zarith. Qed. Theorem Zlt_ZERO_Zle_ONE : forall z : Z, (0 < z)%Z -> (1 <= z)%Z. intros z H; replace 1%Z with (Zsucc 0); auto with zarith; simpl in |- *; auto. Qed. Hint Resolve Zlt_ZERO_Zle_ONE: zarith. Theorem ptonat_def1 : forall p q, 1 < Pmult_nat p (S (S q)). (* Goal: forall (m : nat) (_ : le p m) (_ : forall _ : le r t, le (Init.Nat.mul p r) (Init.Nat.mul m t)) (_ : le r t), le (Init.Nat.mul p r) (Init.Nat.add t (Init.Nat.mul m t)) *) intros p; elim p; simpl in |- *; auto with arith. Qed. Hint Resolve ptonat_def1: arith. Theorem lt_S_le : forall p q, p < q -> S p <= q. intros p q; unfold lt in |- *; simpl in |- *; auto. Qed. Hint Resolve lt_S_le: arith. Theorem Zlt_Zabs_intro : forall z1 z2 : Z, (- z2 < z1)%Z -> (z1 < z2)%Z -> (Zabs z1 < z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.lt (Z.opp z2) z1) (_ : Z.lt z1 z2), Z.lt (Z.abs z1) z2 *) intros z1 z2; case z1; case z2; simpl in |- *; auto with zarith. intros p p0 H H0; change (- Zneg p0 < - Zneg p)%Z in |- *; auto with zarith. Qed.
(**************************************************************************** IEEE754 : Float Laurent Thery ***************************************************************************** ****************************************************** Module Float.v Inspired by the Diadic of Patrick Loiseleur *******************************************************) Require Export Omega. Require Export Compare. Require Export Rpow. Section definitions. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. (* The type float represents the set of numbers who can be written: x = n*b^p with n and p in Z. (pdic numbers) n = Fnum and p = Fexp *) Record float : Set := Float {Fnum : Z; Fexp : Z}. Theorem floatEq : forall p q : float, Fnum p = Fnum q -> Fexp p = Fexp q -> p = q. intros p q; case p; case q; simpl in |- *; intros; apply (f_equal2 (A1:=Z) (A2:=Z)); auto. Qed. Theorem floatDec : forall x y : float, {x = y} + {x <> y}. (* Goal: forall x y : float, sumbool (@eq float x y) (not (@eq float x y)) *) intros x y; case x; case y; intros Fnum2 Fexp2 Fnum1 Fexp1. (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) case (Z_eq_dec Fnum1 Fnum2); intros H1. (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) case (Z_eq_dec Fexp1 Fexp2); intros H2. (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) left; apply floatEq; auto. (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) right; red in |- *; intros H'; Contradict H2; inversion H'; auto. (* Goal: sumbool (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2)) (not (@eq float (Float Fnum1 Fexp1) (Float Fnum2 Fexp2))) *) right; red in |- *; intros H'; Contradict H1; inversion H'; auto. Qed. Definition Fzero (x : Z) := Float 0 x. Definition is_Fzero (x : float) := Fnum x = 0%Z. Theorem is_FzeroP : forall x : float, is_Fzero x \/ ~ is_Fzero x. unfold is_Fzero in |- *; intro; CaseEq (Fnum x); intros; (right; discriminate) || (left; auto). Qed. Coercion IZR : Z >-> R. Coercion INR : nat >-> R. Coercion Z_of_nat : nat >-> Z. Definition FtoR (x : float) := (Fnum x * powerRZ (IZR radix) (Fexp x))%R. Local Coercion FtoR : float >-> R. Theorem FzeroisReallyZero : forall z : Z, Fzero z = 0%R :>R. (* Goal: forall z : Z, @eq R (FtoR (Fzero z)) (IZR Z0) *) intros z; unfold FtoR in |- *; simpl in |- *; auto with real. Qed. Theorem is_Fzero_rep1 : forall x : float, is_Fzero x -> x = 0%R :>R. (* Goal: forall (x : float) (_ : is_Fzero x), @eq R (FtoR x) (IZR Z0) *) intros x H; unfold FtoR in |- *. (* Goal: @eq R (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (IZR Z0) *) red in H; rewrite H; simpl in |- *; auto with real. Qed. Theorem LtFnumZERO : forall x : float, (0 < Fnum x)%Z -> (0 < x)%R. (* Goal: forall (x : float) (_ : Z.lt Z0 (Fnum x)), Rlt (IZR Z0) (FtoR x) *) intros x; case x; unfold FtoR in |- *; simpl in |- *. intros Fnum1 Fexp1 H'; replace 0%R with (Fnum1 * 0)%R; [ apply Rmult_lt_compat_l | ring ]; auto with real zarith. Qed. Theorem is_Fzero_rep2 : forall x : float, x = 0%R :>R -> is_Fzero x. (* Goal: forall (x : float) (_ : @eq R (FtoR x) (IZR Z0)), is_Fzero x *) intros x H'. (* Goal: is_Fzero x *) case (Rmult_integral _ _ H'); simpl in |- *; auto. (* Goal: forall _ : @eq R (IZR (Fnum x)) (IZR Z0), is_Fzero x *) (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Fexp x)) (IZR Z0), is_Fzero x *) case x; simpl in |- *. (* Goal: forall (Fnum Fexp : Z) (_ : @eq R (IZR Fnum) (IZR Z0)), is_Fzero (Float Fnum Fexp) *) (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Fexp x)) (IZR Z0), is_Fzero x *) intros Fnum1 Fexp1 H'0; red in |- *; simpl in |- *; auto with real zarith. (* Goal: @eq Z Fnum1 Z0 *) (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Fexp x)) (IZR Z0), is_Fzero x *) apply eq_IZR_R0; auto. (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Fexp x)) (IZR Z0), is_Fzero x *) intros H'0; Contradict H'0; apply powerRZ_NOR; auto with real zarith. Qed. Theorem NisFzeroComp : forall x y : float, ~ is_Fzero x -> x = y :>R -> ~ is_Fzero y. (* Goal: forall (x y : float) (_ : not (is_Fzero x)) (_ : @eq R (FtoR x) (FtoR y)), not (is_Fzero y) *) intros x y H' H'0; Contradict H'. (* Goal: is_Fzero x *) apply is_Fzero_rep2; auto. (* Goal: @eq R (FtoR x) (IZR Z0) *) rewrite H'0. (* Goal: @eq R (FtoR y) (IZR Z0) *) apply is_Fzero_rep1; auto. Qed. (* Some inegalities that will be helpful *) Theorem Rlt_monotony_exp : forall (x y : R) (z : Z), (x < y)%R -> (x * powerRZ radix z < y * powerRZ radix z)%R. (* Goal: forall (x y : R) (z : Z) (_ : Rlt x y), Rlt (Rmult x (powerRZ (IZR radix) z)) (Rmult y (powerRZ (IZR radix) z)) *) intros x y z H'; apply Rmult_lt_compat_r; auto with real zarith. Qed. Theorem Rle_monotone_exp : forall (x y : R) (z : Z), (x <= y)%R -> (x * powerRZ radix z <= y * powerRZ radix z)%R. (* Goal: forall (x y : R) (z : Z) (_ : Rle x y), Rle (Rmult x (powerRZ (IZR radix) z)) (Rmult y (powerRZ (IZR radix) z)) *) intros x y z H'; apply Rmult_le_compat_r; auto with real zarith. Qed. Theorem Rlt_monotony_contra_exp : forall (x y : R) (z : Z), (x * powerRZ radix z < y * powerRZ radix z)%R -> (x < y)%R. intros x y z H'; apply Rmult_lt_reg_l with (r := powerRZ radix z); auto with real zarith. (* Goal: Rle (Rmult (powerRZ (IZR radix) z) x) (Rmult (powerRZ (IZR radix) z) y) *) repeat rewrite (Rmult_comm (powerRZ radix z)); auto. Qed. Theorem Rle_monotony_contra_exp : forall (x y : R) (z : Z), (x * powerRZ radix z <= y * powerRZ radix z)%R -> (x <= y)%R. intros x y z H'; apply Rmult_le_reg_l with (r := powerRZ radix z); auto with real zarith. (* Goal: Rle (Rmult (powerRZ (IZR radix) z) x) (Rmult (powerRZ (IZR radix) z) y) *) repeat rewrite (Rmult_comm (powerRZ radix z)); auto. Qed. Theorem FtoREqInv1 : forall p q : float, ~ is_Fzero p -> p = q :>R -> Fnum p = Fnum q -> p = q. (* Goal: forall (p q : float) (_ : not (is_Fzero p)) (_ : @eq R (FtoR p) (FtoR q)) (_ : @eq Z (Fnum p) (Fnum q)), @eq float p q *) intros p q H' H'0 H'1. (* Goal: @eq float p q *) apply floatEq; auto. (* Goal: @eq Z (Fexp p) (Fexp q) *) unfold FtoR in H'0. (* Goal: @eq Z (Fexp p) (Fexp q) *) apply Rpow_eq_inv with (r := IZR radix); auto 6 with real zarith. (* Goal: not (@eq R (Rabs (IZR radix)) (IZR (Zpos xH))) *) (* Goal: @eq R (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Fexp q)) *) apply Rlt_dichotomy_converse; right; red in |- *. (* Goal: Rlt (IZR (Zpos xH)) (Rabs (IZR radix)) *) (* Goal: @eq R (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Fexp q)) *) unfold Rabs in |- *; case (Rcase_abs radix). intros H'2; Contradict H'2; apply Rle_not_lt; apply Ropp_le_cancel; auto with real. (* Goal: forall _ : Rge (IZR radix) (IZR Z0), Rlt (IZR (Zpos xH)) (IZR radix) *) (* Goal: @eq R (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Fexp q)) *) intros H'2; replace 1%R with (IZR 1); auto with real zarith. (* Goal: @eq R (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Fexp q)) *) apply Rmult_eq_reg_l with (r := IZR (Fnum p)); auto with real. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp q))) *) pattern (Fnum p) at 2 in |- *; rewrite H'1; auto. Qed. Theorem FtoREqInv2 : forall p q : float, p = q :>R -> Fexp p = Fexp q -> p = q. (* Goal: forall (p q : float) (_ : @eq R (FtoR p) (FtoR q)) (_ : @eq Z (Fexp p) (Fexp q)), @eq float p q *) intros p q H' H'0. (* Goal: @eq float p q *) apply floatEq; auto. (* Goal: @eq Z Fnum1 Fnum2 *) apply eq_IZR; auto. apply Rmult_eq_reg_l with (r := powerRZ radix (Fexp p)); auto with real zarith. repeat rewrite (Rmult_comm (powerRZ radix (Fexp p))); pattern (Fexp p) at 2 in |- *; rewrite H'0; auto with real zarith. Qed. Theorem Rlt_Float_Zlt : forall p q r : Z, (Float p r < Float q r)%R -> (p < q)%Z. (* Goal: forall (p q r : Z) (_ : Rle (FtoR (Float p r)) (FtoR (Float q r))), Z.le p q *) intros p q r H'. (* Goal: Z.lt p q *) apply lt_IZR. (* Goal: Rlt (IZR p) (IZR q) *) apply Rlt_monotony_contra_exp with (z := r); auto with real. Qed. Theorem Rle_Float_Zle : forall p q r : Z, (Float p r <= Float q r)%R -> (p <= q)%Z. (* Goal: forall (p q r : Z) (_ : Rle (FtoR (Float p r)) (FtoR (Float q r))), Z.le p q *) intros p q r H'. (* Goal: Z.le p q *) apply le_IZR. (* Goal: Rle (IZR p) (IZR q) *) apply Rle_monotony_contra_exp with (z := r); auto with real. Qed. (* Properties for floats with 1 as mantissa *) Theorem oneExp_le : forall x y : Z, (x <= y)%Z -> (Float 1%nat x <= Float 1%nat y)%R. (* Goal: forall (x y : Z) (_ : Z.lt x y), Rlt (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y)) *) intros x y H'; unfold FtoR in |- *; simpl in |- *. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) x)) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) y)) *) repeat rewrite Rmult_1_l; auto with real zarith. (* Goal: Rle (powerRZ (IZR radix) x) (powerRZ (IZR radix) y) *) apply Rle_powerRZ; try replace 1%R with (IZR 1); auto with real zarith zarith. Qed. Theorem oneExp_lt : forall x y : Z, (x < y)%Z -> (Float 1%nat x < Float 1%nat y)%R. (* Goal: forall (x y : Z) (_ : Z.lt x y), Rlt (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y)) *) intros x y H'; unfold FtoR in |- *; simpl in |- *. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) x)) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) y)) *) repeat rewrite Rmult_1_l; auto with real zarith. Qed. Theorem oneExp_Zlt : forall x y : Z, (Float 1%nat x < Float 1%nat y)%R -> (x < y)%Z. (* Goal: forall (x y : Z) (_ : Rlt (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y))), Z.lt x y *) intros x y H'; case (Zle_or_lt y x); auto; intros ZH; Contradict H'. (* Goal: not (Rlt (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y))) *) apply Rle_not_lt; apply oneExp_le; auto. Qed. Theorem oneExp_Zle : forall x y : Z, (Float 1%nat x <= Float 1%nat y)%R -> (x <= y)%Z. (* Goal: forall (x y : Z) (_ : Rle (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y))), Z.le x y *) intros x y H'; case (Zle_or_lt x y); auto; intros ZH; Contradict H'. (* Goal: not (Rle (FtoR (Float (Z.of_nat (S O)) x)) (FtoR (Float (Z.of_nat (S O)) y))) *) apply Rgt_not_le; red in |- *; apply oneExp_lt; auto. Qed. Definition Fdigit (p : float) := digit radix (Fnum p). Definition Fshift (n : nat) (x : float) := Float (Fnum x * Zpower_nat radix n) (Fexp x - n). Theorem sameExpEq : forall p q : float, p = q :>R -> Fexp p = Fexp q -> p = q. (* Goal: forall (p q : float) (_ : @eq R (FtoR p) (FtoR q)) (_ : @eq Z (Fexp p) (Fexp q)), @eq float p q *) intros p q; case p; case q; unfold FtoR in |- *; simpl in |- *. (* Goal: forall (Fnum Fexp Fnum0 Fexp0 : Z) (_ : @eq R (Rmult (IZR Fnum0) (powerRZ (IZR radix) Fexp0)) (Rmult (IZR Fnum) (powerRZ (IZR radix) Fexp))) (_ : @eq Z Fexp0 Fexp), @eq float (Float Fnum0 Fexp0) (Float Fnum Fexp) *) intros Fnum1 Fexp1 Fnum2 Fexp2 H' H'0; rewrite H'0; rewrite H'0 in H'. (* Goal: @eq float (Float Fnum2 Fexp1) (Float Fnum1 Fexp1) *) cut (Fnum1 = Fnum2). (* Goal: forall _ : @eq Z Fnum1 Fnum2, @eq float (Float Fnum2 Fexp1) (Float Fnum1 Fexp1) *) (* Goal: @eq Z Fnum1 Fnum2 *) intros H'1; rewrite <- H'1; auto. (* Goal: @eq Z Fnum1 Fnum2 *) apply eq_IZR; auto. apply Rmult_eq_reg_l with (r := powerRZ radix Fexp1); repeat rewrite (Rmult_comm (powerRZ radix Fexp1)); auto. (* Goal: not (@eq R (powerRZ (IZR radix) Fexp1) (IZR Z0)) *) apply Rlt_dichotomy_converse; right; auto with real. (* Goal: Rgt (powerRZ (IZR radix) Fexp1) (IZR Z0) *) red in |- *; auto with real. Qed. Theorem FshiftFdigit : forall (n : nat) (x : float), ~ is_Fzero x -> Fdigit (Fshift n x) = Fdigit x + n. (* Goal: forall (n : nat) (x : float) (_ : not (is_Fzero x)), @eq nat (Fdigit (Fshift n x)) (Init.Nat.add (Fdigit x) n) *) intros n x; case x; unfold Fshift, Fdigit, is_Fzero in |- *; simpl in |- *. (* Goal: forall (Fnum _ : Z) (_ : not (@eq Z Fnum Z0)), @eq nat (digit radix (Z.mul Fnum (Zpower_nat radix n))) (Init.Nat.add (digit radix Fnum) n) *) intros p1 p2 H; apply digitAdd; auto. Qed. Theorem FshiftCorrect : forall (n : nat) (x : float), Fshift n x = x :>R. intros n x; unfold FtoR in |- *; simpl in |- *. rewrite Rmult_IZR. rewrite Zpower_nat_Z_powerRZ; auto. repeat rewrite Rmult_assoc. rewrite <- powerRZ_add; auto with real zarith. rewrite Zplus_minus; auto. Qed. Theorem FshiftCorrectInv : forall x y : float, x = y :>R -> (Fexp x <= Fexp y)%Z -> Fshift (Zabs_nat (Fexp y - Fexp x)) y = x. (* Goal: forall (x y : float) (_ : @eq R (FtoR x) (FtoR y)) (_ : Z.le (Fexp x) (Fexp y)), @eq float (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y) x *) intros x y H' H'0; try apply sameExpEq; auto. (* Goal: @eq R (FtoR (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y)) (FtoR x) *) (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y)) (Fexp x) *) apply trans_eq with (y := FtoR y); auto. (* Goal: @eq R (FtoR (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y)) (FtoR y) *) (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y)) (Fexp x) *) apply FshiftCorrect. (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y)) (Fexp x) *) generalize H' H'0; case x; case y; simpl in |- *; clear H' H'0 x y. (* Goal: forall (Fnum Fexp Fnum0 Fexp0 : Z) (_ : @eq R (FtoR (Float Fnum0 Fexp0)) (FtoR (Float Fnum Fexp))) (_ : Z.le Fexp0 Fexp), @eq Z (Z.sub Fexp (Z.of_nat (Z.abs_nat (Z.sub Fexp Fexp0)))) Fexp0 *) intros Fnum1 Fexp1 Fnum2 Fexp2 H' H'0; rewrite inj_abs; auto with zarith. Qed. Theorem FshiftO : forall x : float, Fshift 0 x = x. (* Goal: forall x : float, @eq float (Fshift O x) x *) intros x; unfold Fshift in |- *; apply floatEq; simpl in |- *. (* Goal: @eq Z (Z.mul (Fnum x) (Zpos xH)) (Fnum x) *) (* Goal: @eq Z (Z.sub (Fexp x) Z0) (Fexp x) *) replace (Zpower_nat radix 0) with 1%Z; auto with zarith. (* Goal: @eq Z (Z.sub (Fexp x) Z0) (Fexp x) *) simpl in |- *; auto with zarith. Qed. Theorem FshiftCorrectSym : forall x y : float, x = y :>R -> exists n : nat, (exists m : nat, Fshift n x = Fshift m y). (* Goal: forall (x y : float) (_ : @eq R (FtoR x) (FtoR y)), @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) intros x y H'. (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) case (Z_le_gt_dec (Fexp x) (Fexp y)); intros H'1. (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) exists 0; exists (Zabs_nat (Fexp y - Fexp x)). (* Goal: @eq float (Fshift (Z.abs_nat (Z.sub (Fexp x) (Fexp y))) x) (Fshift O y) *) rewrite FshiftO. (* Goal: @eq float x (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y) *) (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) apply sym_equal. (* Goal: @eq float (Fshift (Z.abs_nat (Z.sub (Fexp y) (Fexp x))) y) x *) (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) apply FshiftCorrectInv; auto. (* Goal: @ex nat (fun n : nat => @ex nat (fun m : nat => @eq float (Fshift n x) (Fshift m y))) *) exists (Zabs_nat (Fexp x - Fexp y)); exists 0. (* Goal: @eq float (Fshift (Z.abs_nat (Z.sub (Fexp x) (Fexp y))) x) (Fshift O y) *) rewrite FshiftO. (* Goal: @eq float (Fshift (Z.abs_nat (Z.sub (Fexp x) (Fexp y))) x) y *) apply FshiftCorrectInv; auto with zarith. Qed. Theorem FshiftAdd : forall (n m : nat) (p : float), Fshift (n + m) p = Fshift n (Fshift m p). (* Goal: forall (n m : nat) (p : float), @eq float (Fshift (Init.Nat.add n m) p) (Fshift n (Fshift m p)) *) intros n m p; case p; unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.sub (Fexp x) Z0) (Fexp x) *) intros Fnum1 Fexp1; apply floatEq; simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.mul Fnum1 (Zpower_nat radix (Init.Nat.add n m))) (Z.mul (Z.mul Fnum1 (Zpower_nat radix m)) (Zpower_nat radix n)) *) (* Goal: @eq Z (Z.sub Fexp1 (Z.of_nat (Init.Nat.add n m))) (Z.sub (Z.sub Fexp1 (Z.of_nat m)) (Z.of_nat n)) *) rewrite Zpower_nat_is_exp; auto with zarith. (* Goal: @eq Z (Z.mul Fnum1 (Z.mul (Zpower_nat radix n) (Zpower_nat radix m))) (Z.mul (Z.mul Fnum1 (Zpower_nat radix m)) (Zpower_nat radix n)) *) (* Goal: @eq Z (Z.sub Fexp1 (Z.of_nat (Init.Nat.add n m))) (Z.sub (Z.sub Fexp1 (Z.of_nat m)) (Z.of_nat n)) *) rewrite (Zmult_comm (Zpower_nat radix n)); auto with zarith. (* Goal: @eq Z (Z.sub Fexp1 (Z.of_nat (Init.Nat.add n m))) (Z.sub (Z.sub Fexp1 (Z.of_nat m)) (Z.of_nat n)) *) rewrite <- (Zminus_plus_simpl_r (Fexp1 - m) n m). (* Goal: @eq Z (Z.sub Fexp1 (Z.of_nat (Init.Nat.add n m))) (Z.sub (Z.add (Z.sub Fexp1 (Z.of_nat m)) (Z.of_nat m)) (Z.add (Z.of_nat n) (Z.of_nat m))) *) replace (Fexp1 - m + m)%Z with Fexp1; auto with zarith. (* Goal: @eq Z (Z.sub Fexp1 (Z.of_nat (Init.Nat.add n m))) (Z.sub Fexp1 (Z.add (Z.of_nat n) (Z.of_nat m))) *) replace (Z_of_nat (n + m)) with (n + m)%Z; auto with zarith arith. (* Goal: @eq Z (Z.add (Z.of_nat n) (Z.of_nat m)) (Z.of_nat (Init.Nat.add n m)) *) rewrite <- inj_plus; auto. Qed. Theorem ReqGivesEqwithSameExp : forall p q : float, exists r : float, (exists s : float, p = r :>R /\ q = s :>R /\ Fexp r = Fexp s). intros p q; exists (Fshift (Zabs_nat (Fexp p - Zmin (Fexp p) (Fexp q))) p); exists (Fshift (Zabs_nat (Fexp q - Zmin (Fexp p) (Fexp q))) q); repeat split; auto with real. (* Goal: @eq R (FtoR q) (FtoR (Fshift (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) q)) *) (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q)))) p)) (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) q)) *) rewrite FshiftCorrect; auto. (* Goal: @eq R (FtoR q) (FtoR (Fshift (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) q)) *) (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q)))) p)) (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) q)) *) rewrite FshiftCorrect; auto. (* Goal: @eq Z (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q)))) p)) (Fexp (Fshift (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) q)) *) simpl in |- *. replace (Z_of_nat (Zabs_nat (Fexp p - Zmin (Fexp p) (Fexp q)))) with (Fexp p - Zmin (Fexp p) (Fexp q))%Z. replace (Z_of_nat (Zabs_nat (Fexp q - Zmin (Fexp p) (Fexp q)))) with (Fexp q - Zmin (Fexp p) (Fexp q))%Z. (* Goal: @eq Z (Z.sub (Fexp p) (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q)))) (Z.sub (Fexp q) (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q)))) *) (* Goal: @eq Z (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp q) (Z.min (Fexp p) (Fexp q))))) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))))) *) case (Zmin_or (Fexp p) (Fexp q)); intros H'; rewrite H'; auto with zarith. (* Goal: forall _ : Z.le (Z.min (Fexp p) (Fexp q)) (Fexp q), @eq Z (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))))) *) rewrite inj_abs; auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) *) apply Zplus_le_reg_l with (p := Zmin (Fexp p) (Fexp q)); auto with zarith. (* Goal: @eq Z (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))))) *) generalize (Zle_min_r (Fexp p) (Fexp q)); auto with zarith. (* Goal: forall _ : Z.le (Z.min (Fexp p) (Fexp q)) (Fexp q), @eq Z (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))))) *) rewrite inj_abs; auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Z.min (Fexp p) (Fexp q))) *) apply Zplus_le_reg_l with (p := Zmin (Fexp p) (Fexp q)); auto with zarith. Qed. Theorem FdigitEq : forall x y : float, ~ is_Fzero x -> x = y :>R -> Fdigit x = Fdigit y -> x = y. intros x y H' H'0 H'1. cut (~ is_Fzero y); [ intros NZy | idtac ]. 2: red in |- *; intros H'2; case H'. (* Goal: @eq R (FtoR y) (IZR Z0) *) 2: apply is_Fzero_rep2; rewrite H'0; apply is_Fzero_rep1; auto. case (Zle_or_lt (Fexp x) (Fexp y)); intros Eq1. case (Zle_lt_or_eq _ _ Eq1); clear Eq1; intros Eq1. absurd (Fdigit (Fshift (Zabs_nat (Fexp y - Fexp x)) y) = Fdigit y + Zabs_nat (Fexp y - Fexp x)). rewrite FshiftCorrectInv; auto. rewrite <- H'1. red in |- *; intros H'2. absurd (0%Z = (Fexp y - Fexp x)%Z); auto with zarith arith. rewrite <- (inj_abs (Fexp y - Fexp x)); auto with zarith. apply Zlt_le_weak; auto. apply FshiftFdigit; auto. apply sameExpEq; auto. absurd (Fdigit (Fshift (Zabs_nat (Fexp x - Fexp y)) x) = Fdigit x + Zabs_nat (Fexp x - Fexp y)). rewrite FshiftCorrectInv; auto. rewrite <- H'1. red in |- *; intros H'2. absurd (0%Z = (Fexp x - Fexp y)%Z); auto with zarith arith. rewrite <- (inj_abs (Fexp x - Fexp y)); auto with zarith. apply Zlt_le_weak; auto. apply FshiftFdigit; auto. Qed. End definitions. Hint Resolve Rlt_monotony_exp Rle_monotone_exp: real. Hint Resolve Zlt_not_eq Zlt_not_eq_rev: zarith.
(**************************************************************************** IEEE754 : Fbound Laurent Thery ******************************************************************************) Require Export Fop. Section Fbounded_Def. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Coercion Z_of_N: N >-> Z. Record Fbound : Set := Bound {vNum : positive; dExp : N}. Definition Fbounded (b : Fbound) (d : float) := (Zabs (Fnum d) < Zpos (vNum b))%Z /\ (- dExp b <= Fexp d)%Z. Theorem FboundedNum : forall (b : Fbound) (p : float), Fbounded b p -> (Zabs (Fnum p) < Zpos (vNum b))%Z. (* Goal: forall (b : Fbound) (p : float) (_ : Fbounded b p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros b p H; case H; intros H1 H2; case H1; auto. Qed. Theorem FboundedExp : forall (b : Fbound) (p : float), Fbounded b p -> (- dExp b <= Fexp p)%Z. (* Goal: forall (b : Fbound) (p : float) (_ : Fbounded b p), Z.le (Z.opp (Z.of_N (dExp b))) (Fexp p) *) intros b p H; case H; auto. Qed. Hint Resolve FboundedNum FboundedExp: float. Theorem isBounded : forall (b : Fbound) (p : float), {Fbounded b p} + {~ Fbounded b p}. intros b p; case (Z_le_gt_dec (Zpos (vNum b)) (Zabs (Fnum p))); intros H'. (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) right; red in |- *; intros H'3; Contradict H'; auto with float zarith. (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) case (Z_le_gt_dec (- dExp b) (Fexp p)); intros H'1. (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) left; repeat split; auto with zarith. (* Goal: sumbool (Fbounded b p) (not (Fbounded b p)) *) right; red in |- *; intros H'3; Contradict H'1; auto with float zarith. Qed. Theorem FzeroisZero : forall b : Fbound, Fzero (- dExp b) = 0%R :>R. (* Goal: forall b : Fbound, @eq R (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (IZR Z0) *) intros b; unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real. Qed. Theorem FboundedFzero : forall b : Fbound, Fbounded b (Fzero (- dExp b)). (* Goal: forall b : Fbound, Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) intros b; repeat (split; simpl in |- *). (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) *) replace 0%Z with (- 0%nat)%Z; [ idtac | simpl in |- *; auto ]. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) *) apply Zeq_le; auto with arith. Qed. Hint Unfold Fbounded. Theorem FboundedZeroSameExp : forall (b : Fbound) (p : float), Fbounded b p -> Fbounded b (Fzero (Fexp p)). (* Goal: forall (b : Fbound) (p : float) (_ : Fbounded b p), Fbounded b (Fzero (Fexp p)) *) intros b p H'; (repeat split; simpl in |- *; auto with float zarith). Qed. Theorem FBoundedScale : forall (b : Fbound) (p : float) (n : nat), Fbounded b p -> Fbounded b (Float (Fnum p) (Fexp p + n)). (* Goal: forall (b : Fbound) (p : float) (n : nat) (_ : Fbounded b p), Fbounded b (Float (Fnum p) (Z.add (Fexp p) (Z.of_nat n))) *) intros b p n H'; repeat split; simpl in |- *; auto with float. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Z.of_nat n)) *) apply Zle_trans with (Fexp p); auto with float. pattern (Fexp p) at 1 in |- *; (replace (Fexp p) with (Fexp p + 0%nat)%Z; [ idtac | simpl in |- *; ring ]). (* Goal: Z.le (Z.add (Fexp p) (Z.of_nat O)) (Z.add (Fexp p) (Z.of_nat n)) *) apply Zplus_le_compat_l. (* Goal: Z.le (Z.of_nat O) (Z.of_nat n) *) apply inj_le; auto with arith. Qed. Theorem FvalScale : forall (b : Fbound) (p : float) (n : nat), Float (Fnum p) (Fexp p + n) = (powerRZ radix n * p)%R :>R. (* Goal: forall (_ : Fbound) (p : float) (n : nat), @eq R (FtoRradix (Float (Fnum p) (Z.add (Fexp p) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (FtoRradix p)) *) intros b p n; unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Z.add (Fexp p) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) rewrite powerRZ_add; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) ring. Qed. Theorem oppBounded : forall (b : Fbound) (x : float), Fbounded b x -> Fbounded b (Fopp x). (* Goal: forall (b : Fbound) (x : float) (_ : Fbounded b x), Fbounded b (Fopp x) *) intros b x H'; repeat split; simpl in |- *; auto with float zarith. (* Goal: Z.lt (Z.abs (Z.opp (Fnum x))) (Zpos (vNum b)) *) replace (Zabs (- Fnum x)) with (Zabs (Fnum x)); auto with float. (* Goal: @eq Z (Z.abs (Fnum x)) (Z.abs (Z.opp (Fnum x))) *) case (Fnum x); simpl in |- *; auto. Qed. Theorem oppBoundedInv : forall (b : Fbound) (x : float), Fbounded b (Fopp x) -> Fbounded b x. (* Goal: forall (b : Fbound) (x : float) (_ : Fbounded b (Fopp x)), Fbounded b x *) intros b x H'; rewrite <- (Fopp_Fopp x). (* Goal: Fbounded b (Fopp r) *) (* Goal: @eq Z (Fexp (Fopp r)) z *) apply oppBounded; auto. Qed. Theorem FopRepAux : forall (b : Fbound) (z : Z) (p : R), ex (fun r : float => r = (- p)%R :>R /\ Fbounded b r /\ Fexp r = z) -> ex (fun r : float => r = p :>R /\ Fbounded b r /\ Fexp r = z). intros b z p H'; elim H'; intros r E; elim E; intros H'0 H'1; elim H'1; intros H'2 H'3; clear H'1 E H'. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) p) (and (Fbounded b r) (@eq Z (Fexp r) z))) *) exists (Fopp r); split; auto. (* Goal: @eq R (FtoRradix (Fopp r)) p *) (* Goal: and (Fbounded b (Fopp r)) (@eq Z (Fexp (Fopp r)) z) *) rewrite <- (Ropp_involutive p). (* Goal: @eq R (FtoRradix (Fopp r)) (Ropp (Ropp p)) *) (* Goal: and (Fbounded b (Fopp r)) (@eq Z (Fexp (Fopp r)) z) *) rewrite <- H'0; auto. (* Goal: @eq R (FtoRradix (Fopp r)) (Ropp (FtoRradix r)) *) (* Goal: and (Fbounded b (Fopp r)) (@eq Z (Fexp (Fopp r)) z) *) unfold FtoRradix in |- *; apply Fopp_correct; auto. (* Goal: Fbounded b q *) split. (* Goal: Fbounded b (Fopp r) *) (* Goal: @eq Z (Fexp (Fopp r)) z *) apply oppBounded; auto. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix m f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) simpl in |- *; auto. Qed. Theorem absFBounded : forall (b : Fbound) (f : float), Fbounded b f -> Fbounded b (Fabs f). (* Goal: forall (b : Fbound) (f : float) (_ : Fbounded b f), Fbounded b (Fabs f) *) intros b f H'; repeat split; simpl in |- *; auto with float. (* Goal: Z.lt (Z.abs (Z.abs (Fnum f))) (Zpos (vNum b)) *) replace (Zabs (Zabs (Fnum f))) with (Zabs (Fnum f)); auto with float. (* Goal: @eq Z (Z.abs (Fnum f)) (Z.abs (Z.abs (Fnum f))) *) case (Fnum f); auto. Qed. Theorem FboundedEqExpPos : forall (b : Fbound) (p q : float), Fbounded b p -> p = q :>R -> (Fexp p <= Fexp q)%R -> (0 <= q)%R -> Fbounded b q. (* Goal: forall (b : Fbound) (p q : float) (_ : Fbounded b p) (_ : @eq R (FtoRradix p) (FtoRradix q)) (_ : Rle (IZR (Fexp p)) (IZR (Fexp q))) (_ : Rle (IZR Z0) (FtoRradix q)), Fbounded b q *) intros b p q H' H'0 H'1 H'2. cut (0 <= Fnum p)%Z; [ intros Z1 | apply (LeR0Fnum radix); auto with real arith; fold FtoRradix in |- *; rewrite H'0; auto ]. cut (0 <= Fnum q)%Z; [ intros Z2 | apply (LeR0Fnum radix); auto with real arith ]. (* Goal: Fbounded b q *) split. (* Goal: Z.lt (Z.abs (Fnum q)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply Zle_lt_trans with (Zabs (Fnum p)); [ idtac | auto with float ]. (* Goal: Z.le (Z.abs (Fnum q)) (Z.abs (Fnum p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) repeat rewrite Zabs_eq; auto. apply Zle_trans with (Fnum (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q)); auto. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix m f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) unfold Fshift in |- *; simpl in |- *; auto. pattern (Fnum q) at 1 in |- *; replace (Fnum q) with (Fnum q * 1)%Z; auto with zarith. (* Goal: Z.le (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum p) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply (Rle_Fexp_eq_Zle radix); auto with real zarith. (* Goal: Rle (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (FtoR radix p) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite FshiftCorrect; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) unfold Fshift in |- *; simpl in |- *; rewrite inj_abs; try ring. (* Goal: Z.le Z0 (Z.sub (Fexp q) (Fexp p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply Zle_Zminus_ZERO; apply le_IZR; auto with real arith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply Zle_trans with (Fexp p). (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) case H'; auto. (* Goal: Z.le (Fexp p) (Fexp q) *) apply le_IZR; auto with real arith. Qed. Theorem FboundedEqExp : forall (b : Fbound) (p q : float), Fbounded b p -> p = q :>R -> (Fexp p <= Fexp q)%R -> Fbounded b q. (* Goal: Fbounded b q *) intros b p q H' H'0 H'1; split. (* Goal: Z.lt (Z.abs (Fnum q)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply Zle_lt_trans with (Zabs (Fnum p)); [ idtac | auto with float ]. apply Zle_trans with (Zabs (Fnum (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q))); auto. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix m f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) unfold Fshift in |- *; simpl in |- *; auto. (* Goal: Z.le (Z.abs (Fnum q)) (Z.abs (Z.mul (Fnum q) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))))) *) (* Goal: Z.le (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))) (Z.abs (Fnum p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite Zabs_Zmult. pattern (Zabs (Fnum q)) at 1 in |- *; replace (Zabs (Fnum q)) with (Zabs (Fnum q) * 1%nat)%Z; [ apply Zle_Zmult_comp_l | auto with zarith ]; auto with zarith. (* Goal: Z.le (Z.of_nat (S O)) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))))) *) (* Goal: @eq Z (Z.mul (Z.abs (Fnum q)) (Z.of_nat (S O))) (Z.abs (Fnum q)) *) (* Goal: Z.le (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))) (Z.abs (Fnum p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite Zabs_eq; simpl in |- *; auto with zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) simpl in |- *; ring. (* Goal: Z.le (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))) (Z.abs (Fnum p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) cut (Fexp p <= Fexp q)%Z; [ intros E2 | idtac ]. (* Goal: Z.le (Z.abs x) (Z.abs y) *) apply le_IZR; auto. apply (Rle_monotony_contra_exp radix) with (z := Fexp p); auto with real arith. pattern (Fexp p) at 2 in |- *; replace (Fexp p) with (Fexp (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q)); auto. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)))) (powerRZ (IZR radix) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite <- (fun x => Rabs_pos_eq (powerRZ radix x)); auto with real zarith. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)))) (Rabs (powerRZ (IZR radix) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite <- Faux.Rabsolu_Zabs. (* Goal: Rle (Rmult (Rabs (IZR (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)))) (Rabs (powerRZ (IZR radix) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite <- Rabs_mult. change (Rabs (FtoRradix (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q)) <= Zabs (Fnum p) * powerRZ radix (Fexp p))%R in |- *. (* Goal: Rle (Rabs (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. (* Goal: Rle (Rabs (FtoR radix q)) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) fold FtoRradix in |- *; rewrite <- H'0. (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite <- (Fabs_correct radix); auto with real zarith. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.sub (Fexp q) (Z.of_nat (Z.abs_nat (Z.sub (Fexp q) (Fexp p))))) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) rewrite inj_abs; [ ring | auto with zarith ]. (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) cut (Fexp p <= Fexp q)%Z; [ intros E2 | apply le_IZR ]; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply Zle_trans with (Fexp p); [ idtac | apply le_IZR ]; auto with float. Qed. Theorem eqExpLess : forall (b : Fbound) (p q : float), Fbounded b p -> p = q :>R -> exists r : float, Fbounded b r /\ r = q :>R /\ (Fexp q <= Fexp r)%R. (* Goal: forall (b : Fbound) (p q : float) (_ : Fbounded b p) (_ : @eq R (FtoRradix p) (FtoRradix q)), @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix q)) (Rle (IZR (Fexp q)) (IZR (Fexp r))))) *) intros b p q H' H'0. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix q)) (Rle (IZR (Fexp q)) (IZR (Fexp r))))) *) case (Rle_or_lt (Fexp q) (Fexp p)); intros H'1. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix q)) (Rle (IZR (Fexp q)) (IZR (Fexp r))))) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix q)) (Rle (IZR (Fexp q)) (IZR (Fexp r))))) *) exists p; repeat (split; auto). (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix q)) (Rle (IZR (Fexp q)) (IZR (Fexp r))))) *) exists q; split; [ idtac | split ]; auto with real. (* Goal: Fbounded b q *) apply FboundedEqExp with (p := p); auto. (* Goal: Rle (IZR (Fexp p)) (IZR (Fexp q)) *) apply Rlt_le; auto. Qed. Theorem FboundedShiftLess : forall (b : Fbound) (f : float) (n m : nat), m <= n -> Fbounded b (Fshift radix n f) -> Fbounded b (Fshift radix m f). (* Goal: forall (b : Fbound) (f : float) (n m : nat) (_ : le m n) (_ : Fbounded b (Fshift radix n f)), Fbounded b (Fshift radix m f) *) intros b f n m H' H'0; split; auto. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix m f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) simpl in |- *; auto. (* Goal: Z.lt (Z.abs (Z.mul (Fnum f) (Zpower_nat radix m))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) apply Zle_lt_trans with (Zabs (Fnum (Fshift radix n f))). (* Goal: Z.le (Z.abs (Z.mul (Fnum f) (Zpower_nat radix m))) (Z.abs (Fnum (Fshift radix n f))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) simpl in |- *; replace m with (m + 0); auto with arith. (* Goal: Z.le (Z.abs (Z.mul (Fnum f) (Zpower_nat radix (Init.Nat.add m O)))) (Z.abs (Z.mul (Fnum f) (Zpower_nat radix n))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) replace n with (m + (n - m)); auto with arith. (* Goal: Z.le (Z.abs (Z.mul (Fnum f) (Zpower_nat radix (Init.Nat.add m O)))) (Z.abs (Z.mul (Fnum f) (Zpower_nat radix (Init.Nat.add m (Init.Nat.sub n m))))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) repeat rewrite Zpower_nat_is_exp. (* Goal: Z.le (Z.abs (Z.mul (Fnum f) (Z.mul (Zpower_nat radix m) (Zpower_nat radix O)))) (Z.abs (Z.mul (Fnum f) (Z.mul (Zpower_nat radix m) (Zpower_nat radix (Init.Nat.sub n m))))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) repeat rewrite Zabs_Zmult; auto. (* Goal: Z.le (Z.mul (Z.abs (Zpower_nat radix m)) (Z.abs (Zpower_nat radix O))) (Z.mul (Z.abs (Zpower_nat radix m)) (Z.abs (Zpower_nat radix (Init.Nat.sub n m)))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) apply Zle_Zmult_comp_l; auto with zarith. (* Goal: Z.le (Z.mul (Z.abs (Zpower_nat radix m)) (Z.abs (Zpower_nat radix O))) (Z.mul (Z.abs (Zpower_nat radix m)) (Z.abs (Zpower_nat radix (Init.Nat.sub n m)))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) apply Zle_Zmult_comp_l; auto with zarith. (* Goal: Z.le (Z.abs (Zpower_nat radix O)) (Z.abs (Zpower_nat radix (Init.Nat.sub n m))) *) (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) repeat rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix n f))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) case H'0; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix m f)) *) apply Zle_trans with (Fexp (Fshift radix n f)); auto with float. (* Goal: Z.le (Fexp (Fshift radix n f)) (Fexp (Fshift radix m f)) *) simpl in |- *; unfold Zminus in |- *; auto with zarith. Qed. Theorem eqExpMax : forall (b : Fbound) (p q : float), Fbounded b p -> Fbounded b q -> (Fabs p <= q)%R -> exists r : float, Fbounded b r /\ r = p :>R /\ (Fexp r <= Fexp q)%Z. (* Goal: forall (b : Fbound) (p q : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Rle (FtoRradix (Fabs p)) (FtoRradix q)), @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix p)) (Z.le (Fexp r) (Fexp q)))) *) intros b p q H' H'0 H'1; case (Zle_or_lt (Fexp p) (Fexp q)); intros Rl0. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix p)) (Z.le (Fexp r) (Fexp q)))) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix p)) (Z.le (Fexp r) (Fexp q)))) *) exists p; auto. cut ((Fexp p - Zabs_nat (Fexp p - Fexp q))%Z = Fexp q); [ intros Eq1 | idtac ]. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix p)) (Z.le (Fexp r) (Fexp q)))) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) exists (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p); split; split; auto. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) apply Zle_lt_trans with (Fnum q); auto with float. replace (Zabs (Fnum (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p))) with (Fnum (Fabs (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p))); auto. (* Goal: Z.le (Fnum (Fabs (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p))) (Fnum q) *) (* Goal: Z.lt (Fnum q) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) apply (Rle_Fexp_eq_Zle radix); auto with arith. rewrite Fabs_correct; auto with arith; rewrite FshiftCorrect; auto with arith; rewrite <- (Fabs_correct radix); auto with float arith. (* Goal: Z.lt (Fnum q) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) rewrite <- (Zabs_eq (Fnum q)); auto with float zarith. (* Goal: Z.le Z0 (Fnum q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) apply (LeR0Fnum radix); auto. (* Goal: Rle (IZR Z0) (FtoR radix q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) apply Rle_trans with (2 := H'1); auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fabs p)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) rewrite (Fabs_correct radix); auto with real zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) *) (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) unfold Fshift in |- *; simpl in |- *; rewrite Eq1; auto with float. (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) unfold FtoRradix in |- *; apply FshiftCorrect; auto. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) unfold Fshift in |- *; simpl in |- *. (* Goal: Z.le (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) rewrite Eq1; auto with zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) rewrite inj_abs; auto with zarith; ring. Qed. Theorem Zle_monotony_contra_abs_pow : forall x y z n : Z, (0 < z)%Z -> (Rabs (x * powerRZ z n) <= Rabs (y * powerRZ z n))%R -> (Zabs x <= Zabs y)%Z. (* Goal: forall (x y z n : Z) (_ : Z.lt Z0 z) (_ : Rle (Rabs (Rmult (IZR x) (powerRZ (IZR z) n))) (Rabs (Rmult (IZR y) (powerRZ (IZR z) n)))), Z.le (Z.abs x) (Z.abs y) *) intros x y z n Hz O1. (* Goal: Z.le (Z.abs x) (Z.abs y) *) apply le_IZR; auto. (* Goal: Rle (IZR (Z.abs x)) (IZR (Z.abs y)) *) apply Rmult_le_reg_l with (r := powerRZ z n); auto with real zarith. (* Goal: Rle (Rmult (powerRZ (IZR z) n) (IZR (Z.abs x))) (Rmult (powerRZ (IZR z) n) (IZR (Z.abs y))) *) repeat rewrite (Rmult_comm (powerRZ z n)); auto. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)))) (Rabs (powerRZ (IZR radix) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q))))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: Z.le (Fexp p) (Fexp q) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q) *) repeat rewrite <- Faux.Rabsolu_Zabs. (* Goal: Rle (Rmult (Rabs (IZR x)) (powerRZ (IZR z) n)) (Rmult (Rabs (IZR y)) (powerRZ (IZR z) n)) *) replace (powerRZ z n) with (Rabs (powerRZ z n)). (* Goal: Rle (Rmult (Rabs (IZR x)) (Rabs (powerRZ (IZR z) n))) (Rmult (Rabs (IZR y)) (Rabs (powerRZ (IZR z) n))) *) (* Goal: @eq R (Rabs (powerRZ (IZR z) n)) (powerRZ (IZR z) n) *) repeat rewrite <- Rabs_mult; auto. (* Goal: @eq R (Rabs (powerRZ (IZR z) n)) (powerRZ (IZR z) n) *) apply Rabs_pos_eq; auto with real zarith. Qed. Theorem LessExpBound : forall (b : Fbound) (p q : float), Fbounded b p -> Fbounded b q -> (Fexp q <= Fexp p)%Z -> (0 <= p)%R -> (p <= q)%R -> exists m : Z, Float m (Fexp q) = p :>R /\ Fbounded b (Float m (Fexp q)). intros b p q H' H'0 H'1 H'2 H'3; exists (Fnum p * Zpower_nat radix (Zabs_nat (Fexp p - Fexp q)))%Z. cut (Float (Fnum p * Zpower_nat radix (Zabs_nat (Fexp p - Fexp q))) (Fexp q) = p :>R); [ intros Eq1 | idtac ]. (* Goal: and (@eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p)) (Fbounded b (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) split; auto. (* Goal: Fbounded b (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q)) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) repeat split; simpl in |- *; auto with float. (* Goal: Z.lt (Z.abs (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q)))))) (Zpos (vNum b)) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) apply Zle_lt_trans with (Zabs (Fnum q)); auto with float. apply Zle_monotony_contra_abs_pow with (z := radix) (n := Fexp q); auto with real arith. (* Goal: Rle (Rabs (Rmult (IZR (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q)))))) (powerRZ (IZR radix) (Fexp q)))) (Rabs (Rmult (IZR (Fnum q)) (powerRZ (IZR radix) (Fexp q)))) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) unfold FtoRradix, FtoR in Eq1; simpl in Eq1; rewrite Eq1; auto with real. (* Goal: Rle (Rabs (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) (Rabs (Rmult (IZR (Fnum q)) (powerRZ (IZR radix) (Fexp q)))) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) change (Rabs p <= Rabs q)%R in |- *. (* Goal: Rle (Rabs (FtoRradix p)) (Rabs (FtoRradix q)) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) repeat rewrite Rabs_pos_eq; auto with real. (* Goal: Rle (IZR Z0) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) apply Rle_trans with (1 := H'2); auto. pattern (Fexp q) at 2 in |- *; replace (Fexp q) with (Fexp p - Zabs_nat (Fexp p - Fexp q))%Z. (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))))) (FtoRradix p) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) change (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p = p :>R) in |- *. (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))) p)) (FtoRradix p) *) (* Goal: @eq Z (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q) *) unfold FtoRradix in |- *; apply FshiftCorrect; auto. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) rewrite inj_abs; auto with zarith; ring. Qed. Theorem maxFbounded : forall (b : Fbound) (z : Z), (- dExp b <= z)%Z -> Fbounded b (Float (Zpred (Zpos (vNum b))) z). (* Goal: and (@eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p)) (Fbounded b (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) *) (* Goal: @eq R (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp q))))) (Fexp q))) (FtoRradix p) *) intros b z H; split; auto. (* Goal: Z.lt (Z.abs (Fnum (Float (Z.pred (Zpos (vNum b))) z))) (Zpos (vNum b)) *) change (Zabs (Zpred (Zpos (vNum b))) < Zpos (vNum b))%Z in |- *. (* Goal: Z.lt (Z.abs (Z.pred (Zpos (vNum b)))) (Zpos (vNum b)) *) rewrite Zabs_eq; auto with zarith. Qed. Theorem maxMax : forall (b : Fbound) (p : float) (z : Z), Fbounded b p -> (Fexp p <= z)%Z -> (Fabs p < Float (Zpos (vNum b)) z)%R. intros b p z H' H'0; unfold FtoRradix in |- *; rewrite <- (FshiftCorrect _ radixMoreThanOne (Zabs_nat (z - Fexp p)) (Float (Zpos (vNum b)) z)); unfold Fshift in |- *. change (FtoR radix (Fabs p) < FtoR radix (Float (Zpos (vNum b) * Zpower_nat radix (Zabs_nat (z - Fexp p))) (z - Zabs_nat (z - Fexp p))))%R in |- *. (* Goal: Rlt (FtoR radix (Fabs p)) (FtoR radix (Float (Z.mul (Zpos (vNum b)) (Zpower_nat radix (Z.abs_nat (Z.sub z (Fexp p))))) (Z.sub z (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p))))))) *) replace (z - Zabs_nat (z - Fexp p))%Z with (Fexp p). (* Goal: Rlt (FtoR radix (Fabs p)) (FtoR radix (Float (Z.mul (Zpos (vNum b)) (Zpower_nat radix (Z.abs_nat (Z.sub z (Fexp p))))) (Fexp p))) *) (* Goal: @eq Z (Fexp p) (Z.sub z (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p))))) *) unfold Fabs, FtoR in |- *. change (Zabs (Fnum p) * powerRZ radix (Fexp p) < (Zpos (vNum b) * Zpower_nat radix (Zabs_nat (z - Fexp p)))%Z * powerRZ radix (Fexp p))%R in |- *. (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Z.mul (Zpos (vNum b)) (Zpower_nat radix (Z.abs_nat (Z.sub z (Fexp p)))))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Fexp p) (Z.sub z (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p))))) *) apply Rmult_lt_compat_r; auto with real zarith. apply Rlt_le_trans with (IZR (Zpos (vNum b))); auto with real float zarith. pattern (Zpos (vNum b)) at 1 in |- *; replace (Zpos (vNum b)) with (Zpos (vNum b) * 1)%Z; (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) auto with real float zarith; ring. (* Goal: @eq R (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) (Z.of_nat n)))) (Rmult (powerRZ (IZR radix) (Z.of_nat n)) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p)))) *) rewrite inj_abs; auto with zarith; ring. Qed. End Fbounded_Def. Hint Resolve FboundedFzero oppBounded absFBounded maxFbounded FboundedNum FboundedExp: float.
(**************************************************************************** IEEE754 : FroundProp Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export Fround. Require Export MSB. Section FRoundP. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition Fulp (p : float) := powerRZ radix (Fexp (Fnormalize radix b precision p)). Theorem FulpComp : forall p q : float, Fbounded b p -> Fbounded b q -> p = q :>R -> Fulp p = Fulp q. (* Goal: forall (p q : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq R (Fulp p) (Fulp q) *) intros p q H' H'0 H'1; unfold Fulp in |- *. rewrite FcanonicUnique with (p := Fnormalize radix b precision p) (q := Fnormalize radix b precision q) (3 := pGivesBound); auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix (Fnormalize radix b precision q)) *) apply trans_eq with (FtoR radix p). (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) apply FnormalizeCorrect; auto. (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) apply trans_eq with (FtoR radix q); auto. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) apply sym_eq; apply FnormalizeCorrect; auto. Qed. Theorem FulpLe : forall p : float, Fbounded b p -> (Fulp p <= Float 1 (Fexp p))%R. intros p H'; unfold Fulp, FtoRradix, FtoR, Fnormalize in |- *; simpl in |- *; (* Goal: Rle (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x))))))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) rewrite Rmult_1_l. (* Goal: Rle (powerRZ (IZR radix) (Fexp (if Z_zerop (Fnum p) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p))) (powerRZ (IZR radix) (Fexp p)) *) case (Z_zerop (Fnum p)); simpl in |- *; auto. intros H'0; apply (Rle_powerRZ radix (- dExp b) (Fexp p)); auto with float real zarith. (* Goal: forall _ : not (@eq Z (Fnum p) Z0), Rle (powerRZ (IZR radix) (Z.sub (Fexp p) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (powerRZ (IZR radix) (Fexp p)) *) intros H'0; apply Rle_powerRZ; auto with real zarith arith. Qed. Theorem Fulp_zero : forall x : float, is_Fzero x -> Fulp x = powerRZ radix (- dExp b). intros x; unfold is_Fzero, Fulp, Fnormalize in |- *; case (Z_zerop (Fnum x)); (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: forall (_ : not (@eq Z (Fnum x) Z0)) (_ : @eq Z (Fnum x) Z0), @eq R (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x))))))) (powerRZ (IZR radix) (Z.opp (Z.of_N (dExp b)))) *) intros H' H'0; Contradict H'; auto. Qed. Theorem FulpLe2 : forall p : float, Fbounded b p -> Fnormal radix b (Fnormalize radix b precision p) -> (Fulp p <= Rabs p * powerRZ radix (Zsucc (- precision)))%R. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Fnormal radix b (Fnormalize radix b precision p)), Rle (Fulp p) (Rmult (Rabs (FtoRradix p)) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision))))) *) intros p H1 H2; unfold Fulp in |- *. replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)); [ idtac | unfold FtoRradix in |- *; apply FnormalizeCorrect; auto ]. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision p))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision))))) *) apply Rmult_le_reg_l with (powerRZ radix (Zpred precision)). (* Goal: Rlt (IZR Z0) (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) *) (* Goal: Rle (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision p)))) (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) apply powerRZ_lt; auto with real arith. replace (powerRZ radix (Zpred precision) * (Rabs (Fnormalize radix b precision p) * powerRZ radix (Zsucc (- precision))))%R with (Rabs (Fnormalize radix b precision p)). (* Goal: Rle (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (Rminus (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (Zpos xH))) (Fulp p)) *) unfold FtoRradix in |- *; rewrite <- Fabs_correct; auto with arith real. (* Goal: Rle (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision p)))) (FtoR radix (Fabs (Fnormalize radix b precision p))) *) (* Goal: @eq R (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) unfold Fabs, FtoR in |- *; simpl in |- *. apply Rmult_le_compat_r; [ apply powerRZ_le | rewrite <- inj_pred ]; auto with real arith zarith. (* Goal: Rle (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred precision))) (IZR (Z.abs (Fnum (Fnormalize radix b precision p)))) *) (* Goal: @eq R (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) rewrite <- Zpower_nat_Z_powerRZ. replace (Zpower_nat radix (pred precision)) with (nNormMin radix precision); auto; apply Rle_IZR. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum (Fnormalize radix b precision p))) *) (* Goal: @eq R (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) apply pNormal_absolu_min with b; auto with arith zarith real. apply trans_eq with (Rabs (Fnormalize radix b precision p) * (powerRZ radix (Zpred precision) * powerRZ radix (Zsucc (- precision))))%R; [ idtac | ring ]. (* Goal: @eq R (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) rewrite <- powerRZ_add; auto with zarith real. replace (Zpred precision + Zsucc (- precision))%Z with 0%Z; [ simpl in |- *; ring | unfold Zsucc, Zpred in |- *; ring ]; auto with real zarith. Qed. Theorem FulpGe : forall p : float, Fbounded b p -> (Rabs p <= (powerRZ radix precision - 1) * Fulp p)%R. (* Goal: forall (p : float) (_ : Fbounded b p), Rle (Rabs (FtoRradix p)) (Rmult (Rminus (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (Zpos xH))) (Fulp p)) *) intros p H. replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)); [ idtac | unfold FtoRradix in |- *; apply FnormalizeCorrect; auto ]. (* Goal: Rle (Rabs (FtoRradix (Fnormalize radix b precision p))) (Rmult (Rminus (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (Zpos xH))) (Fulp p)) *) unfold FtoRradix in |- *; rewrite <- Fabs_correct; auto with arith real. (* Goal: Rle (FtoR radix (Fabs (Fnormalize radix b precision p))) (Rmult (Rminus (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (Zpos xH))) (Fulp p)) *) unfold FtoR in |- *; simpl in |- *; unfold Fulp in |- *. apply Rmult_le_compat_r; [ apply powerRZ_le | idtac ]; auto with real arith zarith. apply Rle_trans with (IZR (Zpred (Zpos (vNum b)))); [ apply Rle_IZR; auto with float zarith | idtac ]. unfold Zpred in |- *; right; rewrite pGivesBound; replace 1%R with (IZR 1); auto with real. (* Goal: @eq R (IZR (Z.add (Zpower_nat radix precision) (Zneg xH))) (Rminus (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (Zpos xH))) *) rewrite <- Zpower_nat_Z_powerRZ; rewrite Z_R_minus;auto. Qed. Theorem LeFulpPos : forall x y : float, Fbounded b x -> Fbounded b y -> (0 <= x)%R -> (x <= y)%R -> (Fulp x <= Fulp y)%R. (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (IZR Z0) (FtoRradix x)) (_ : Rle (FtoRradix x) (FtoRradix y)), Rle (Fulp x) (Fulp y) *) intros x y Hx Hy H1 H2; unfold Fulp in |- *. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Fexp p)) *) apply Rle_powerRZ; auto with real zarith. (* Goal: Z.le (Fexp (Fnormalize radix b precision x)) (Fexp (Fnormalize radix b precision y)) *) apply Fcanonic_Rle_Zle with radix b precision; auto with zarith arith. (* Goal: Fcanonic radix b (Fnormalize radix b precision y) *) (* Goal: Rle (Rabs (FtoR radix (Fnormalize radix b precision x))) (Rabs (FtoR radix (Fnormalize radix b precision y))) *) apply FnormalizeCanonic; auto with zarith arith. (* Goal: Fcanonic radix b (Fnormalize radix b precision y) *) (* Goal: Rle (Rabs (FtoR radix (Fnormalize radix b precision x))) (Rabs (FtoR radix (Fnormalize radix b precision y))) *) apply FnormalizeCanonic; auto with zarith arith. (* Goal: Rle (Rabs (FtoR radix (Fnormalize radix b precision x))) (Rabs (FtoR radix (Fnormalize radix b precision y))) *) repeat rewrite FnormalizeCorrect; auto with zarith arith real. (* Goal: Rle (Rabs (FtoR radix x)) (Rabs (FtoR radix y)) *) repeat rewrite Rabs_right; auto with zarith arith real. (* Goal: Rge (FtoR radix y) (IZR Z0) *) apply Rge_trans with (FtoRradix x); auto with real. Qed. Theorem FulpSucCan : forall p : float, Fcanonic radix b p -> (FSucc b radix precision p - p <= Fulp p)%R. (* Goal: forall (p : float) (_ : Fbounded b p), Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) intros p H'. replace (Fulp p) with (powerRZ radix (Fexp p)). 2: unfold Fulp in |- *; replace (Fnormalize radix b precision p) with p; auto; apply sym_equal; apply FcanonicUnique with (3 := pGivesBound); auto with arith; apply FnormalizeCanonic || apply FnormalizeCorrect; auto with float zarith. 2: apply FcanonicBound with (1 := H'); auto with float zarith. unfold FtoRradix in |- *; rewrite <- Fminus_correct; auto with zarith. case (Z_eq_dec (Fnum p) (- nNormMin radix precision)); intros H1'. case (Z_eq_dec (Fexp p) (- dExp b)); intros H2'. rewrite FSuccDiff2; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real. rewrite FSuccDiff3; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l. apply Rlt_le; apply Rlt_powerRZ; auto with real zarith. unfold Zpred in |- *; auto with zarith. rewrite FSuccDiff1; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real. Qed. Theorem FulpSuc : forall p : float, Fbounded b p -> (FNSucc b radix precision p - p <= Fulp p)%R. (* Goal: forall (p : float) (_ : Fbounded b p), Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) intros p H'. (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) replace (Fulp p) with (Fulp (Fnormalize radix b precision p)). (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp (Fnormalize radix b precision p)) *) (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)). (* Goal: Rle (Rminus (FtoRradix (FNSucc b radix precision p)) (FtoRradix (Fnormalize radix b precision p))) (Fulp (Fnormalize radix b precision p)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision p)) (FtoRradix p) *) (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) unfold FNSucc in |- *; apply FulpSucCan; auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) apply FulpComp; auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. Qed. Theorem FulpPredCan : forall p : float, Fcanonic radix b p -> (p - FPred b radix precision p <= Fulp p)%R. (* Goal: forall (p : float) (_ : Fbounded b p), Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) intros p H'. replace (Fulp p) with (powerRZ radix (Fexp p)). 2: unfold Fulp in |- *; replace (Fnormalize radix b precision p) with p; auto; apply sym_equal; apply FcanonicUnique with (3 := pGivesBound); auto with arith; apply FnormalizeCanonic || apply FnormalizeCorrect; auto with arith. unfold FtoRradix in |- *; rewrite <- Fminus_correct; auto with arith. case (Z_eq_dec (Fnum p) (nNormMin radix precision)); intros H1'. case (Z_eq_dec (Fexp p) (- dExp b)); intros H2'. rewrite FPredDiff2; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real. rewrite FPredDiff3; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real. apply Rlt_le; apply Rlt_powerRZ; auto with real zarith. (* Goal: Rle (IZR (Zpos xH)) (IZR radix) *) (* Goal: Z.le (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))))) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)) *) replace 1%R with (INR 1); auto with real arith. unfold Zpred in |- *; auto with zarith. rewrite FPredDiff1; auto with arith. unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real. apply FcanonicBound with (1 := H'). Qed. Theorem FulpPred : forall p : float, Fbounded b p -> (p - FNPred b radix precision p <= Fulp p)%R. (* Goal: forall (p : float) (_ : Fbounded b p), Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) intros p H'. (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp p) *) replace (Fulp p) with (Fulp (Fnormalize radix b precision p)). (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix (FNPred b radix precision p))) (Fulp (Fnormalize radix b precision p)) *) (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)). (* Goal: Rle (Rminus (FtoRradix (Fnormalize radix b precision p)) (FtoRradix (FNPred b radix precision p))) (Fulp (Fnormalize radix b precision p)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision p)) (FtoRradix p) *) (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) unfold FNPred in |- *; apply FulpPredCan; auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. (* Goal: @eq R (Fulp (Fnormalize radix b precision p)) (Fulp p) *) apply FulpComp; auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. Qed. Theorem FSuccDiffPos : forall x : float, (0 <= x)%R -> Fminus radix (FSucc b radix precision x) x = Float 1%nat (Fexp x) :>R. (* Goal: forall (x : float) (_ : Rle (IZR Z0) (FtoRradix x)), @eq R (FtoRradix (Fminus radix (FSucc b radix precision x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) intros x H. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) unfold FtoRradix in |- *; apply FSuccDiff1; auto with arith. (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) Contradict H; unfold FtoRradix, FtoR in |- *; simpl in |- *; rewrite H. (* Goal: not (Rle (IZR Z0) (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Fexp x)))) *) apply Rlt_not_le. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Fexp x))) (IZR Z0) *) replace 0%R with (0 * powerRZ radix (Fexp x))%R; [ idtac | ring ]. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR Z0) (powerRZ (IZR radix) (Fexp x))) *) apply Rlt_monotony_exp; auto with real arith. generalize (nNormPos _ radixMoreThanOne precision); replace 0%R with (IZR (- 0%nat)); auto with real zarith arith. Qed. Theorem FulpFPredGePos : forall f : float, Fbounded b f -> Fcanonic radix b f -> (0 < f)%R -> (Fulp (FPred b radix precision f) <= Fulp f)%R. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Fcanonic radix b f) (_ : Rlt (IZR Z0) (FtoRradix f)), Rle (Fulp (FPred b radix precision f)) (Fulp f) *) intros f Hf1 Hf2 H. (* Goal: Rle (Fulp (FPred b radix precision f)) (Fulp f) *) apply LeFulpPos; auto with zarith float; unfold FtoRradix in |- *. (* Goal: Rle (IZR Z0) (FtoR radix (FPred b radix precision f)) *) (* Goal: Rle (FtoR radix (FPred b radix precision f)) (FtoR radix f) *) apply R0RltRlePred; auto with arith. (* Goal: Rle (FtoR radix (FPred b radix precision f)) (FtoR radix f) *) apply Rlt_le; apply FPredLt; auto with arith. Qed. Theorem CanonicFulp : forall p : float, Fcanonic radix b p -> Fulp p = Float 1%nat (Fexp p). intros p H; unfold Fulp in |- *. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision x)) x)) (Fulp x) *) rewrite FcanonicFnormalizeEq; auto with arith. (* Goal: @eq R (powerRZ (IZR radix) e) (FtoRradix (Float (Z.of_nat (S O)) e)) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. Qed. Theorem FSuccUlpPos : forall x : float, Fcanonic radix b x -> (0 <= x)%R -> Fminus radix (FSucc b radix precision x) x = Fulp x :>R. (* Goal: forall (x : float) (_ : Fcanonic radix b x) (_ : Rle (IZR Z0) (FtoRradix x)), @eq R (FtoRradix (Fminus radix (FSucc b radix precision x) x)) (Fulp x) *) intros x H H0; rewrite CanonicFulp; auto. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) apply FSuccDiffPos; auto. Qed. Theorem FNSuccUlpPos : forall x : float, Fcanonic radix b x -> (0 <= x)%R -> Fminus radix (FNSucc b radix precision x) x = Fulp x :>R. (* Goal: forall (x : float) (_ : Fcanonic radix b x) (_ : Rle (IZR Z0) (FtoRradix x)), @eq R (FtoRradix (Fminus radix (FNSucc b radix precision x) x)) (Fulp x) *) intros x H H0. (* Goal: @eq R (FtoRradix (Fminus radix (FNSucc b radix precision x) x)) (Fulp x) *) unfold FNSucc in |- *. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision x)) x)) (Fulp x) *) rewrite FcanonicFnormalizeEq; auto with arith. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision x) x)) (Fulp x) *) apply FSuccUlpPos; auto. Qed. Theorem FulpFabs : forall f : float, Fulp f = Fulp (Fabs f) :>R. (* Goal: forall f : float, @eq R (Fulp f) (Fulp (Fabs f)) *) intros f; unfold Fulp in |- *; case (Rle_or_lt 0 f); intros H'. replace (Fabs f) with f; auto; unfold Fabs in |- *; apply floatEq; simpl in |- *; auto with zarith real. (* Goal: @eq Z (Fnum f) (Z.abs (Fnum f)) *) (* Goal: @eq R (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision f))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision (Fabs f)))) *) apply sym_eq; apply Zabs_eq; apply LeR0Fnum with radix; auto with zarith real. replace (Fabs f) with (Fopp f); [ rewrite Fnormalize_Fopp | apply floatEq; simpl in |- * ]; auto with arith. apply sym_eq; apply Zabs_eq_opp; apply R0LeFnum with radix; auto with zarith real. Qed. Theorem RoundedModeUlp : forall P, RoundedModeP b radix P -> forall (p : R) (q : float), P p q -> (Rabs (p - q) < Fulp q)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p : R) (q : float) (_ : P p q), Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) intros P H' p q H'0. (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) case (Req_dec p q); intros Eq1. (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) rewrite <- Eq1. (* Goal: Rlt (Rabs (Rminus p p)) (Fulp q) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) replace (p - p)%R with 0%R; [ idtac | ring ]. (* Goal: Rlt (Rabs (IZR Z0)) (Fulp q) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) rewrite Rabs_R0; auto. (* Goal: Rlt (IZR Z0) (Fulp q) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) unfold Fulp, FtoRradix, FtoR in |- *; simpl in |- *; auto with real arith. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'1 H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; case H'5 with (1 := H'0); clear H'5 H'4 H'2; intros H'5. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Rabs_right; auto. (* Goal: Rlt (Rminus (FtoRradix q) p) (Fulp q) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) cut (Fbounded b q); [ intros B0 | case H'5; auto ]. (* Goal: Rlt (Rminus p (FtoRradix q)) (Fulp q) *) (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) apply Rlt_le_trans with (2 := FulpSuc q B0). (* Goal: Rlt (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q)))) (Ropp (Rminus (FtoRradix q) p)) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply Rplus_lt_reg_l with (r := FtoR radix q). (* Goal: Rle (Rplus (FtoR radix q) (Rminus p (FtoRradix q))) (Rplus (FtoR radix q) (IZR Z0)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rlt p (FtoRradix (FNSucc b radix precision q)) *) (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) case (Rle_or_lt (FNSucc b radix precision q) p); auto. (* Goal: forall _ : Rle (FtoRradix (FNSucc b radix precision q)) p, Rlt p (FtoRradix (FNSucc b radix precision q)) *) (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) intros H'2; absurd (FNSucc b radix precision q <= q)%R; auto. apply Rgt_not_le; red in |- *; unfold FtoRradix in |- *; auto with real float arith. (* Goal: Rle (FtoRradix q) (FtoRradix (FNPred b radix precision q)) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) case H'5; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (Rle p (FtoR radix q)) (forall (f : float) (_ : Fbounded b f) (_ : Rle p (FtoR radix f)), Rle (FtoR radix q) (FtoR radix f))), Rle (FtoRradix q) (FtoRradix (FNPred b radix precision q)) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) intros H'4 H'7; elim H'7; intros H'8 H'9; apply H'9; clear H'7; auto. (* Goal: Fbounded b (FNPred b radix precision q) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply (FcanonicBound radix b); auto with float arith. (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix q). (* Goal: Rle (Rplus (FtoR radix q) (Rminus p (FtoRradix q))) (Rplus (FtoR radix q) (IZR Z0)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rplus (FtoR radix q) (IZR Z0)) p *) (* Goal: Rlt (Rabs (Rminus p (FtoRradix q))) (Fulp q) *) rewrite Rplus_0_r; apply isMin_inv1 with (1 := H'5); auto. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Faux.Rabsolu_left1; auto. (* Goal: Rlt (Ropp (Rminus p (FtoRradix q))) (Fulp q) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) rewrite Ropp_minus_distr; auto. (* Goal: Rlt (Rminus (FtoRradix q) p) (Fulp q) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) cut (Fbounded b q); [ intros B0 | case H'5; auto ]. (* Goal: Rlt (Rminus (FtoRradix q) p) (Fulp q) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply Rlt_le_trans with (2 := FulpPred q B0). (* Goal: Rlt (Rminus (FtoRradix q) p) (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply Ropp_lt_cancel; repeat rewrite Rminus_0_l. (* Goal: Rlt (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q)))) (Ropp (Rminus (FtoRradix q) p)) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply Rplus_lt_reg_l with (r := FtoR radix q). (* Goal: Rle (Rplus (FtoR radix q) (Rminus p (FtoRradix q))) (Rplus (FtoR radix q) (IZR Z0)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) case (Rle_or_lt p (FNPred b radix precision q)); auto. (* Goal: forall _ : Rle p (FtoRradix (FNPred b radix precision q)), Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) intros H'2; absurd (q <= FNPred b radix precision q)%R; auto. apply Rgt_not_le; red in |- *; unfold FtoRradix in |- *; auto with real float arith. (* Goal: Rle (FtoRradix q) (FtoRradix (FNPred b radix precision q)) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) case H'5; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (Rle p (FtoR radix q)) (forall (f : float) (_ : Fbounded b f) (_ : Rle p (FtoR radix f)), Rle (FtoR radix q) (FtoR radix f))), Rle (FtoRradix q) (FtoRradix (FNPred b radix precision q)) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) intros H'4 H'7; elim H'7; intros H'8 H'9; apply H'9; clear H'7; auto. (* Goal: Fbounded b (FNPred b radix precision q) *) (* Goal: forall _ : Rlt (FtoRradix (FNPred b radix precision q)) p, Rlt (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))))) (Rplus (FtoR radix q) (Ropp (Rminus (FtoRradix q) p))) *) (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply (FcanonicBound radix b); auto with float arith. intros H1; apply Rplus_lt_compat_l; auto with real; apply Ropp_lt_contravar; unfold Rminus in |- *; auto with real. (* Goal: Rle (Rminus p (FtoRradix q)) (IZR Z0) *) apply Rplus_le_reg_l with (r := FtoR radix q). (* Goal: Rle (Rplus (FtoR radix q) (Rminus p (FtoRradix q))) (Rplus (FtoR radix q) (IZR Z0)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle p (Rplus (FtoR radix q) (IZR Z0)) *) rewrite Rplus_0_r; apply isMax_inv1 with (1 := H'5). Qed. Theorem RoundedModeErrorExpStrict : forall P, RoundedModeP b radix P -> forall (p q : float) (x : R), Fbounded b p -> Fbounded b q -> P x p -> q = (x - p)%R :>R -> q <> 0%R :>R -> (Fexp q < Fexp p)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q : float) (x : R) (_ : Fbounded b p) (_ : Fbounded b q) (_ : P x p) (_ : @eq R (FtoRradix q) (Rminus x (FtoRradix p))) (_ : not (@eq R (FtoRradix q) (IZR Z0))), Z.lt (Fexp q) (Fexp p) *) intros P H p q x H0 H1 H2 H3 H4. (* Goal: Z.lt (Fexp q) (Fexp p) *) apply Zlt_powerRZ with (e := IZR radix); auto with real zarith. (* Goal: Rlt (powerRZ (IZR radix) (Fexp q)) (powerRZ (IZR radix) (Fexp p)) *) apply Rle_lt_trans with (FtoRradix (Fabs q)). replace (powerRZ radix (Fexp q)) with (FtoRradix (Float 1%nat (Fexp q))); unfold FtoRradix in |- *; [ apply Fop.RleFexpFabs; auto with arith | unfold FtoR in |- *; simpl in |- *; ring ]. (* Goal: Rlt (FtoRradix (Fabs q)) (powerRZ (IZR radix) (Fexp p)) *) rewrite (Fabs_correct radix); auto with zarith. (* Goal: Rlt (Rabs (FtoR radix q)) (powerRZ (IZR radix) (Fexp p)) *) fold FtoRradix in |- *; rewrite H3. apply Rlt_le_trans with (Fulp p); [ apply RoundedModeUlp with P; auto | unfold Fulp in |- * ]. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision p))) (powerRZ (IZR radix) (Fexp p)) *) apply Rle_powerRZ; auto with real zarith. (* Goal: Z.le (Fexp (Fnormalize radix b precision p)) (Fexp p) *) apply FcanonicLeastExp with radix b precision; auto with real arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision p)) (FtoR radix p) *) (* Goal: @eq R (FtoR radix p) (FtoR radix (Fnormalize radix b precision q)) *) apply sym_eq; apply FnormalizeCorrect; auto. (* Goal: Fcanonic radix b (Fnormalize radix b precision p) *) apply FnormalizeCanonic; auto with zarith. Qed. Theorem RoundedModeProjectorIdem : forall P (p : float), RoundedModeP b radix P -> Fbounded b p -> P p p. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (_ : RoundedModeP b radix P) (_ : Fbounded b p), P (FtoRradix p) p *) intros P p H' H. elim H'; intros H'0 H'1; elim H'1; intros H'2 H'3; elim H'3; intros H'4 H'5; clear H'3 H'1. (* Goal: P (FtoRradix p) p *) case (H'0 p). (* Goal: forall (x : float) (_ : P (FtoRradix p) x), P (FtoRradix p) p *) intros x H'6. (* Goal: P (FtoRradix p) p *) apply (H'2 p p x); auto. (* Goal: @eq R (FtoR radix x) (FtoR radix p) *) apply sym_eq; apply (RoundedProjector _ _ P H'); auto. Qed. Theorem RoundedModeBounded : forall P (r : R) (q : float), RoundedModeP b radix P -> P r q -> Fbounded b q. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (r : R) (q : float) (_ : RoundedModeP b radix P) (_ : P r q), Fbounded b q *) intros P r q H' H'0. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'1 H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; case H'5 with (1 := H'0); clear H'4 H'2; intros H; (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x) *) (* Goal: Z.le (Fexp x) (LSB radix x) *) (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix x))) *) case H; auto. Qed. Theorem RoundedModeProjectorIdemEq : forall (P : R -> float -> Prop) (p q : float), RoundedModeP b radix P -> Fbounded b p -> P (FtoR radix p) q -> p = q :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p q : float) (_ : RoundedModeP b radix P) (_ : Fbounded b p) (_ : P (FtoR radix p) q), @eq R (FtoRradix p) (FtoRradix q) *) intros P p q H' H'0 H'1. cut (MinOrMaxP b radix P); [ intros Mn; case (Mn p q); auto; intros Mn1 | auto with inv ]. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply sym_eq; apply MinEq with (1 := Mn1); auto. (* Goal: isMin b radix (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply (RoundedModeProjectorIdem (isMin b radix)); auto. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply MinRoundedModeP with (precision := precision); auto. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply sym_eq; apply MaxEq with (1 := Mn1); auto. (* Goal: isMax b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply (RoundedModeProjectorIdem (isMax b radix)); auto. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply MaxRoundedModeP with (precision := precision); auto. Qed. Theorem RoundedModeMult : forall P, RoundedModeP b radix P -> forall (r : R) (q q' : float), P r q -> Fbounded b q' -> (r <= radix * q')%R -> (q <= radix * q')%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (r : R) (q q' : float) (_ : P r q) (_ : Fbounded b q') (_ : Rle (Rmult (IZR radix) (FtoRradix q')) r), Rle (Rmult (IZR radix) (FtoRradix q')) (FtoRradix q) *) intros P H' r q q' H'0 H'1. (* Goal: forall _ : Rle (Rmult (IZR radix) (FtoRradix q')) r, Rle (Rmult (IZR radix) (FtoRradix q')) (FtoRradix q) *) replace (radix * q')%R with (FtoRradix (Float (Fnum q') (Fexp q' + 1%nat))). (* Goal: forall _ : Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'2; case H'2. intros H'3; case H'; intros H'4 H'5; elim H'5; intros H'6 H'7; elim H'7; intros H'8 H'9; apply H'9 with (1 := H'3); clear H'7 H'5; auto. (* Goal: P (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdem; auto. (* Goal: Fbounded b (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O)))) *) (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply FBoundedScale; auto. (* Goal: forall _ : @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'3. replace (FtoRradix q) with (FtoRradix (Float (Fnum q') (Fexp q' + 1%nat))); auto with real. (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply (RoundedProjector _ _ P H'); auto. (* Goal: Fbounded b (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O)))) *) (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply FBoundedScale; auto. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. (* Goal: forall (_ : TotalP P) (_ : and (CompatibleP b radix P) (and (MinOrMaxP b radix P) (MonotoneP radix P))), @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'4 H'5; elim H'5; intros H'6 H'7; clear H'5. (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply (H'6 r (Float (Fnum q') (Fexp q' + 1%nat)) q); auto. (* Goal: Fbounded b q *) apply RoundedModeBounded with (P := P) (r := r); auto. (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) rewrite (FvalScale _ radixMoreThanOne b). (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.of_nat (S O))) (FtoR radix q')) (Rmult (IZR radix) (FtoR radix q')) *) rewrite powerRZ_1; auto. Qed. Theorem RoundedModeMultLess : forall P, RoundedModeP b radix P -> forall (r : R) (q q' : float), P r q -> Fbounded b q' -> (radix * q' <= r)%R -> (radix * q' <= q)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (r : R) (q q' : float) (_ : P r q) (_ : Fbounded b q') (_ : Rle (Rmult (IZR radix) (FtoRradix q')) r), Rle (Rmult (IZR radix) (FtoRradix q')) (FtoRradix q) *) intros P H' r q q' H'0 H'1. (* Goal: forall _ : Rle (Rmult (IZR radix) (FtoRradix q')) r, Rle (Rmult (IZR radix) (FtoRradix q')) (FtoRradix q) *) replace (radix * q')%R with (FtoRradix (Float (Fnum q') (Fexp q' + 1%nat))). (* Goal: forall _ : Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'2; case H'2. intros H'3; case H'; intros H'4 H'5; elim H'5; intros H'6 H'7; elim H'7; intros H'8 H'9; apply H'9 with (1 := H'3); clear H'7 H'5; auto. (* Goal: P (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdem; auto. (* Goal: Fbounded b (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O)))) *) (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply FBoundedScale; auto. (* Goal: forall _ : @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'3. replace (FtoRradix q) with (FtoRradix (Float (Fnum q') (Fexp q' + 1%nat))); auto with real. (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply (RoundedProjector _ _ P H'); auto. (* Goal: Fbounded b (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O)))) *) (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) apply FBoundedScale; auto. (* Goal: P (FtoR radix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) q *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) unfold FtoRradix in H'3; rewrite H'3; auto. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. (* Goal: forall (_ : TotalP P) (_ : and (CompatibleP b radix P) (and (MinOrMaxP b radix P) (MonotoneP radix P))), @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros H'4 H'5; elim H'5; intros H'6 H'7; clear H'5. (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) unfold FtoRradix in |- *; rewrite FvalScale; auto. (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.of_nat (S O))) (FtoR radix q')) (Rmult (IZR radix) (FtoR radix q')) *) rewrite powerRZ_1; auto. Qed. Theorem RleMinR0 : forall (r : R) (min : float), (0 <= r)%R -> isMin b radix r min -> (0 <= min)%R. (* Goal: forall (r : R) (min : float) (_ : Rle (IZR Z0) r) (_ : isMin b radix r min), Rle (IZR Z0) (FtoRradix min) *) intros r min H' H'0. (* Goal: Rle (FtoRradix max) (IZR Z0) *) rewrite <- (FzeroisZero radix b). (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) case H'; intros H'1. apply (MonotoneMin b radix) with (p := FtoRradix (Fzero (- dExp b))) (q := r); auto. (* Goal: Rlt (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) r *) (* Goal: isMin b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) unfold FtoRradix in |- *; rewrite (FzeroisZero radix b); auto. (* Goal: isMin b radix (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply (RoundedModeProjectorIdem (isMin b radix)); auto. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) apply MinRoundedModeP with (precision := precision); auto with float. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: isMax b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) max *) apply FboundedFzero; auto. (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) replace (FtoR radix (Fzero (- dExp b))) with (FtoRradix min); auto with real. (* Goal: @eq R (FtoRradix min) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply sym_eq; apply (ProjectMin b radix). (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: isMax b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) max *) apply FboundedFzero; auto. (* Goal: isMin b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) min *) rewrite <- H'1 in H'0; rewrite <- (FzeroisZero radix b) in H'0; auto. Qed. Theorem RleRoundedR0 : forall (P : R -> float -> Prop) (p : float) (r : R), RoundedModeP b radix P -> P r p -> (0 <= r)%R -> (0 <= p)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (r : R) (_ : RoundedModeP b radix P) (_ : P r p) (_ : Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r), Rle (FtoRradix p) (Rmult (IZR radix) r) *) intros P p r H' H'0 H'1. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'2 H'3; Elimc H'3; intros H'3 H'4; Elimc H'4; intros H'4 H'5; case (H'4 r p); auto; intros H'6. (* Goal: Rle (IZR Z0) (FtoRradix p) *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply RleMinR0 with (r := r); auto. (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply Rle_trans with r; auto; apply isMax_inv1 with (1 := H'6). Qed. Theorem RleMaxR0 : forall (r : R) (max : float), (r <= 0)%R -> isMax b radix r max -> (max <= 0)%R. (* Goal: forall (r : R) (max : float) (_ : Rle r (IZR Z0)) (_ : isMax b radix r max), Rle (FtoRradix max) (IZR Z0) *) intros r max H' H'0. (* Goal: Rle (FtoRradix max) (IZR Z0) *) rewrite <- (FzeroisZero radix b). (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) case H'; intros H'1. apply (MonotoneMax b radix) with (q := FtoRradix (Fzero (- dExp b))) (p := r); auto. (* Goal: Rlt r (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) *) (* Goal: isMax b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) unfold FtoRradix in |- *; rewrite FzeroisZero; auto. (* Goal: isMax b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply (RoundedModeProjectorIdem (isMax b radix)); auto. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply MaxRoundedModeP with (precision := precision); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: isMax b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) max *) apply FboundedFzero; auto. (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) replace (FtoR radix (Fzero (- dExp b))) with (FtoRradix max); auto with real. (* Goal: @eq R (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply sym_eq; apply (ProjectMax b radix). (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: isMax b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) max *) apply FboundedFzero; auto. (* Goal: isMax b radix (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) max *) rewrite H'1 in H'0; rewrite <- (FzeroisZero radix b) in H'0; auto. Qed. Theorem RleRoundedLessR0 : forall (P : R -> float -> Prop) (p : float) (r : R), RoundedModeP b radix P -> P r p -> (r <= 0)%R -> (p <= 0)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (r : R) (_ : RoundedModeP b radix P) (_ : P r p) (_ : Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r), Rle (FtoRradix p) (Rmult (IZR radix) r) *) intros P p r H' H'0 H'1. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'2 H'3; Elimc H'3; intros H'3 H'4; Elimc H'4; intros H'4 H'5; case (H'4 r p); auto; intros H'6. (* Goal: Rle (FtoRradix p) (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) apply Rle_trans with r; auto; apply isMin_inv1 with (1 := H'6). (* Goal: Rle (FtoRradix p) (IZR Z0) *) apply RleMaxR0 with (r := r); auto. Qed. Theorem PminPos : forall p min : float, (0 <= p)%R -> Fbounded b p -> isMin b radix (/ 2%nat * p) min -> exists c : float, Fbounded b c /\ c = (p - min)%R :>R. (* Goal: forall (p min : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fbounded b p) (_ : isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) min), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) intros p min H' H'0 H'1. cut (min <= / 2%nat * p)%R; [ intros Rl1; Casec Rl1; intros Rl1 | apply isMin_inv1 with (1 := H'1); auto ]. (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) case (eqExpMax _ radixMoreThanOne b min p); auto. (* Goal: Fbounded b max *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix max)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) case H'1; auto. (* Goal: Rle (FtoR radix (Fabs min)) (FtoR radix p) *) (* Goal: forall (x : float) (_ : and (Fbounded b x) (and (@eq R (FtoR radix x) (FtoR radix min)) (Z.le (Fexp x) (Fexp p)))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Fabs_correct; auto with arith. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Rabs_right; auto. (* Goal: Rle (FtoR radix min) (FtoR radix p) *) (* Goal: Rge (FtoR radix min) (IZR Z0) *) (* Goal: forall (x : float) (_ : and (Fbounded b x) (and (@eq R (FtoR radix x) (FtoR radix min)) (Z.le (Fexp x) (Fexp p)))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Rle_trans with (/ 2%nat * p)%R; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_ne_r; auto with real. (* Goal: Rge (FtoR radix min) (IZR Z0) *) (* Goal: forall (x : float) (_ : and (Fbounded b x) (and (@eq R (FtoR radix x) (FtoR radix min)) (Z.le (Fexp x) (Fexp p)))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Rle_ge; apply RleMinR0 with (r := (/ 2%nat * p)%R); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_1_l; rewrite Rmult_0_r; auto with real. intros min' H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; clear H'4 H'2. case (FboundNext _ radixMoreThanOne b precision) with (p := min'); auto with arith; fold FtoRradix in |- *. (* Goal: forall (x : float) (_ : and (Fbounded b x) (@eq R (FtoRradix x) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min'))))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) intros Smin H'2; elim H'2; intros H'4 H'7; clear H'2. (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) exists Smin; split; auto. (* Goal: @eq R (FtoRradix Smin) (Rminus (FtoRradix p) (FtoRradix min)) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite H'7; auto. (* Goal: @eq R (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min'))) (Rminus (FtoRradix p) (FtoRradix min)) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) unfold FtoRradix in |- *. (* Goal: @eq R (FtoR radix (Float (Z.succ (Fnum min')) (Fexp min'))) (Rminus (FtoR radix p) (FtoR radix min)) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite <- H'5; auto. replace (Float (Zsucc (Fnum min')) (Fexp min')) with (Float (Fnum (Fshift radix (Zabs_nat (Fexp p - Fexp min')) p) - Fnum min') (Fexp min')); auto. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min'))) (powerRZ (IZR radix) (Fexp min'))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite <- Z_R_minus. rewrite (fun x y z : R => Rmult_comm (x - y) z); rewrite Rmult_minus_distr_l; repeat rewrite (fun x : Z => Rmult_comm (powerRZ radix x)). (* Goal: @eq R (Rminus (Rmult (IZR (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min')))))) (powerRZ (IZR radix) (Fexp min'))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Rmult_IZR. (* Goal: @eq R (Rminus (Rmult (Rmult (IZR (Fnum p)) (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min')))))) (powerRZ (IZR radix) (Fexp min'))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Zpower_nat_powerRZ_absolu; auto with zarith. (* Goal: @eq R (Rminus (Rmult (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Z.sub (Fexp p) (Fexp min')))) (powerRZ (IZR radix) (Fexp min'))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Rmult_assoc. (* Goal: @eq R (Rminus (Rmult (IZR (Fnum p)) (Rmult (powerRZ (IZR radix) (Z.sub (Fexp p) (Fexp min'))) (powerRZ (IZR radix) (Fexp min')))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite <- (powerRZ_add radix); auto with real zarith. (* Goal: @eq R (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Z.add (Z.sub (Fexp p) (Fexp min')) (Fexp min')))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) (Rminus (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum min')) (powerRZ (IZR radix) (Fexp min')))) *) (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Fexp p - Fexp min' + Fexp min')%Z with (Fexp p); [ auto | ring ]. (* Goal: @eq float (Float (Z.sub (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) (Fnum min')) (Fexp min')) (Float (Z.succ (Fnum min')) (Fexp min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply floatEq; auto; simpl in |- *. (* Goal: @eq Z (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) (Z.succ (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_antisym. (* Goal: Z.le (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) (Z.succ (Fnum min')) *) (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zlt_succ_le. (* Goal: Z.lt (Fnum min') (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zplus_lt_reg_l with (p := Fnum min'); auto. cut (forall x y : Z, (x + (y - x))%Z = y); [ intros tmp; rewrite tmp; clear tmp | intros; ring ]. replace (Fnum min' + Zsucc (Zsucc (Fnum min')))%Z with (2%nat * Zsucc (Fnum min'))%Z. apply (Rlt_Float_Zlt radix) with (r := Fexp min'); auto; fold FtoRradix in |- *. replace (FtoRradix (Float (2%nat * Zsucc (Fnum min')) (Fexp min'))) with (2%nat * Float (Zsucc (Fnum min')) (Fexp min'))%R. (* Goal: Rlt (FtoRradix (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min'))) (Rmult (INR (S (S O))) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min')))) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Z.add (Fnum min') (Z.succ (Z.succ (Fnum min')))) *) (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite <- H'7. replace (Float (Fnum p * Zpower_nat radix (Zabs_nat (Fexp p - Fexp min'))) (Fexp min')) with (Fshift radix (Zabs_nat (Fexp p - Fexp min')) p). (* Goal: Rlt (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. (* Goal: Rlt (Rmult (INR (S (S O))) (FtoR radix (Float (Fnum min') (Fexp min')))) (FtoR radix p) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Rmult_lt_reg_l with (r := (/ 2%nat)%R); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real; rewrite Rmult_1_l; auto with real. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoR radix Smin) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Z.add (Fnum min') (Z.succ (Z.succ (Fnum min')))) *) (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) case (Rle_or_lt Smin (/ 2%nat * FtoR radix p)); auto. (* Goal: forall _ : Rle (FtoRradix Smin) (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)), Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoR radix Smin) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Z.add (Fnum min') (Z.succ (Z.succ (Fnum min')))) *) (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) intros H'2; absurd (min < Smin)%R. (* Goal: not (Rlt (FtoRradix min) (FtoR radix f)) *) (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) apply Rle_not_lt. (* Goal: Fbounded b max *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix max)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) case H'1; auto. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoRradix Smin) (FtoRradix min) *) (* Goal: Rlt (FtoRradix min) (FtoRradix Smin) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Z.succ (Fnum min')) (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Z.succ (Fnum min'))) (Z.add (Fnum min') (Z.succ (Z.succ (Fnum min')))) *) (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) intros H'8 H'9; elim H'9; intros H'10 H'11; apply H'11; clear H'9; auto. (* Goal: @eq R (FtoR radix (Float (Z.succ (Fnum min')) (Fexp min'))) (Rminus (FtoR radix p) (FtoR radix min)) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite H'7; unfold FtoRradix in |- *; rewrite <- H'5; auto. unfold FtoR in |- *; simpl in |- *; apply Rlt_monotony_exp; auto with real zarith. (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq float (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp min')))))) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Fexp p - Zabs_nat (Fexp p - Fexp min'))%Z with (Fexp min'); auto. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite inj_abs; auto. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) ring. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. replace (FtoRradix (Float (2%nat * Zsucc (Fnum min')) (Fexp min'))) with ((2%nat * Zsucc (Fnum min'))%Z * powerRZ radix (Fexp min'))%R. (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (Rmult (IZR (Z.mul (Z.of_nat (S (S O))) (Fnum min'))) (powerRZ (IZR radix) (Fexp min'))) *) (* Goal: @eq R (Rmult (IZR (Z.mul (Z.of_nat (S (S O))) (Fnum min'))) (powerRZ (IZR radix) (Fexp min'))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Rmult_IZR; auto. (* Goal: @eq R (powerRZ (IZR radix) e) (FtoRradix (Float (Z.of_nat (S O)) e)) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Z_of_nat 2) with (Zsucc (Zsucc 0)). (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) repeat rewrite <- Zmult_succ_l_reverse; unfold Zsucc in |- *; ring. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: Z.le (Z.succ (Fnum min')) (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zlt_le_succ; auto. (* Goal: Z.lt (Fnum min') (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zplus_lt_reg_l with (p := Fnum min'); auto. cut (forall x y : Z, (x + (y - x))%Z = y); [ intros tmp; rewrite tmp; clear tmp | intros; ring ]. (* Goal: Z.lt (Z.add (Fnum min') (Fnum min')) (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Fnum min' + Fnum min')%Z with (2%nat * Fnum min')%Z. apply (Rlt_Float_Zlt radix) with (r := Fexp min'); auto; fold FtoRradix in |- *. replace (FtoRradix (Float (2%nat * Fnum min') (Fexp min'))) with (2%nat * Float (Fnum min') (Fexp min'))%R. replace (Float (Fnum p * Zpower_nat radix (Zabs_nat (Fexp p - Fexp min'))) (Fexp min')) with (Fshift radix (Zabs_nat (Fexp p - Fexp min')) p). (* Goal: Rlt (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p)) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. (* Goal: Rlt (Rmult (INR (S (S O))) (FtoR radix (Float (Fnum min') (Fexp min')))) (FtoR radix p) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Rmult_lt_reg_l with (r := (/ 2%nat)%R); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real; rewrite Rmult_1_l; auto with real. replace (FtoR radix (Float (Fnum min') (Fexp min'))) with (FtoR radix min); auto. (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))) p) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq float (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp min')))))) (Float (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Fexp p - Zabs_nat (Fexp p - Fexp min'))%Z with (Fexp min'); auto. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.of_nat (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite inj_abs; auto. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) ring. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. replace (FtoRradix (Float (2%nat * Fnum min') (Fexp min'))) with ((2%nat * Fnum min')%Z * powerRZ radix (Fexp min'))%R. (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (Rmult (IZR (Z.mul (Z.of_nat (S (S O))) (Fnum min'))) (powerRZ (IZR radix) (Fexp min'))) *) (* Goal: @eq R (Rmult (IZR (Z.mul (Z.of_nat (S (S O))) (Fnum min'))) (powerRZ (IZR radix) (Fexp min'))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite Rmult_IZR; auto. (* Goal: @eq R (powerRZ (IZR radix) e) (FtoRradix (Float (Z.of_nat (S O)) e)) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) replace (Z_of_nat 2) with (Zsucc (Zsucc 0)). (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) repeat rewrite <- Zmult_succ_l_reverse; unfold Zsucc in |- *; ring. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) exists min; split; auto. (* Goal: Fbounded b max *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix max)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) case H'1; auto. (* Goal: @eq R (FtoRradix min) (Rminus (FtoRradix p) (FtoRradix min)) *) rewrite Rl1. pattern (FtoRradix p) at 2 in |- *; replace (FtoRradix p) with (2%nat * (/ 2%nat * p))%R. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; ring. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_ne_r; auto with real. Qed. Theorem div2IsBetweenPos : forall p min max : float, (0 <= p)%R -> Fbounded b p -> isMin b radix (/ 2%nat * p) min -> isMax b radix (/ 2%nat * p) max -> p = (min + max)%R :>R. (* Goal: forall (p min max : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fbounded b p) (_ : isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) min) (_ : isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) max), @eq R (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix max)) *) intros p min max P H' H'0 H'1; apply Rle_antisym. (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix max)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rplus_le_reg_l with (r := (- max)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix max)) (FtoRradix p)) (Rplus (Ropp (FtoRradix max)) (Rplus (FtoRradix min) (FtoRradix max))) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) replace (- max + p)%R with (p - max)%R; [ idtac | ring ]. (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix max)) (Rplus (Ropp (FtoRradix max)) (Rplus (FtoRradix min) (FtoRradix max))) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) replace (- max + (min + max))%R with (FtoRradix min); [ idtac | ring ]. (* Goal: Rle (Rminus (FtoRradix p) (FtoRradix max)) (FtoRradix min) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) rewrite <- (Fminus_correct radix); auto with arith. (* Goal: Rle (FtoRradix max) (FtoR radix f) *) (* Goal: Rlt (FtoR radix f) (FtoRradix max) *) case H'0. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoR radix (Fminus radix p max)) (FtoRradix min) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) intros H'2 H'3; elim H'3; intros H'4 H'5; apply H'5; clear H'3; auto. (* Goal: Fbounded b (Fminus radix p max) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Sterbenz; auto. (* Goal: Fbounded b max *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix max)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) case H'1; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix max)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rle_trans with (FtoRradix max); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_1_l; auto with real. (* Goal: Rle (FtoR radix max) (Rmult (INR (S (S O))) (FtoRradix max)) *) (* Goal: Rle (FtoRradix max) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rledouble; auto. (* Goal: Rle (IZR Z0) (FtoRradix max) *) (* Goal: Rle (FtoRradix max) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rle_trans with (FtoRradix min); auto. (* Goal: Rle (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix min) (FtoRradix max) *) (* Goal: Rle (FtoRradix max) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply RleMinR0 with (r := (/ 2%nat * p)%R); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_1_l; rewrite Rmult_0_r; auto with real. (* Goal: Rle (FtoRradix min) (FtoRradix max) *) (* Goal: Rle (FtoRradix max) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rle_trans with (/ 2%nat * p)%R; auto; apply isMax_inv1 with (1 := H'1). (* Goal: Rle (FtoRradix max) (FtoRradix x) *) case H'1. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) intros H'3 H'6; elim H'6; intros H'7 H'8; apply H'8; clear H'6; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix p) *) (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_1_l; auto with real. (* Goal: Rle (FtoR radix p) (Rmult (INR (S (S O))) (FtoR radix max)) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rmult_le_reg_l with (r := (/ 2%nat)%R); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real; rewrite Rmult_1_l; auto with real. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoR radix max) *) (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply isMax_inv1 with (1 := H'1). (* Goal: Rle (FtoR radix (Fminus radix p max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) rewrite Fminus_correct; auto with arith. (* Goal: Rle (Rminus (FtoR radix p) (FtoR radix max)) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rplus_le_reg_l with (r := FtoR radix max). replace (FtoR radix max + (FtoR radix p - FtoR radix max))%R with (FtoR radix p); [ idtac | ring ]. (* Goal: Rle (Rplus (FtoRradix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoRradix p) *) apply Rplus_le_reg_l with (r := (- (/ 2%nat * p))%R). (* Goal: Rle (Rplus (Ropp (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoR radix p)) (Rplus (Ropp (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (Rplus (FtoR radix max) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)))) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) replace (- (/ 2%nat * p) + FtoR radix p)%R with (/ 2%nat * p)%R. replace (- (/ 2%nat * p) + (FtoR radix max + / 2%nat * p))%R with (FtoR radix max); [ apply isMax_inv1 with (1 := H'1) | ring ]. (* Goal: @eq R (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (Rplus (Ropp (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoR radix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) replace (FtoR radix p) with (2%nat * (/ 2%nat * p))%R. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; ring. (* Goal: @eq R (Rmult (INR (S (S O))) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoRradix p) *) rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (FtoRradix p) *) apply Rplus_le_reg_l with (r := (- min)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix min)) (Rplus (FtoRradix min) (FtoRradix max))) (Rplus (Ropp (FtoRradix min)) (FtoRradix p)) *) replace (- min + p)%R with (p - min)%R; [ idtac | ring ]. (* Goal: Rle (Rplus (Ropp (FtoRradix min)) (Rplus (FtoRradix min) (FtoRradix max))) (Rminus (FtoRradix p) (FtoRradix min)) *) replace (- min + (min + max))%R with (FtoRradix max); [ idtac | ring ]. (* Goal: Rle (FtoRradix max) (Rminus (FtoRradix p) (FtoRradix min)) *) case (PminPos p min); auto. (* Goal: forall (x : float) (_ : and (Fbounded b x) (@eq R (FtoRradix x) (Rminus (FtoRradix p) (FtoRradix min)))), Rle (FtoRradix max) (Rminus (FtoRradix p) (FtoRradix min)) *) intros x H'2; elim H'2; intros H'3 H'4; elim H'4; clear H'2. (* Goal: Rle (FtoRradix max) (FtoRradix x) *) case H'1. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix x) *) intros H'2 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (FtoR radix x) *) unfold FtoRradix in H'4; rewrite H'4; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) (Rminus (FtoR radix p) (FtoR radix min)) *) fold FtoRradix in |- *; apply Rplus_le_reg_l with (r := FtoRradix min). (* Goal: Rle (Rplus (FtoRradix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (Rplus (FtoRradix min) (Rminus (FtoRradix p) (FtoRradix min))) *) replace (min + (p - min))%R with (FtoRradix p); [ idtac | ring ]. (* Goal: Rle (Rplus (FtoRradix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoRradix p) *) apply Rplus_le_reg_l with (r := (- (/ 2%nat * p))%R). (* Goal: Rle (Rplus (Ropp (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (Rplus (FtoRradix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)))) (Rplus (Ropp (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoRradix p)) *) replace (- (/ 2%nat * p) + p)%R with (/ 2%nat * p)%R. replace (- (/ 2%nat * p) + (min + / 2%nat * p))%R with (FtoRradix min); [ apply isMin_inv1 with (1 := H'0) | ring ]. pattern (FtoRradix p) at 3 in |- *; replace (FtoRradix p) with (2%nat * (/ 2%nat * p))%R. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; ring. (* Goal: @eq R (Rmult (INR (S (S O))) (Rmult (Rinv (INR (S (S O)))) (FtoRradix p))) (FtoRradix p) *) rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real. Qed. Theorem div2IsBetween : forall p min max : float, Fbounded b p -> isMin b radix (/ 2%nat * p) min -> isMax b radix (/ 2%nat * p) max -> p = (min + max)%R :>R. (* Goal: forall (p min max : float) (_ : Fbounded b p) (_ : isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) min) (_ : isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix p)) max), @eq R (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix max)) *) intros p min max H' H'0 H'1; case (Rle_or_lt 0 p); intros H'2. (* Goal: @eq R (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix max)) *) (* Goal: @eq R (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix max)) *) apply div2IsBetweenPos; auto. cut (forall x y : R, (- x)%R = (- y)%R -> x = y); [ intros H'3; apply H'3; clear H'3 | idtac ]. (* Goal: @eq R (Ropp (FtoRradix p)) (Ropp (Rplus (FtoRradix min) (FtoRradix max))) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) replace (- (min + max))%R with (- max + - min)%R; [ idtac | ring ]. (* Goal: @eq R (Ropp (FtoRradix p)) (Rplus (Ropp (FtoRradix max)) (Ropp (FtoRradix min))) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) repeat rewrite <- (Fopp_correct radix); auto with float. (* Goal: @eq R (FtoR radix (Fopp p)) (Rplus (FtoR radix (Fopp max)) (FtoR radix (Fopp min))) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) apply div2IsBetweenPos; auto with float. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp max) *) (* Goal: isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp min) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) rewrite (Fopp_correct radix); auto. (* Goal: Rle (IZR Z0) (Ropp (FtoR radix p)) *) (* Goal: isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp max) *) (* Goal: isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp min) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) replace 0%R with (-0)%R; try apply Rlt_le; auto with real. (* Goal: isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp min) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) replace (/ 2%nat * Fopp p)%R with (- (/ 2%nat * p))%R; auto with float. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite (Fopp_correct radix); auto; fold FtoRradix; ring. (* Goal: isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix (Fopp p))) (Fopp min) *) (* Goal: forall (x y : R) (_ : @eq R (Ropp x) (Ropp y)), @eq R x y *) replace (/ 2%nat * Fopp p)%R with (- (/ 2%nat * p))%R; auto with float. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite (Fopp_correct radix); auto; fold FtoRradix;ring. intros x y H'3; rewrite <- (Ropp_involutive x); rewrite <- (Ropp_involutive y); rewrite H'3; auto. Qed. Theorem RoundedModeMultAbs : forall P, RoundedModeP b radix P -> forall (r : R) (q q' : float), P r q -> Fbounded b q' -> (Rabs r <= radix * q')%R -> (Rabs q <= radix * q')%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (r : R) (q q' : float) (_ : P r q) (_ : Fbounded b q') (_ : Rle (Rabs r) (Rmult (IZR radix) (FtoRradix q'))), Rle (Rabs (FtoRradix q)) (Rmult (IZR radix) (FtoRradix q')) *) intros P H' r q q' H'0 H'1 H'2. (* Goal: Rle (Rabs (FtoRradix q)) (Rmult (IZR radix) (FtoRradix q')) *) case (Rle_or_lt 0 r); intros Rl0. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Rabs_right; auto. (* Goal: Rle (FtoRradix q) (Rmult (IZR radix) (FtoRradix q')) *) (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix q)) (Rmult (IZR radix) (FtoRradix q')) *) apply RoundedModeMult with (P := P) (r := r); auto. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r *) (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) rewrite <- (Rabs_right r); auto with real. (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix q)) (Rmult (IZR radix) (FtoRradix q')) *) apply Rle_ge; apply RleRoundedR0 with (P := P) (r := r); auto. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Faux.Rabsolu_left1; auto. replace (radix * q')%R with (- (radix * - q'))%R; [ apply Ropp_le_contravar | ring ]. (* Goal: Rle (Rmult (IZR radix) (Ropp (FtoRradix q'))) (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Fopp_correct radix). (* Goal: Rle (Rmult (IZR radix) (FtoR radix (Fopp q'))) (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) apply RoundedModeMultLess with (P := P) (r := r); auto. (* Goal: Fbounded b (Fopp q') *) (* Goal: Rle (Rmult (IZR radix) (FtoRradix (Fopp q'))) r *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) apply oppBounded; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp f1)) *) (* Goal: isMin b radix (FtoRradix (Fopp f1)) (Fopp f2) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (Rmult (IZR radix) (Ropp (FtoR radix q'))) r *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Ropp_involutive r). replace (radix * - FtoR radix q')%R with (- (radix * q'))%R; [ apply Ropp_le_contravar | fold FtoRradix;ring ]; auto. (* Goal: Rle (Ropp r) (Rmult (IZR radix) (FtoRradix q')) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Faux.Rabsolu_left1 r); auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoRradix q) (IZR Z0) *) apply RleRoundedLessR0 with (P := P) (r := r); auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. Qed. Theorem isMinComp : forall (r1 r2 : R) (min max : float), isMin b radix r1 min -> isMax b radix r1 max -> (min < r2)%R -> (r2 < max)%R -> isMin b radix r2 min. (* Goal: forall (r1 r2 : R) (min max : float) (_ : isMin b radix r1 min) (_ : isMax b radix r1 max) (_ : Rlt (FtoRradix min) r2) (_ : Rlt r2 (FtoRradix max)), isMax b radix r2 max *) intros r1 r2 min max H' H'0 H'1 H'2; split. (* Goal: Rle (FtoR radix f) (FtoR radix min) *) case H'; auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) split. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f) *) intros f H'3 H'4. (* Goal: Rle (FtoR radix f) (FtoR radix min) *) case H'; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r1 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r1 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoR radix max) (FtoR radix f) *) intros H'5 H'6; elim H'6; intros H'7 H'8; apply H'8; clear H'6; auto. (* Goal: Rle (FtoR radix f) r1 *) case (Rle_or_lt (FtoR radix f) r1); auto; intros C1. (* Goal: Rle (FtoR radix f) r1 *) absurd (FtoR radix f < max)%R. (* Goal: not (Rlt (FtoRradix min) (FtoR radix f)) *) (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) apply Rle_not_lt. (* Goal: Rle (FtoRradix max) (FtoR radix f) *) (* Goal: Rlt (FtoR radix f) (FtoRradix max) *) case H'0. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) r1) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) r1), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoR radix f) (FtoRradix min) *) (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) intros H'6 H'9; elim H'9; intros H'10 H'11; apply H'11; clear H'9; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rlt (FtoR radix f) (FtoRradix max) *) apply Rle_lt_trans with (2 := H'2); auto. Qed. Theorem isMaxComp : forall (r1 r2 : R) (min max : float), isMin b radix r1 min -> isMax b radix r1 max -> (min < r2)%R -> (r2 < max)%R -> isMax b radix r2 max. (* Goal: forall (r1 r2 : R) (min max : float) (_ : isMin b radix r1 min) (_ : isMax b radix r1 max) (_ : Rlt (FtoRradix min) r2) (_ : Rlt r2 (FtoRradix max)), isMax b radix r2 max *) intros r1 r2 min max H' H'0 H'1 H'2; split. (* Goal: Rle (FtoR radix max) (FtoR radix f) *) case H'0; auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) split. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f) *) intros f H'3 H'4. (* Goal: Rle (FtoR radix max) (FtoR radix f) *) case H'0; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r1 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r1 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoR radix max) (FtoR radix f) *) intros H'5 H'6; elim H'6; intros H'7 H'8; apply H'8; clear H'6; auto. (* Goal: Rle r1 (FtoR radix f) *) case (Rle_or_lt r1 (FtoR radix f)); auto; intros C1. (* Goal: Rle r1 (FtoR radix f) *) absurd (min < FtoR radix f)%R. (* Goal: not (Rlt (FtoRradix min) (FtoR radix f)) *) (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) apply Rle_not_lt. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) r1) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) r1), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoR radix f) (FtoRradix min) *) (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) intros H'6 H'9; elim H'9; intros H'10 H'11; apply H'11; clear H'9; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rlt (FtoRradix min) (FtoR radix f) *) apply Rlt_le_trans with (1 := H'1); auto. Qed. Theorem roundedModeLessMult : forall (P : R -> float -> Prop) (p : float) (r : R), RoundedModeP b radix P -> P r p -> (Float 1%nat (- dExp b) <= r)%R -> (p <= radix * r)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (r : R) (_ : RoundedModeP b radix P) (_ : P r p) (_ : Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r), Rle (FtoRradix p) (Rmult (IZR radix) r) *) intros P p r H' H'0 H'1. cut (0 < Float 1%nat (- dExp b))%R; [ intros Rl0 | unfold FtoRradix, FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real arith ]. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) cut (0 < r)%R; [ intros Rl1 | apply Rlt_le_trans with (1 := Rl0) ]; auto. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) cut (0 <= r)%R; [ intros Rl2 | apply Rlt_le; auto ]. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'2 H'3; Elimc H'3; intros H'3 H'4; Elimc H'4; intros H'4 H'5; case (H'4 r p); auto; intros H'6. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) apply Rle_trans with r; auto with real. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle r (Rmult (IZR radix) r) *) (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) apply isMin_inv1 with (1 := H'6). rewrite Rmult_comm; pattern r at 1 in |- *; replace r with (r * 1%nat)%R; [ apply Rmult_le_compat_l | simpl; ring ]; auto with real arith. case (MinEx b radix precision) with (r := r); auto with arith; intros min Hmin. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) cut (Fbounded b (Float (Fnum min) (Zsucc (Fexp min)))); [ intros F2 | idtac ]. cut (FtoRradix (Float (Fnum min) (Zsucc (Fexp min))) = (radix * min)%R :>R); [ intros F2Eq | idtac ]. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rle_trans with (FtoRradix (Float (Fnum min) (Zsucc (Fexp min)))). (* Goal: Rle (FtoRradix p) (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) case H'6. (* Goal: forall (_ : Fbounded b p) (_ : and (Rle r (FtoR radix p)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix p) (FtoR radix f))), Rle (FtoRradix p) (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'7 H'8; elim H'8; intros H'9 H'10; apply H'10; clear H'8; auto. (* Goal: Rle r (FtoR radix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) case (Rle_or_lt r (Float (Fnum min) (Zsucc (Fexp min)))); auto; intros Rlt0. (* Goal: Rle r (FtoR radix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) absurd (Float (Fnum min) (Zsucc (Fexp min)) <= min)%R. (* Goal: not (Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min)) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rgt_not_le. (* Goal: Rgt (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite F2Eq; auto with real. (* Goal: Rgt (Rmult (IZR radix) (FtoRradix min)) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite Rmult_comm. pattern (FtoRradix min) at 2 in |- *; replace (FtoRradix min) with (min * 1%nat)%R; auto with real. (* Goal: Rgt (Rmult (FtoRradix min) (IZR radix)) (Rmult (FtoRradix min) (INR (S O))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) red in |- *; apply Rmult_lt_compat_l; auto with real arith. (* Goal: Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) case (RleMinR0 r min); auto. (* Goal: Rle (FtoRradix max) (FtoRradix x) *) intros H'8; case H'1. (* Goal: forall _ : Rlt (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: forall _ : @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'11; absurd (Float 1%nat (- dExp b) <= min)%R. (* Goal: not (Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min)) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) (* Goal: forall _ : @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rgt_not_le; auto. (* Goal: Rgt (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) (* Goal: forall _ : @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite <- H'8; auto. apply (MonotoneMin b radix) with (p := FtoRradix (Float 1%nat (- dExp b))) (q := r); auto. (* Goal: isMin b radix (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply (RoundedModeProjectorIdem (isMin b radix)); auto. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply MinRoundedModeP with (precision := precision); auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) repeat split. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. (* Goal: forall _ : @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'11; absurd (min = Float 1%nat (- dExp b) :>R). (* Goal: not (@eq R (FtoRradix min) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))))) *) (* Goal: @eq R (FtoRradix min) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite <- H'8. (* Goal: not (@eq R (IZR Z0) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))))) *) (* Goal: @eq R (FtoRradix min) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rlt_dichotomy_converse; left; auto. (* Goal: @eq R (FtoRradix min) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply (MinUniqueP b radix r); auto. (* Goal: isMin b radix r (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite <- H'11. (* Goal: isMin b radix (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply (RoundedModeProjectorIdem (isMin b radix)); auto. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply MinRoundedModeP with (precision := precision); auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) repeat split. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) case Hmin. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) r), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'8 H'11; elim H'11; intros H'12 H'13; apply H'13; clear H'11; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite F2Eq. (* Goal: Rle (Rmult (IZR radix) (FtoRradix min)) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rmult_le_compat_l; auto with real arith. (* Goal: Rle (IZR Z0) (INR n) *) replace 0%R with (INR 0); auto with real arith. (* Goal: Rle (FtoRradix min) r *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply isMin_inv1 with (1 := Hmin). (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite powerRZ_Zs; auto with real zarith; ring. cut (Fbounded b min); [ unfold Fbounded in |- *; intros Fb0 | case Hmin; auto ]. (* Goal: and (Z.lt (Z.abs (Fnum (Float (Fnum min) (Z.succ (Fexp min))))) (Zpos (vNum b))) (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Float (Fnum min) (Z.succ (Fexp min))))) *) elim Fb0; intros H H0; auto. (* Goal: and (Z.lt (Z.abs (Fnum (Float (Fnum min) (Z.succ (Fexp min))))) (Zpos (vNum b))) (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Float (Fnum min) (Z.succ (Fexp min))))) *) repeat (split; simpl in |- *); auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_trans with (Fexp min); auto with zarith. Qed. Theorem roundedModeMoreMult : forall (P : R -> float -> Prop) (p : float) (r : R), RoundedModeP b radix P -> P r p -> (r <= Float (- 1%nat) (- dExp b))%R -> (radix * r <= p)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (r : R) (_ : RoundedModeP b radix P) (_ : P r p) (_ : Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r), Rle (FtoRradix p) (Rmult (IZR radix) r) *) intros P p r H' H'0 H'1. cut (Float (- 1%nat) (- dExp b) < 0)%R; [ intros Rl0 | unfold FtoRradix, FtoR in |- *; simpl in |- *; unfold IZR at 1; rewrite Ropp_mult_distr_l_reverse; rewrite Rmult_1_l; auto with real arith ]. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) 2: replace 0%R with (-0)%R; auto with real arith; ring. cut (r < 0)%R; [ intros Rl1 | apply Rle_lt_trans with (2 := Rl0) ]; auto. cut (r <= 0)%R; [ intros Rl2 | apply Rlt_le; auto ]. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) case H'. intros H'2 H'3; Elimc H'3; intros H'3 H'4; Elimc H'4; intros H'4 H'5; case (H'4 r p); auto; intros H'6. case (MaxEx b radix precision) with (r := r); auto with arith; intros max Hmax. cut (Fbounded b (Float (Fnum max) (Zsucc (Fexp max)))); [ intros F2 | idtac ]. cut (FtoRradix (Float (Fnum max) (Zsucc (Fexp max))) = (radix * max)%R :>R); [ intros F2Eq | idtac ]. apply Rle_trans with (FtoRradix (Float (Fnum max) (Zsucc (Fexp max)))). (* Goal: Rgt (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite F2Eq; auto with real. (* Goal: Rle (Rmult (IZR radix) (FtoRradix min)) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rmult_le_compat_l; auto with real arith. (* Goal: Rle (IZR Z0) (INR n) *) replace 0%R with (INR 0); auto with real arith. apply isMax_inv1 with (1 := Hmax); auto. (* Goal: Rle (FtoRradix p) (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) case H'6. (* Goal: forall (_ : Fbounded b p) (_ : and (Rle r (FtoR radix p)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix p) (FtoR radix f))), Rle (FtoRradix p) (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'7 H'8; elim H'8; intros H'9 H'10; apply H'10; clear H'8; auto. case (Rle_or_lt (Float (Fnum max) (Zsucc (Fexp max))) r); auto; intros Rlt0. absurd (max <= Float (Fnum max) (Zsucc (Fexp max)))%R. (* Goal: not (Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min)) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rgt_not_le. (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) rewrite F2Eq. replace (radix * max)%R with (- (- max * radix))%R; [ idtac | ring ]. pattern (FtoRradix max) at 1 in |- *; replace (FtoRradix max) with (- (- max * 1%nat))%R; [ idtac | simpl in |- *; ring ]. apply Ropp_lt_gt_contravar; apply Rmult_lt_compat_l; auto with real. replace 0%R with (-0)%R; [ apply Ropp_lt_contravar | ring ]. case (RleMaxR0 r max); auto. (* Goal: Rle (FtoRradix max) (FtoRradix x) *) intros H'8; case H'1. intros H'11; absurd (max <= Float (- 1%nat) (- dExp b))%R. (* Goal: not (Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min)) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (FtoRradix min) *) (* Goal: forall _ : @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r, Rlt (IZR Z0) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rgt_not_le; auto. rewrite H'8; auto. apply (MonotoneMax b radix) with (q := FtoRradix (Float (- 1%nat) (- dExp b))) (p := r); auto. (* Goal: isMax b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply (RoundedModeProjectorIdem (isMax b radix)); auto. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply MaxRoundedModeP with (precision := precision); auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) repeat split. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. intros H'11; absurd (Float (- 1%nat) (- dExp b) = max :>R). rewrite H'8; auto. (* Goal: not (@eq R (IZR Z0) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))))) *) (* Goal: @eq R (FtoRradix min) (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rlt_dichotomy_converse; left; auto. apply (MaxUniqueP b radix r); auto. rewrite H'11. (* Goal: isMax b radix (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply (RoundedModeProjectorIdem (isMax b radix)); auto. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix max) (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) *) apply MaxRoundedModeP with (precision := precision); auto. (* Goal: and (Rle r2 (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f)) *) repeat split. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) auto with zarith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; auto with zarith. case Hmax. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) r), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) intros H'8 H'11; elim H'11; intros H'12 H'13; apply H'13; clear H'11; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite powerRZ_Zs; auto with real zarith; ring. cut (Fbounded b max); [ unfold Fbounded in |- *; intros Fb0 | case Hmax; auto ]. (* Goal: and (Z.lt (Z.abs (Fnum (Float (Fnum min) (Z.succ (Fexp min))))) (Zpos (vNum b))) (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Float (Fnum min) (Z.succ (Fexp min))))) *) elim Fb0; intros H H0; repeat (split; simpl in |- *); auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_trans with (Fexp max); auto with zarith. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) apply Rle_trans with r; auto with real. pattern r at 2 in |- *; replace r with (- (- r * 1%nat))%R; [ idtac | simpl; ring ]. replace (radix * r)%R with (- (- r * radix))%R; [ idtac | ring ]. (* Goal: Rle (Rmult (IZR radix) (FtoRradix min)) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Ropp_le_contravar; apply Rmult_le_compat_l; auto with real arith. replace 0%R with (-0)%R; auto with real arith. apply isMax_inv1 with (1 := H'6). Qed. Theorem roundedModeAbsMult : forall (P : R -> float -> Prop) (p : float) (r : R), RoundedModeP b radix P -> P r p -> (Float 1%nat (- dExp b) <= Rabs r)%R -> (Rabs p <= radix * Rabs r)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : float) (r : R) (_ : RoundedModeP b radix P) (_ : P r p) (_ : Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Rabs r)), Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) intros P p r H' H'0 H'1; case (Rle_or_lt 0 r); intros H'2. (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle (FtoRradix p) (Rmult (IZR radix) r) *) (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) apply roundedModeLessMult with (P := P); auto. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) r *) (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) rewrite <- (Rabs_right r); auto with real. (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (IZR radix) (Rabs r)) *) apply Rle_ge; apply (RleRoundedR0 P) with (r := r); auto. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) repeat rewrite Faux.Rabsolu_left1; auto. replace (radix * - r)%R with (- (radix * r))%R; [ apply Ropp_le_contravar | ring ]. (* Goal: Rle (Rmult (IZR radix) r) (FtoRradix p) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) apply roundedModeMoreMult with (P := P); auto. (* Goal: Rle (Ropp r) (Rmult (IZR radix) (FtoRradix q')) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Ropp_involutive r); rewrite <- (Faux.Rabsolu_left1 r); auto. (* Goal: Rle (Ropp (Rabs r)) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) replace (Float (- 1%nat) (- dExp b)) with (Fopp (Float 1%nat (- dExp b))). (* Goal: Rle (Ropp (Rabs r)) (FtoRradix (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))))) *) (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) simpl in |- *; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoRradix p) (IZR Z0) *) apply (RleRoundedLessR0 P) with (r := r); auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. Qed. Theorem RleBoundRoundl : forall P, RoundedModeP b radix P -> forall (p q : float) (r : R), Fbounded b p -> (p <= r)%R -> P r q -> (p <= q)%R. (* Goal: forall _ : @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros P H' p q r H'0 H'1 H'2; case H'1; intros H'3. cut (MonotoneP radix P); [ intros Mn | apply RoundedModeP_inv4 with (1 := H'); auto ]. apply (Mn p r); auto. (* Goal: P (FtoRradix p) p *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply RoundedModeProjectorIdem with (P := P); auto. rewrite RoundedModeProjectorIdemEq with (P := P) (p := p) (q := q); auto with real. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix p) q *) apply (Cp r p q); auto. (* Goal: Fbounded b q *) apply RoundedModeBounded with (P := P) (r := r); auto. Qed. Theorem RleBoundRoundr : forall P, RoundedModeP b radix P -> forall (p q : float) (r : R), Fbounded b p -> (r <= p)%R -> P r q -> (q <= p)%R. (* Goal: forall _ : @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) r, Rle (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (FtoRradix q) *) (* Goal: @eq R (FtoRradix (Float (Fnum q') (Z.add (Fexp q') (Z.of_nat (S O))))) (Rmult (IZR radix) (FtoRradix q')) *) intros P H' p q r H'0 H'1 H'2; case H'1; intros H'3. cut (MonotoneP radix P); [ intros Mn | apply RoundedModeP_inv4 with (1 := H'); auto ]. (* Goal: Rle (FtoRradix q) (FtoRradix p) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply (Mn r p); auto. (* Goal: P (FtoRradix p) p *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply RoundedModeProjectorIdem with (P := P); auto. rewrite RoundedModeProjectorIdemEq with (P := P) (p := p) (q := q); auto with real. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix p) q *) apply (Cp r p q); auto. (* Goal: Fbounded b q *) apply RoundedModeBounded with (P := P) (r := r); auto. Qed. Theorem RoundAbsMonotoner : forall (P : R -> float -> Prop) (p : R) (q r : float), RoundedModeP b radix P -> Fbounded b r -> P p q -> (Rabs p <= r)%R -> (Rabs q <= r)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : R) (q r : float) (_ : RoundedModeP b radix P) (_ : Fbounded b r) (_ : P p q) (_ : Rle (FtoRradix r) (Rabs p)), Rle (FtoRradix r) (Rabs (FtoRradix q)) *) intros P p q r H' H'0 H'1 H'2. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) case (Rle_or_lt 0 p); intros Rl1. (* Goal: Rle (Rabs (FtoRradix q)) (FtoRradix r) *) (* Goal: Rle (Rabs (FtoRradix q)) (FtoRradix r) *) rewrite Rabs_right; auto with real. (* Goal: Rle (FtoRradix q) (FtoRradix r) *) (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix q)) (FtoRradix r) *) apply RleBoundRoundr with (P := P) (r := p); auto with real. (* Goal: Rle (FtoRradix r) p *) (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite <- (Rabs_right p); auto with real. (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) apply Rle_ge; apply RleRoundedR0 with (P := P) (r := p); auto. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Faux.Rabsolu_left1; auto. (* Goal: Rle (FtoRradix r) (Ropp (FtoRradix q)) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Ropp_involutive r); apply Ropp_le_contravar. (* Goal: Rle (FtoRradix q) (Ropp (FtoRradix r)) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Fopp_correct radix); auto. (* Goal: Rle (FtoR radix (Fopp r)) (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) apply RleBoundRoundl with (P := P) (r := p); auto with float. rewrite (Fopp_correct radix); rewrite <- (Ropp_involutive p); rewrite <- (Faux.Rabsolu_left1 p); auto with real; (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply RleRoundedLessR0 with (P := P) (r := p); auto; apply Rlt_le; auto. Qed. Theorem RoundAbsMonotonel : forall (P : R -> float -> Prop) (p : R) (q r : float), RoundedModeP b radix P -> Fbounded b r -> P p q -> (r <= Rabs p)%R -> (r <= Rabs q)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p : R) (q r : float) (_ : RoundedModeP b radix P) (_ : Fbounded b r) (_ : P p q) (_ : Rle (FtoRradix r) (Rabs p)), Rle (FtoRradix r) (Rabs (FtoRradix q)) *) intros P p q r H' H'0 H'1 H'2. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) case (Rle_or_lt 0 p); intros Rl1. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Rabs_right; auto. (* Goal: Rle (FtoRradix r) (FtoRradix q) *) (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) apply RleBoundRoundl with (P := P) (r := p); auto. (* Goal: Rle (FtoRradix r) p *) (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite <- (Rabs_right p); auto with real. (* Goal: Rge (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) apply Rle_ge; apply RleRoundedR0 with (P := P) (r := p); auto. (* Goal: Rle (FtoRradix r) (Rabs (FtoRradix q)) *) rewrite Faux.Rabsolu_left1; auto. (* Goal: Rle (FtoRradix r) (Ropp (FtoRradix q)) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Ropp_involutive r); apply Ropp_le_contravar. (* Goal: Rle (FtoRradix q) (Ropp (FtoRradix r)) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) rewrite <- (Fopp_correct radix); auto. (* Goal: Rle (FtoRradix q) (FtoR radix (Fopp r)) *) (* Goal: Rle (FtoRradix q) (IZR Z0) *) apply RleBoundRoundr with (P := P) (r := p); auto with float. rewrite (Fopp_correct radix); rewrite <- (Ropp_involutive p); rewrite <- (Faux.Rabsolu_left1 p); auto with real; (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply RleRoundedLessR0 with (P := P) (r := p); auto; apply Rlt_le; auto. Qed. (* Rounded of natural numbers are natural *) Theorem ZroundZ : forall (P : R -> float -> Prop) (z : Z) (p : float), RoundedModeP b radix P -> P z p -> exists z' : Z, p = z' :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (z : Z) (p : float) (_ : RoundedModeP b radix P) (_ : P (IZR z) p), @ex Z (fun z' : Z => @eq R (FtoRradix p) (IZR z')) *) intros P z p HP H'. case (RoundedModeRep b radix precision) with (P := P) (p := Float z 0%nat) (q := p); auto. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := HP); auto ]; auto. (* Goal: P (FtoR radix (Float z (Z.of_nat O))) p *) (* Goal: forall (x : Z) (_ : @eq R (FtoR radix p) (FtoR radix (Float x (Fexp (Float z (Z.of_nat O)))))), @ex Z (fun z' : Z => @eq R (FtoRradix p) (IZR z')) *) apply Cp with (1 := H'); auto. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR x) (IZR (Zpos xH))) (IZR x) *) rewrite Rmult_1_r; auto. (* Goal: Fbounded b p *) (* Goal: forall (x : Z) (_ : @eq R (FtoR radix p) (FtoR radix (Float x (Fexp (Float z (Z.of_nat O)))))), @ex Z (fun z' : Z => @eq R (FtoRradix p) (IZR z')) *) apply RoundedModeBounded with (P := P) (r := IZR z); auto. (* Goal: forall (x : Z) (_ : @eq R (FtoR radix p) (FtoR radix (Float x (Fexp (Float z (Z.of_nat O)))))), @ex Z (fun z' : Z => @eq R (FtoRradix p) (IZR z')) *) intros x H'0; exists x; auto. (* Goal: @eq R (FtoRradix p) (IZR x) *) unfold FtoRradix in |- *; rewrite H'0. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR x) (IZR (Zpos xH))) (IZR x) *) rewrite Rmult_1_r; auto. Qed. Theorem NroundN : forall (P : R -> float -> Prop) (n : nat) (p : float), RoundedModeP b radix P -> P n p -> exists n' : nat, p = n' :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (n : nat) (p : float) (_ : RoundedModeP b radix P) (_ : P (INR n) p), @ex nat (fun n' : nat => @eq R (FtoRradix p) (INR n')) *) intros P n p HP H'. (* Goal: @ex nat (fun n' : nat => @eq R (FtoRradix p) (INR n')) *) case (ZroundZ P (Z_of_nat n) p); auto. (* Goal: @eq R (IZR (Z.of_nat (Z.abs_nat x))) (INR (Z.abs_nat x)) *) (* Goal: Z.le Z0 x *) repeat rewrite <- INR_IZR_INZ; auto. (* Goal: forall (x : Z) (_ : @eq R (FtoRradix p) (IZR x)), @ex nat (fun n' : nat => @eq R (FtoRradix p) (INR n')) *) intros x H'0; exists (Zabs_nat x). (* Goal: @eq R (FtoRradix p) (INR (Z.abs_nat x)) *) rewrite <- (inj_abs x) in H'0. (* Goal: @eq R (FtoRradix p) (INR (Z.abs_nat x)) *) (* Goal: Z.le Z0 x *) rewrite H'0. (* Goal: @eq R (IZR (Z.of_nat (Z.abs_nat x))) (INR (Z.abs_nat x)) *) (* Goal: Z.le Z0 x *) repeat rewrite <- INR_IZR_INZ; auto. (* Goal: Z.le Z0 x *) apply le_IZR; simpl in |- *. (* Goal: Rle (IZR Z0) (IZR x) *) rewrite <- H'0; auto. (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply RleRoundedR0 with (P := P) (r := INR n); auto. (* Goal: Rle (IZR Z0) (INR n) *) replace 0%R with (INR 0); auto with real arith. Qed. (* Properties of LSB and MSB *) Theorem FUlp_Le_LSigB : forall x : float, Fbounded b x -> (Fulp x <= Float 1%nat (LSB radix x))%R. intros x H; unfold is_Fzero, Fulp, Fnormalize in |- *; case (Z_zerop (Fnum x)); intros ZH. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Rle (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x))))))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) rewrite Rmult_1_l. (* Goal: Rle (powerRZ (IZR radix) (Z.opp (Z.of_N (dExp b)))) (powerRZ (IZR radix) (LSB radix x)) *) (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix x))) *) apply Rle_powerRZ. (* Goal: Rle (IZR (Zpos xH)) (IZR radix) *) (* Goal: Z.le (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))))) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)) *) replace 1%R with (INR 1); auto with real arith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (LSB radix x) *) (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix x))) *) apply Zle_trans with (Fexp x); auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x) *) (* Goal: Z.le (Fexp x) (LSB radix x) *) (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix x))) *) case H; auto. (* Goal: Z.le (Fexp x) (LSB radix x) *) (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix x))) *) apply Fexp_le_LSB; auto. rewrite LSB_shift with (n := min (precision - Fdigit radix x) (Zabs_nat (dExp b + Fexp x))); auto. (* Goal: Rle (powerRZ (IZR radix) (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Rle (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x))))))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)))) *) rewrite Rmult_1_l. (* Goal: Rle (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x))))))) (powerRZ (IZR radix) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x))) *) apply Rle_powerRZ; auto with arith. (* Goal: Rle (IZR (Zpos xH)) (IZR radix) *) (* Goal: Z.le (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))))) (LSB radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))) x)) *) replace 1%R with (INR 1); auto with real arith. exact (Fexp_le_LSB radix (Fshift radix (min (precision - Fdigit radix x) (Zabs_nat (dExp b + Fexp x))) x)). Qed. Theorem MSBisMin : forall f1 f2 : float, (0 <= f1)%R -> isMin b radix f1 f2 -> ~ is_Fzero f1 -> ~ is_Fzero f2 -> MSB radix f1 = MSB radix f2. intros f1 f2 H' H'0 H'1 H'2. (* Goal: @eq Z (Z.sub (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp p) (Fexp min'))))) (Fnum min')) (Z.succ (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_antisym. 2: apply MSB_monotone; auto. 2: repeat rewrite Fabs_correct1; auto with arith. 2: apply isMin_inv1 with (1 := H'0). 2: apply RleRoundedR0 with (P := isMin b radix) (r := FtoRradix f1); auto. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) 2: apply MinRoundedModeP with (precision := precision); auto. case (Zle_or_lt (MSB radix f1) (MSB radix f2)); auto. intros H'3; absurd (Float 1%nat (Zsucc (MSB radix f2)) <= f2)%R. (* Goal: not (Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min)) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply Rgt_not_le. red in |- *; unfold FtoRradix in |- *; rewrite <- Fabs_correct1; auto with float arith. apply abs_lt_MSB; auto. apply RleRoundedR0 with (P := isMin b radix) (r := FtoRradix f1); auto with float. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Fbounded b (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (FtoRradix min) *) (* Goal: Rle (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) r) *) (* Goal: @eq R (FtoRradix (Float (Fnum min) (Z.succ (Fexp min)))) (Rmult (IZR radix) (FtoRradix min)) *) (* Goal: Fbounded b (Float (Fnum min) (Z.succ (Fexp min))) *) apply MinRoundedModeP with (precision := precision); auto. (* Goal: Rle (FtoRradix max) (FtoR radix f) *) (* Goal: Rlt (FtoR radix f) (FtoRradix max) *) case H'0. intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. apply (FboundedOne _ radixMoreThanOne b precision); auto with arith. apply Zle_trans with (Fexp f2). case H'4; auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_trans with (MSB radix f2); auto with zarith. apply Fexp_le_MSB; auto. apply Rle_trans with (FtoR radix (Float 1%nat (MSB radix f1))); auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply oneExp_le; auto with zarith. unfold FtoRradix in |- *; rewrite <- Fabs_correct1 with (x := f1); auto with float arith. apply MSB_le_abs; auto. Qed. Theorem MSBtoZero : forall f1 f2 : float, ToZeroP b radix f1 f2 -> ~ is_Fzero f1 -> ~ is_Fzero f2 -> MSB radix f1 = MSB radix f2. (* Goal: forall (f1 f2 : float) (_ : ToZeroP b radix (FtoRradix f1) f2) (_ : not (is_Fzero f1)) (_ : not (is_Fzero f2)), @eq Z (MSB radix f1) (MSB radix f2) *) intros f1 f2 H' H'0 H'1; Casec H'; intros tmp; Elimc tmp; intros H1 H2. (* Goal: @eq Z (MSB radix f1) (MSB radix f2) *) (* Goal: @eq Z (MSB radix f1) (MSB radix f2) *) apply MSBisMin; auto. (* Goal: @eq Z (MSB radix f1) (MSB radix f2) *) rewrite (MSB_opp radix f1). (* Goal: @eq Z (MSB radix (Fopp f1)) (MSB radix f2) *) rewrite (MSB_opp radix f2). (* Goal: @eq Z (MSB radix (Fopp f1)) (MSB radix (Fopp f2)) *) apply MSBisMin; auto with float. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp f1)) *) (* Goal: isMin b radix (FtoRradix (Fopp f1)) (Fopp f2) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (IZR Z0) (Ropp (FtoR radix f1)) *) (* Goal: isMin b radix (FtoRradix (Fopp f1)) (Fopp f2) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMin b radix (FtoRradix (Fopp f1)) (Fopp f2) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with float. Qed. Theorem MSBBoundNotZero : forall P : R -> float -> Prop, RoundedModeP b radix P -> forall f1 f2 : float, P f1 f2 -> f1 <> 0%R :>R -> (- dExp b <= MSB radix f1)%Z -> f2 <> 0%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (f1 f2 : float) (_ : P (FtoRradix f1) f2) (_ : not (@eq R (FtoRradix f1) (IZR Z0))) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (MSB radix f1)), not (@eq R (FtoRradix f2) (IZR Z0)) *) intros P H' f1 f2 H'0 H'1 H'2. (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) case (Rle_or_lt 0 f1); intros Rl1. (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) apply Rlt_dichotomy_converse; right; red in |- *. (* Goal: Rlt (IZR Z0) (FtoRradix f2) *) (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) apply Rlt_le_trans with (r2 := FtoRradix (Float 1%nat (MSB radix f1))); auto. unfold FtoRradix, FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real arith. cut (Float 1%nat (MSB radix f1) <= Fabs f1)%R; unfold FtoRradix in |- *; [ rewrite Fabs_correct; auto with arith; rewrite Rabs_right; auto with real; intros Rl2; Casec Rl2; intros Rl2 | apply MSB_le_abs ]; auto. cut (MonotoneP radix P); [ intros Mn | apply RoundedModeP_inv4 with (1 := H'); auto ]. (* Goal: Rle (FtoR radix (Float (Z.of_nat (S O)) (MSB radix f1))) (FtoR radix f2) *) (* Goal: Rle (FtoR radix (Float (Z.of_nat (S O)) (MSB radix f1))) (FtoR radix f2) *) (* Goal: not (is_Fzero f1) *) (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) apply (Mn (Float 1%nat (MSB radix f1)) f1); auto. (* Goal: P (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdem; auto. apply (FboundedOne radix) with (precision := precision); auto with real zarith arith. replace (FtoR radix f2) with (FtoR radix (Float 1%nat (MSB radix f1))); auto with float real. (* Goal: @eq R (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (FtoRradix f2) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdemEq with (P := P); auto. apply (FboundedOne radix) with (precision := precision); auto with real zarith arith. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply (Cp f1) with (p := f2); auto. (* Goal: Fbounded b f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeBounded with (P := P) (r := FtoRradix f1); auto. (* Goal: not (is_Fzero p) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) Contradict H'1; unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. (* Goal: not (@eq R (FtoRradix f2) (IZR Z0)) *) apply Rlt_dichotomy_converse; left. apply Rle_lt_trans with (r2 := FtoRradix (Float (- 1%nat) (MSB radix f1))); auto. cut (MonotoneP radix P); [ intros Mn | apply RoundedModeP_inv4 with (1 := H'); auto ]. cut (f1 <= Float (- 1%nat) (MSB radix f1))%R; [ intros Rle1; Casec Rle1; intros Rle1 | idtac ]. (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply (Mn f1 (Float (- 1%nat) (MSB radix f1))); auto. (* Goal: P (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: Rle (FtoRradix f2) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdem; auto. (* Goal: Fbounded b (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: P (FtoR radix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply oppBoundedInv; unfold Fopp in |- *; simpl in |- *. apply (FboundedOne radix) with (precision := precision); auto with real zarith arith. replace (FtoRradix f2) with (FtoRradix (Float (- 1%nat) (MSB radix f1))); auto with real. (* Goal: @eq R (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (FtoRradix f2) *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeProjectorIdemEq with (P := P); auto. (* Goal: Fbounded b (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: P (FtoR radix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply oppBoundedInv; unfold Fopp in |- *; simpl in |- *. apply (FboundedOne _ radixMoreThanOne b precision); auto with real zarith arith. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply (Cp f1) with (p := f2); auto. (* Goal: Fbounded b f2 *) (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) apply RoundedModeBounded with (P := P) (r := FtoRradix f1); auto. (* Goal: Rle (FtoRradix f1) (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) replace (FtoRradix f1) with (- FtoRradix (Fabs f1))%R. replace (Float (- 1%nat) (MSB radix f1)) with (Fopp (Float 1%nat (MSB radix f1))). (* Goal: Rle (Ropp (FtoRradix (Fabs f1))) (FtoRradix (Fopp (Float (Z.of_nat (S O)) (MSB radix f1)))) *) (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (MSB radix f1))) (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1)) *) (* Goal: @eq R (Ropp (FtoRradix (Fabs f1))) (FtoRradix f1) *) (* Goal: Rlt (FtoRradix (Float (Z.opp (Z.of_nat (S O))) (MSB radix f1))) (IZR Z0) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto. apply Ropp_le_contravar; apply MSB_le_abs; auto. (* Goal: not (is_Fzero p) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) Contradict H'1; unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) unfold Fopp in |- *; simpl in |- *; auto. unfold FtoRradix in |- *; rewrite Fabs_correct; auto with arith; rewrite Faux.Rabsolu_left1; try apply Rlt_le; auto; (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) ring. replace (Float (- 1%nat) (MSB radix f1)) with (Fopp (Float 1%nat (MSB radix f1))); [ idtac | unfold Fopp in |- *; simpl in |- *; auto ]. (* Goal: Rlt (FtoRradix (Fopp (Float (Z.of_nat (S O)) (MSB radix f1)))) (IZR Z0) *) replace 0%R with (-0)%R; [ idtac | ring ]. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; apply Ropp_lt_contravar. (* Goal: Rlt (IZR Z0) (FtoR radix (Float (Z.of_nat (S O)) (MSB radix f1))) *) unfold FtoR in |- *; simpl in |- *; rewrite Rmult_1_l; auto with real arith. Qed. Theorem RoundMSBmax : forall (P : R -> float -> Prop) (p q : float), RoundedModeP b radix P -> P p q -> p <> 0%R :>R -> (- dExp b <= MSB radix p)%Z -> (MSB radix q <= Zsucc (MSB radix p))%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p q : float) (_ : RoundedModeP b radix P) (_ : P (FtoRradix p) q) (_ : not (@eq R (FtoRradix p) (IZR Z0))) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (MSB radix p)), Z.le (MSB radix p) (MSB radix q) *) intros P p q H' H'0 H'1 H'2. (* Goal: Z.le (MSB radix q) (Z.succ (MSB radix p)) *) apply (oneExp_Zle radix); auto. (* Goal: Rle (FtoR radix (Float (Z.of_nat (S O)) (MSB radix q))) (FtoR radix (Float (Z.of_nat (S O)) (Z.succ (MSB radix p)))) *) apply Rle_trans with (FtoRradix (Fabs q)). unfold FtoRradix in |- *; apply MSB_le_abs; auto. (* Goal: not (is_Fzero q) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) red in |- *; intros H'3; absurd (q = 0%R :>R). (* Goal: not (@eq R (FtoRradix q) (IZR Z0)) *) (* Goal: @eq R (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) apply MSBBoundNotZero with (P := P) (f1 := p); auto. (* Goal: @eq R (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix (Fabs q)) (FtoR radix (Float (Z.of_nat (S O)) (Z.succ (MSB radix p)))) *) apply (is_Fzero_rep1 radix); auto. unfold FtoRradix in |- *; rewrite Fabs_correct; auto with arith; fold FtoRradix in |- *. (* Goal: Rle (Rabs (FtoRradix q)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB radix p)))) *) apply RoundAbsMonotoner with (P := P) (p := FtoRradix p); auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply (FboundedOne _ radixMoreThanOne b precision); auto with zarith. (* Goal: Rle (Rabs (FtoRradix p)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB radix p)))) *) unfold FtoRradix in |- *; rewrite <- (Fabs_correct radix); auto with arith. apply Rlt_le; apply abs_lt_MSB; auto. Qed. Theorem RoundMSBmin : forall (P : R -> float -> Prop) (p q : float), RoundedModeP b radix P -> P p q -> p <> 0%R :>R -> (- dExp b <= MSB radix p)%Z -> (MSB radix p <= MSB radix q)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p q : float) (_ : RoundedModeP b radix P) (_ : P (FtoRradix p) q) (_ : not (@eq R (FtoRradix p) (IZR Z0))) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (MSB radix p)), Z.le (MSB radix p) (MSB radix q) *) intros P p q H' H'0 H'1 H'2. (* Goal: Z.le (MSB radix p) (MSB radix q) *) replace (MSB radix p) with (MSB radix (Float 1%nat (MSB radix p))). (* Goal: Z.le (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix q) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) apply MSB_monotone; auto. (* Goal: not (is_Fzero (Float (Z.of_nat (S O)) (MSB radix p))) *) (* Goal: not (is_Fzero q) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) unfold is_Fzero in |- *; simpl in |- *; red in |- *; intros; discriminate. (* Goal: not (is_Fzero q) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) red in |- *; intros H'3; absurd (q = 0%R :>R). (* Goal: not (@eq R (FtoRradix q) (IZR Z0)) *) (* Goal: @eq R (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) apply MSBBoundNotZero with (P := P) (f1 := p); auto. (* Goal: @eq R (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoR radix (Fabs (Float (Z.of_nat (S O)) (MSB radix p)))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. replace (Fabs (Float 1%nat (MSB radix p))) with (Float 1%nat (MSB radix p)); [ idtac | unfold Fabs in |- *; simpl in |- *; auto ]. (* Goal: Rle (FtoR radix (Float (Z.of_nat (S O)) (MSB radix p))) (FtoR radix (Fabs q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) rewrite Fabs_correct; auto with arith; fold FtoRradix in |- *. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB radix p))) (Rabs (FtoRradix q)) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) apply RoundAbsMonotonel with (P := P) (p := FtoRradix p); auto. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply (FboundedOne _ radixMoreThanOne b precision); auto with zarith. unfold FtoRradix in |- *; rewrite <- (Fabs_correct radix); auto with arith; apply MSB_le_abs; auto. (* Goal: not (is_Fzero p) *) (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) Contradict H'1; unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. (* Goal: @eq Z (MSB radix (Float (Z.of_nat (S O)) (MSB radix p))) (MSB radix p) *) unfold MSB, Fdigit in |- *; simpl in |- *. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) case (Zpred (digit radix (Fnum p) + Fexp p)); simpl in |- *; auto with zarith. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) intros p0; case p0; simpl in |- *; auto. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) intros p1; elim p1; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : @eq Z (Zpos (Pos.pred_double (Pos.succ p))) (Zpos (xI p))), @eq Z (Zpos (xI (Pos.pred_double (Pos.succ p)))) (Zpos (xI (xI p))) *) (* Goal: forall p : positive, @eq Z (Z.pred (Z.pos_sub xH p)) (Zneg p) *) intros p2 H; injection H; intros H1; rewrite <- H1; auto. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) intros p0; case p0; simpl in |- *; auto. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) intros p1; case p1; simpl in |- *; auto. (* Goal: @eq float (Fopp (Float (Z.of_nat (S O)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.opp (Z.of_nat (S O))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) intros p2; elim p2; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : @eq Z (Zneg (xO (Pos.succ (Pos.pred_double p)))) (Zneg (xO (xO p)))), @eq Z (Zneg (xO (xO (Pos.succ (Pos.pred_double p))))) (Zneg (xO (xO (xO p)))) *) intros p3 H; injection H; intros H1; rewrite H1; auto. Qed. Theorem RoundLSBMax : forall (P : R -> float -> Prop) (p q : float), RoundedModeP b radix P -> P p q -> ~ is_Fzero q -> (LSB radix p <= LSB radix q)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p q : float) (_ : RoundedModeP b radix P) (_ : P (FtoRradix p) q) (_ : not (is_Fzero q)), Z.le (LSB radix p) (LSB radix q) *) intros P p q H' H'0 H'2. (* Goal: Z.le (LSB radix p) (LSB radix q) *) elim (LSB_rep_min radix) with (p := p); auto; intros z E. case (RoundedModeRep b radix precision) with (P := P) (p := Float z (LSB radix p)) (q := q); auto. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix (Float z (LSB radix p))) q *) (* Goal: forall (x : Z) (_ : @eq R (FtoR radix q) (FtoR radix (Float x (Fexp (Float z (LSB radix p)))))), Z.le (LSB radix p) (LSB radix q) *) apply (Cp p (Float z (LSB radix p)) q); auto. (* Goal: Fbounded b q *) (* Goal: forall (x : Z) (_ : @eq R (FtoR radix q) (FtoR radix (Float x (Fexp (Float z (LSB radix p)))))), Z.le (LSB radix p) (LSB radix q) *) apply RoundedModeBounded with (P := P) (r := FtoRradix p); auto. (* Goal: forall (x : Z) (_ : @eq R (FtoR radix q) (FtoR radix (Float x (Fexp (Float z (LSB radix p)))))), Z.le (LSB radix p) (LSB radix q) *) intros x H'3. replace (LSB radix p) with (Fexp (Float x (LSB radix p))); [ idtac | simpl in |- *; auto ]. (* Goal: Z.le (Fexp (Float x (LSB radix p))) (LSB radix q) *) replace (LSB radix q) with (LSB radix (Float x (LSB radix p))). (* Goal: Z.le (Fexp (Float x (LSB radix p))) (LSB radix (Float x (LSB radix p))) *) (* Goal: @eq Z (LSB radix (Float x (LSB radix p))) (LSB radix q) *) apply Fexp_le_LSB. (* Goal: @eq Z (LSB radix (Float x (LSB radix p))) (LSB radix q) *) apply LSB_comp; auto. (* Goal: not (is_Fzero (Float x (LSB radix p))) *) apply NisFzeroComp with (radix := radix) (x := q); auto. Qed. (* General theorem about the binade *) Theorem InBinade : forall (P : R -> float -> Prop) (p q r : float) (e : Z), RoundedModeP b radix P -> Fbounded b p -> Fbounded b q -> P (p + q)%R r -> (- dExp b <= e)%Z -> (Float (Zpower_nat radix (pred precision)) e <= p)%R -> (p <= Float (pPred (vNum b)) e)%R -> (0%nat < q)%R -> (q < powerRZ radix e)%R -> r = p :>R \/ r = (p + powerRZ radix e)%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (p q r : float) (e : Z) (_ : RoundedModeP b radix P) (_ : Fbounded b p) (_ : Fbounded b q) (_ : P (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : Z.le (Z.opp (Z.of_N (dExp b))) e) (_ : Rle (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) e)) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix (Float (pPred (vNum b)) e))) (_ : Rlt (INR O) (FtoRradix q)) (_ : Rlt (FtoRradix q) (powerRZ (IZR radix) e)), or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) intros P p q r e Rp H' H'0 H'1 H'2 H'3 H'4 H'5 H'6. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) cut (p < p + q)%R; [ intros Rlt1 | idtac ]. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) cut (p + q < FNSucc b radix precision p)%R; [ intros Rlt2 | idtac ]. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) cut (isMin b radix (p + q) p); [ intros Min1 | idtac ]. cut (isMax b radix (p + q) (FNSucc b radix precision p)); [ intros Max1 | idtac ]. cut (MinOrMaxP b radix P); [ intros MinOrMax | apply RoundedModeP_inv3 with (1 := Rp); auto ]. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) case (MinOrMax (p + q)%R r); auto; intros H1. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) left. (* Goal: @eq R (FtoRradix r) (FtoRradix p) *) (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply (MinUniqueP b radix (p + q)%R); auto. (* Goal: or (@eq R (FtoRradix r) (FtoRradix p)) (@eq R (FtoRradix r) (Rplus (FtoRradix p) (powerRZ (IZR radix) e))) *) (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) right. cut ((p + powerRZ radix e)%R = FNSucc b radix precision p); [ intros Eq1; rewrite Eq1 | idtac ]. (* Goal: @eq R (FtoRradix r) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: @eq R (Rplus (FtoRradix p) (powerRZ (IZR radix) e)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply (MaxUniqueP b radix (p + q)%R); auto. replace (FtoRradix (FNSucc b radix precision p)) with (Fnormalize radix b precision p + (FNSucc b radix precision p - Fnormalize radix b precision p))%R; [ idtac | ring ]. unfold FNSucc in |- *; rewrite <- (Fminus_correct radix); auto with arith; rewrite (FSuccDiff1 b radix precision); auto with arith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite (boundedNorMinGivesExp radix) with (x := e); auto with zarith. rewrite (FnormalizeCorrect radix); auto; unfold FtoRradix, FtoR in |- *; (* Goal: @eq Z (Fexp min') (Z.sub (Fexp p) (Z.sub (Fexp p) (Fexp min'))) *) (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) simpl in |- *; ring. (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply sym_not_equal; apply Zlt_not_eq. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_lt_trans with 0%Z; auto with zarith. replace 0%Z with (- (0))%Z; auto with zarith; apply Zle_Zopp; (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zlt_le_weak; apply nNormPos; auto with zarith. (* Goal: Z.lt Z0 (Fnum (Fnormalize radix b precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply (LtR0Fnum radix); auto. (* Goal: Rlt (IZR Z0) (FtoR radix (Fnormalize radix b precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) rewrite FnormalizeCorrect; fold FtoRradix in |- *; auto. (* Goal: Rlt (IZR Z0) (FtoRradix p) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le_trans with (2 := H'3). apply (LtFnumZERO radix); simpl in |- *; (replace 0%Z with (Z_of_nat 0); auto with zarith arith). (* Goal: isMax b radix (Rplus (FtoRradix p) (FtoRradix q)) (FNSucc b radix precision p) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply MinMax; auto with arith. (* Goal: not (@eq R (Rplus (FtoRradix p) (FtoRradix q)) (FtoR radix p)) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) Contradict Rlt1. (* Goal: not (Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q))) *) (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) rewrite Rlt1; auto with real. (* Goal: isMin b radix (Rplus (FtoRradix p) (FtoRradix q)) p *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply MinBinade with (precision := precision); auto with arith. (* Goal: Rle (FtoR radix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; auto. replace (FtoRradix (FNSucc b radix precision p)) with (Fnormalize radix b precision p + (FNSucc b radix precision p - Fnormalize radix b precision p))%R; [ idtac | ring ]. unfold FNSucc in |- *; rewrite <- (Fminus_correct radix); auto with arith; rewrite (FSuccDiff1 b radix precision); auto with arith. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) rewrite (boundedNorMinGivesExp radix) with (x := e); auto with zarith. (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix (Fnormalize radix b precision p)) (FtoR radix (Float (Z.of_nat (S O)) e))) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) rewrite (FnormalizeCorrect radix); auto; fold FtoRradix in |- *. (* Goal: Rlt (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix p) (FtoRradix (Float (Z.of_nat (S O)) e))) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) replace (FtoRradix (Float 1%nat e)) with (powerRZ radix e); auto with real. (* Goal: @eq R (powerRZ (IZR radix) e) (FtoRradix (Float (Z.of_nat (S O)) e)) *) (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. (* Goal: not (@eq Z (Fnum (Fnormalize radix b precision p)) (Z.opp (nNormMin radix precision))) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply sym_not_equal; apply Zlt_not_eq. (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zle_lt_trans with 0%Z; auto with zarith. replace 0%Z with (- (0))%Z; auto with zarith; apply Zle_Zopp; (* Goal: Z.le Z0 (Z.sub (Fexp p) (Fexp min')) *) (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix (Float (Fnum min') (Fexp min')))) (FtoRradix (Float (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Fexp min'))) *) (* Goal: @eq Z (Z.mul (Z.of_nat (S (S O))) (Fnum min')) (Z.add (Fnum min') (Fnum min')) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rminus (FtoRradix p) (FtoRradix min)))) *) apply Zlt_le_weak; apply nNormPos; auto with zarith. (* Goal: Z.lt Z0 (Fnum (Fnormalize radix b precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply (LtR0Fnum radix); auto. (* Goal: Rlt (IZR Z0) (FtoR radix (Fnormalize radix b precision p)) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) rewrite FnormalizeCorrect; fold FtoRradix in |- *; auto. (* Goal: Rlt (IZR Z0) (FtoRradix p) *) (* Goal: Rlt (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le_trans with (2 := H'3). apply (LtFnumZERO radix); simpl in |- *; (replace 0%Z with (Z_of_nat 0); auto with zarith arith). pattern (FtoRradix p) at 1 in |- *; replace (FtoRradix p) with (p + 0)%R; [ idtac | ring ]. (* Goal: Rlt (Rplus (FtoRradix p) (IZR Z0)) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rplus_lt_compat_l; auto. Qed. End FRoundP. Hint Resolve FulpSucCan FulpSuc FulpPredCan FulpPred: float.
(**************************************************************************** IEEE754 : Paux Laurent Thery ******************************************************************************) Require Export Digit. Require Export Option. Require Export Inverse_Image. Require Export Wf_nat. Require Import BinPos. Fixpoint exp (n m : nat) {struct m} : nat := match m with | O => 1 | S m' => n * exp n m' end. Theorem expPlus : forall n p q : nat, exp n (p + q) = exp n p * exp n q. (* Goal: forall n p q : nat, @eq nat (exp n (Init.Nat.add p q)) (Init.Nat.mul (exp n p) (exp n q)) *) intros n p; elim p; simpl in |- *; auto with arith. (* Goal: forall (n0 : nat) (_ : forall q : nat, @eq nat (exp n (Init.Nat.add n0 q)) (Init.Nat.mul (exp n n0) (exp n q))) (q : nat), @eq nat (Init.Nat.mul n (exp n (Init.Nat.add n0 q))) (Init.Nat.mul (Init.Nat.mul n (exp n n0)) (exp n q)) *) intros n0 H' q; rewrite mult_assoc_reverse; rewrite <- H'; auto. Qed. Fixpoint positive_exp (p n : positive) {struct n} : positive := match n with | xH => p | xO n1 => match positive_exp p n1 with | r => (fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r ( fun x => x) r end | xI n1 => match positive_exp p n1 with | r => (fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) p ( fun x => x) ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r ( fun x => x) r) end end. Theorem positive_exp_correct : forall p n : positive, nat_of_P (positive_exp p n) = exp (nat_of_P p) (nat_of_P n). (* Goal: forall p n : positive, @eq nat (Pos.to_nat (positive_exp p n)) (exp (Pos.to_nat p) (Pos.to_nat n)) *) intros p n; elim n; simpl in |- *; auto. (* Goal: forall (p0 : positive) (_ : @eq nat (Pos.to_nat (positive_exp p p0)) (exp (Pos.to_nat p) (Pos.to_nat p0))), @eq nat (Pos.to_nat (Pos.mul (positive_exp p p0) (positive_exp p p0))) (exp (Pos.to_nat p) (Pos.to_nat (xO p0))) *) (* Goal: @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat p) (S O)) *) intros p0 H. repeat rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y); simpl in |- *; auto. (* Goal: @eq nat (Init.Nat.mul (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat (positive_exp p p0)) (Pos.to_nat (positive_exp p p0)))) (Init.Nat.mul (Pos.to_nat p) (exp (Pos.to_nat p) (Pos.iter_op nat Init.Nat.add p0 (S (S O))))) *) (* Goal: forall (p0 : positive) (_ : @eq nat (Pos.to_nat (positive_exp p p0)) (exp (Pos.to_nat p) (Pos.to_nat p0))), @eq nat (Pos.to_nat (Pos.mul (positive_exp p p0) (positive_exp p p0))) (exp (Pos.to_nat p) (Pos.to_nat (xO p0))) *) (* Goal: @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat p) (S O)) *) rewrite ZL6; rewrite expPlus; rewrite H; auto. (* Goal: forall (p0 : positive) (_ : @eq nat (Pos.to_nat (positive_exp p p0)) (exp (Pos.to_nat p) (Pos.to_nat p0))), @eq nat (Pos.to_nat (Pos.mul (positive_exp p p0) (positive_exp p p0))) (exp (Pos.to_nat p) (Pos.to_nat (xO p0))) *) (* Goal: @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat p) (S O)) *) intros p0 H. repeat rewrite (fun (x y : positive) (_ : positive -> positive) => nat_of_P_mult_morphism x y); simpl in |- *; auto. (* Goal: @eq nat (Init.Nat.mul (Pos.to_nat (positive_exp p p0)) (Pos.to_nat (positive_exp p p0))) (exp (Pos.to_nat p) (Pos.to_nat (xO p0))) *) (* Goal: @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat p) (S O)) *) rewrite H; rewrite <- expPlus; rewrite <- ZL6; auto. (* Goal: forall _ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O), le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (S n))), le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto. Qed. Fixpoint Pdiv (p q : positive) {struct p} : Option positive * Option positive := match p with | xH => match q with | xH => (Some _ 1%positive, None _) | xO r => (None _, Some _ p) | xI r => (None _, Some _ p) end | xI p' => match Pdiv p' q with | (None, None) => match (1 - Zpos q)%Z with | Z0 => (Some _ 1%positive, None _) | Zpos r' => (Some _ 1%positive, Some _ r') | Zneg r' => (None _, Some _ 1%positive) end | (None, Some r1) => match (Zpos (xI r1) - Zpos q)%Z with | Z0 => (Some _ 1%positive, None _) | Zpos r' => (Some _ 1%positive, Some _ r') | Zneg r' => (None _, Some _ (xI r1)) end | (Some q1, None) => match (1 - Zpos q)%Z with | Z0 => (Some _ (xI q1), None _) | Zpos r' => (Some _ (xI q1), Some _ r') | Zneg r' => (Some _ (xO q1), Some _ 1%positive) end | (Some q1, Some r1) => match (Zpos (xI r1) - Zpos q)%Z with | Z0 => (Some _ (xI q1), None _) | Zpos r' => (Some _ (xI q1), Some _ r') | Zneg r' => (Some _ (xO q1), Some _ (xI r1)) end end | xO p' => match Pdiv p' q with | (None, None) => (None _, None _) | (None, Some r1) => match (Zpos (xO r1) - Zpos q)%Z with | Z0 => (Some _ 1%positive, None _) | Zpos r' => (Some _ 1%positive, Some _ r') | Zneg r' => (None _, Some _ (xO r1)) end | (Some q1, None) => (Some _ (xO q1), None _) | (Some q1, Some r1) => match (Zpos (xO r1) - Zpos q)%Z with | Z0 => (Some _ (xI q1), None _) | Zpos r' => (Some _ (xI q1), Some _ r') | Zneg r' => (Some _ (xO q1), Some _ (xO r1)) end end end. Definition oZ h := match h with | None => 0 | Some p => nat_of_P p end. Theorem Pdiv_correct : forall p q, nat_of_P p = oZ (fst (Pdiv p q)) * nat_of_P q + oZ (snd (Pdiv p q)) /\ oZ (snd (Pdiv p q)) < nat_of_P q. intros p q; elim p; simpl in |- *; auto. 3: case q; simpl in |- *; try intros q1; split; auto; unfold nat_of_P in |- *; simpl in |- *; auto with arith. intros p'; simpl in |- *; case (Pdiv p' q); simpl in |- *; intros q1 r1 (H1, H2); split. unfold nat_of_P in |- *; simpl in |- *. rewrite ZL6; rewrite H1. case q1; case r1; simpl in |- *. intros r2 q2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xI r2) q Datatypes.Eq); simpl in |- *; auto. intros H3; rewrite <- (Pcompare_Eq_eq _ _ H3); simpl in |- *; unfold nat_of_P in |- *; simpl in |- *. apply f_equal with (f := S); repeat rewrite (fun x y => mult_comm x (S y)); repeat rewrite ZL6; unfold nat_of_P in |- *; simpl in |- *; ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; repeat rewrite (fun x y => plus_comm x (S y)); simpl in |- *; apply f_equal with (f := S); ring. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4. apply trans_equal with (nat_of_P q + nat_of_P h + Pmult_nat q2 2 * Pmult_nat q 1); [ rewrite <- nat_of_P_plus_morphism; rewrite H5; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply f_equal with (f := S) | unfold nat_of_P in |- * ]; ring. intros r2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare 1 q Datatypes.Eq); simpl in |- *; auto. intros H3; rewrite <- (Pcompare_Eq_eq _ _ H3); simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; simpl in |- *; apply f_equal with (f := S);ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite (fun x y => plus_comm x (S y)); simpl in |- *; apply f_equal with (f := S); repeat rewrite ZL6; unfold nat_of_P in |- *; simpl in |- *; ring. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply trans_equal with (nat_of_P q + nat_of_P h + Pmult_nat r2 2 * Pmult_nat q 1); [ rewrite <- nat_of_P_plus_morphism; rewrite H5; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply f_equal with (f := S) | unfold nat_of_P in |- * ]; ring. intros r2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xI r2) q Datatypes.Eq); simpl in |- *; auto. intros H3; rewrite <- (Pcompare_Eq_eq _ _ H3); simpl in |- *; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply f_equal with (f := S); ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply f_equal with (f := S); ring. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply trans_equal with (nat_of_P q + nat_of_P h); [ rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply f_equal with (f := S) | unfold nat_of_P in |- * ]; ring. case q; simpl in |- *; auto. generalize H2; case q1; case r1; simpl in |- *; auto. intros r2 q2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xI r2) q Datatypes.Eq); simpl in |- *; auto. intros; apply lt_O_nat_of_P; auto. intros H H0; apply nat_of_P_lt_Lt_compare_morphism; auto. intros H3 H7; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply plus_lt_reg_l with (p := nat_of_P q); rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply le_lt_trans with (Pmult_nat r2 1 + Pmult_nat q 1); auto with arith. intros r2 HH; case q; simpl in |- *; auto. intros p2; case p2; unfold nat_of_P in |- *; simpl in |- *; auto with arith. intros p2; case p2; unfold nat_of_P in |- *; simpl in |- *; auto with arith. intros r2 HH. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xI r2) q Datatypes.Eq); simpl in |- *. intros; apply lt_O_nat_of_P; auto. intros H3; apply nat_of_P_lt_Lt_compare_morphism; auto. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply plus_lt_reg_l with (p := nat_of_P q); rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply le_lt_trans with (Pmult_nat r2 1 + Pmult_nat q 1); auto with arith. intros HH; case q; simpl in |- *; auto. intros p2; case p2; unfold nat_of_P in |- *; simpl in |- *; auto with arith. intros p2; case p2; unfold nat_of_P in |- *; simpl in |- *; auto with arith. intros p'; simpl in |- *; case (Pdiv p' q); simpl in |- *; intros q1 r1 (H1, H2); split. unfold nat_of_P in |- *; simpl in |- *; rewrite ZL6; rewrite H1. case q1; case r1; simpl in |- *; auto. intros r2 q2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xO r2) q Datatypes.Eq); simpl in |- *; auto. intros H3; rewrite <- (Pcompare_Eq_eq _ _ H3); simpl in |- *; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; ring. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply trans_equal with (nat_of_P q + nat_of_P h + Pmult_nat q2 2 * Pmult_nat q 1); [ rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- * | unfold nat_of_P in |- * ]; ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; ring. intros r2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xO r2) q Datatypes.Eq); simpl in |- *; auto. intros H3; rewrite <- (Pcompare_Eq_eq _ _ H3); simpl in |- *; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; ring. intros H3; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; ring. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply trans_equal with (nat_of_P q + nat_of_P h); [ rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- * | unfold nat_of_P in |- * ]; ring. generalize H2; case q1; case r1; simpl in |- *. intros r2 q2. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xO r2) q Datatypes.Eq); simpl in |- *; auto. intros; apply lt_O_nat_of_P; auto. intros H H0; apply nat_of_P_lt_Lt_compare_morphism; auto. intros H3 H7; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply plus_lt_reg_l with (p := nat_of_P q); rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply lt_trans with (Pmult_nat r2 1 + Pmult_nat q 1); auto with arith. intros; apply lt_O_nat_of_P; auto. intros r2 HH. rewrite Z.pos_sub_spec; unfold Pos.compare. CaseEq (Pcompare (xO r2) q Datatypes.Eq); simpl in |- *. intros; apply lt_O_nat_of_P; auto. intros H3; apply nat_of_P_lt_Lt_compare_morphism; auto. intros H3; case (Pminus_mask_Gt _ _ H3); intros h (H4, (H5, H6)); unfold Pminus in |- *; rewrite H4; apply plus_lt_reg_l with (p := nat_of_P q); rewrite <- (nat_of_P_plus_morphism q); rewrite H5; unfold nat_of_P in |- *; simpl in |- *; repeat rewrite ZL6; unfold nat_of_P in |- *; apply lt_trans with (Pmult_nat r2 1 + Pmult_nat q 1); auto with arith. auto. Qed. Section bugFix. Variable PdivAux : positive -> positive -> Option positive * Option positive. Fixpoint PdivlessAux (bound p base length : positive) {struct length} : Option positive * Option positive * nat := match Pcompare bound p Datatypes.Eq with | Datatypes.Gt => (Some _ p, None _, 0) | _ => match PdivAux p base with | (None, None) => (None _, None _, 1) | (None, Some r1) => (None _, Some _ r1, 1) | (Some q1, None) => match length with | xH => (Some _ q1, None _, 0) | xO length' => match PdivlessAux bound q1 base length' with | (s2, None, n) => (s2, None _, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r2 (fun x => x) base), S n) end | xI length' => match PdivlessAux bound q1 base length' with | (s2, None, n) => (s2, None _, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r2 (fun x => x) base), S n) end end | (Some q1, Some r1) => match length with | xH => (Some _ q1, None _, 0) | xO length' => match PdivlessAux bound q1 base length' with | (s2, None, n) => (s2, Some _ r1, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => x * y) r2 ( fun x => x) base + r1)%positive, S n) end | xI length' => match PdivlessAux bound q1 base length' with | (s2, None, n) => (s2, Some _ r1, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => x * y) r2 ( fun x => x) base + r1)%positive, S n) end end end end. End bugFix. Definition Pdivless := PdivlessAux Pdiv. Theorem Pdivless1 : forall bound p q base, Pcompare bound p Datatypes.Eq = Datatypes.Gt -> Pdivless bound p base q = (Some _ p, None _, 0). intros bound p q base H; case q; simpl in |- *; auto; intros; rewrite H; auto. Qed. Theorem Pdivless2 : forall bound p length base, Pcompare bound p Datatypes.Eq <> Datatypes.Gt -> Pdivless bound p base length = match Pdiv p base with | (None, None) => (None _, None _, 1) | (None, Some r1) => (None _, Some _ r1, 1) | (Some q1, None) => match length with | xH => (Some _ q1, None _, 0) | xO length' => match Pdivless bound q1 base length' with | (s2, None, n) => (s2, None _, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r2 ( fun x => x) base), S n) end | xI length' => match Pdivless bound q1 base length' with | (s2, None, n) => (s2, None _, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => (x * y)%positive) r2 ( fun x => x) base), S n) end end | (Some q1, Some r1) => match length with | xH => (Some _ q1, None _, 0) | xO length' => match Pdivless bound q1 base length' with | (s2, None, n) => (s2, Some _ r1, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => x * y) r2 ( fun x => x) base + r1)%positive, S n) end | xI length' => match Pdivless bound q1 base length' with | (s2, None, n) => (s2, Some _ r1, S n) | (s2, Some r2, n) => (s2, Some _ ((fun (x : positive) (_ : positive -> positive) (y : positive) => x * y) r2 ( fun x => x) base + r1)%positive, S n) end end end. intros bound p length base; case length; simpl in |- *; case (Pcompare bound p Datatypes.Eq); auto; (intros H; case H; auto; fail) || (intros p' H; case H; auto). Qed. Theorem compare_SUP_dec : forall p q : positive, Pcompare p q Datatypes.Eq = Datatypes.Gt \/ Pcompare p q Datatypes.Eq <> Datatypes.Gt. intros p q; case (Pcompare p q Datatypes.Eq); auto; right; red in |- *; (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros; discriminate. Qed. Hint Resolve lt_O_nat_of_P: arith. Theorem odd_even_lem : forall p q, 2 * p + 1 <> 2 * q. intros p; elim p; auto. (* Goal: forall q : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) O) (S O)) (Init.Nat.mul (S (S O)) q)) *) (* Goal: forall (n : nat) (_ : forall q : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) n) (S O)) (Init.Nat.mul (S (S O)) q))) (q : nat), not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (S n)) (S O)) (Init.Nat.mul (S (S O)) q)) *) intros q; case q; simpl in |- *. (* Goal: not (@eq nat (S O) O) *) (* Goal: forall n : nat, not (@eq nat (S O) (S (Init.Nat.add n (S (Init.Nat.add n O))))) *) (* Goal: forall (n : nat) (_ : forall q : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) n) (S O)) (Init.Nat.mul (S (S O)) q))) (q : nat), not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (S n)) (S O)) (Init.Nat.mul (S (S O)) q)) *) red in |- *; intros; discriminate. intros q'; rewrite (fun x y => plus_comm x (S y)); simpl in |- *; red in |- *; (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros; discriminate. (* Goal: forall (n : nat) (_ : forall q : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) n) (S O)) (Init.Nat.mul (S (S O)) q))) (q : nat), not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (S n)) (S O)) (Init.Nat.mul (S (S O)) q)) *) intros p' H q; case q. (* Goal: not (@eq nat (S O) O) *) (* Goal: forall n : nat, not (@eq nat (S O) (S (Init.Nat.add n (S (Init.Nat.add n O))))) *) (* Goal: forall (n : nat) (_ : forall q : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) n) (S O)) (Init.Nat.mul (S (S O)) q))) (q : nat), not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (S n)) (S O)) (Init.Nat.mul (S (S O)) q)) *) simpl in |- *; red in |- *; intros; discriminate. (* Goal: forall n : nat, not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (S p')) (S O)) (Init.Nat.mul (S (S O)) (S n))) *) intros q'; red in |- *; intros H0; case (H q'). (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) p') (S O)) (Init.Nat.mul (S (S O)) q') *) replace (2 * q') with (2 * S q' - 2). rewrite <- H0; simpl in |- *; auto. repeat rewrite (fun x y => plus_comm x (S y)); simpl in |- *; auto. simpl in |- *; repeat rewrite (fun x y => plus_comm x (S y)); simpl in |- *; auto. case q'; simpl in |- *; auto. Qed. Theorem Pdivless_correct : forall bound p q base, 1 < nat_of_P base -> nat_of_P p <= nat_of_P q -> nat_of_P p = oZ (fst (fst (Pdivless bound p base q))) * exp (nat_of_P base) (snd (Pdivless bound p base q)) + oZ (snd (fst (Pdivless bound p base q))) /\ (oZ (fst (fst (Pdivless bound p base q))) < nat_of_P bound /\ oZ (snd (fst (Pdivless bound p base q))) < exp (nat_of_P base) (snd (Pdivless bound p base q))) /\ (forall bound', nat_of_P bound = nat_of_P base * bound' -> nat_of_P bound <= nat_of_P p -> nat_of_P bound <= nat_of_P base * oZ (fst (fst (Pdivless bound p base q)))). intros bound p q base Hb; generalize q; pattern p in |- *; apply well_founded_ind with (R := fun a b => nat_of_P a < nat_of_P b); auto; clear p q. apply wf_inverse_image with (R := lt); auto. exact lt_wf; auto. (* Goal: forall (x : positive) (_ : forall (y : positive) (_ : lt (Pos.to_nat y) (Pos.to_nat x)) (q : positive) (_ : le (Pos.to_nat y) (Pos.to_nat q)), and (@eq nat (Pos.to_nat y) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound y base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat y)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound y base q)))))))) (q : positive) (_ : le (Pos.to_nat x) (Pos.to_nat q)), and (@eq nat (Pos.to_nat x) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound x base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound x base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound x base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound x base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound x base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound x base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat x)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound x base q))))))) *) intros p Rec q Hq. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) case (compare_SUP_dec bound p); intros H1. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) rewrite Pdivless1; auto; simpl in |- *. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat p) (S O)) O)) (and (and (lt (Pos.to_nat p) (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p)))) *) (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) repeat (split; auto with arith). ring; auto. apply nat_of_P_lt_Lt_compare_morphism; apply ZC1; auto. intros bound' H'1 H2; Contradict H2; apply lt_not_le; apply nat_of_P_lt_Lt_compare_morphism; apply ZC1; auto. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) rewrite Pdivless2; auto; simpl in |- *. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (o, o0) := Pdiv p base in match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))))))) *) generalize (Pdiv_correct p base); case (Pdiv p base); simpl in |- *. (* Goal: forall (o o0 : Option positive) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ o) (Pos.to_nat base)) (oZ o0))) (lt (oZ o0) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ q1 => match o0 with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound q1 base length' in let (s2, o1) := p in match o1 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive q1) (None positive)) O end end | @None _ => match o0 with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end end)))))) *) intros o1; case o1; simpl in |- *. (* Goal: forall (x : positive) (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat x) (Pos.to_nat base)) (oZ o))) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) r1))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive r1)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end | @None _ => match q with | xI length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound x base length' in let (s2, o0) := p in match o0 with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive x) (None positive)) O end end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o1' o2; case o2; simpl in |- *. (* Goal: forall (x : positive) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Pos.to_nat x))) (lt (Pos.to_nat x) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.add (Pos.mul r2 base) x))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive x)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o2' (Ho1, Ho2). generalize Hq; case q; simpl in |- *; auto. intros p0 Hq0; (cut (nat_of_P o1' <= nat_of_P p0); [ intros Hrec | idtac ]). (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) cut (nat_of_P o1' < nat_of_P p); [ intros Hrec1 | idtac ]. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) generalize (Rec _ Hrec1 _ Hrec). (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) CaseEq (Pdivless bound o1' base p0); simpl in |- *. (* Goal: forall (p1 : prod (Option positive) (Option positive)) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat p1 n)) (_ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n)) (oZ (@snd (Option positive) (Option positive) p1)))) (and (and (lt (oZ (@fst (Option positive) (Option positive) p1)) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) p1)))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros p1; case p1; simpl in |- *. intros o3; case o3; simpl in |- *; auto. intros o3' o4; case o4; simpl in |- *; auto. intros o4' n Eq1; rewrite nat_of_P_plus_morphism; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat o2')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (S (nat_of_P o4') * nat_of_P base). simpl in |- *; rewrite (fun x y => plus_comm x (nat_of_P y)); auto with arith. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (nat_of_P base * 1); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) inversion Eq1. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- H0. case (le_or_lt bound' (nat_of_P o1')); intros H'8; auto. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. Contradict H'6; auto. apply lt_not_le; rewrite Ho1; auto. apply lt_le_trans with (nat_of_P o1' * nat_of_P base + 1 * nat_of_P base); auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) simpl in |- *; auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- mult_plus_distr_r. replace (nat_of_P o1' + 1) with (S (nat_of_P o1')); auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) bound') *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- (fun x y => mult_comm (nat_of_P x) y); auto with arith. (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite plus_comm; auto with arith. (* Goal: @eq comparison (Pos.compare_cont Eq bound p) Gt *) apply nat_of_P_gt_Gt_compare_complement_morphism; auto with arith. (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4; case o4; simpl in |- *. intros o4' n Eq1; rewrite nat_of_P_plus_morphism; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat o2')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (S (nat_of_P o4') * nat_of_P base). simpl in |- *; rewrite (fun x y => plus_comm x (nat_of_P y)); auto with arith. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (nat_of_P base * 1); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. rewrite Ho1; auto. apply lt_le_trans with (nat_of_P o1' * 1 + nat_of_P o2'); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. (* Goal: lt (Pos.to_nat o1') (Init.Nat.add (Nat.add (Pos.to_nat o1') O) (Pos.to_nat o2')) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) (Pos.to_nat o2')) (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_lt_trans with (nat_of_P o1' + 0); auto with arith. (* Goal: lt (Init.Nat.add (Pos.to_nat o1') O) (Init.Nat.add (Nat.add (Pos.to_nat o1') O) (Pos.to_nat o2')) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) (Pos.to_nat o2')) (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply plus_le_lt_compat; auto with arith. (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply mult_S_le_reg_l with (n := pred (nat_of_P base)). (* Goal: le (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat o1')) (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat p0)) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (S (pred (nat_of_P base))) with (nat_of_P base). apply (fun p n m : nat => plus_le_reg_l n m p) with (p := nat_of_P o2'). (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (plus_comm (nat_of_P o2')); simpl in |- *; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (mult_comm (nat_of_P base)); simpl in |- *; auto with arith. (* Goal: le (Nat.add (Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.add (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0))) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- Ho1; auto with arith. (* Goal: le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_trans with (1 := Hq0); auto with arith. replace (nat_of_P (xI p0)) with (1 + 2 * nat_of_P p0); auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply plus_le_compat; auto with arith. (* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (Pos.to_nat (xO p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) unfold nat_of_P in |- *; simpl in |- *; (rewrite ZL6; auto). generalize (lt_O_nat_of_P base); case (nat_of_P base); simpl in |- *; auto; intros tmp; inversion tmp. intros p0 Hq0; (cut (nat_of_P o1' <= nat_of_P p0); [ intros Hrec | idtac ]). (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) cut (nat_of_P o1' < nat_of_P p); [ intros Hrec1 | idtac ]. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) generalize (Rec _ Hrec1 _ Hrec). (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) CaseEq (Pdivless bound o1' base p0); simpl in |- *. (* Goal: forall (p1 : prod (Option positive) (Option positive)) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat p1 n)) (_ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n)) (oZ (@snd (Option positive) (Option positive) p1)))) (and (and (lt (oZ (@fst (Option positive) (Option positive) p1)) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) p1)))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros p1; case p1; simpl in |- *. intros o3; case o3; simpl in |- *; auto. intros o3' o4; case o4; simpl in |- *; auto. intros o4' n Eq1; rewrite nat_of_P_plus_morphism; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat o2')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (S (nat_of_P o4') * nat_of_P base). simpl in |- *; rewrite (fun x y => plus_comm x (nat_of_P y)); auto with arith. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (nat_of_P base * 1); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) inversion Eq1. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- H0. case (le_or_lt bound' (nat_of_P o1')); intros H'8; auto. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. Contradict H'6; auto. apply lt_not_le; rewrite Ho1; auto. apply lt_le_trans with (nat_of_P o1' * nat_of_P base + 1 * nat_of_P base); auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) simpl in |- *; auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- mult_plus_distr_r. replace (nat_of_P o1' + 1) with (S (nat_of_P o1')); auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) bound') *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- (fun x y => mult_comm (nat_of_P x) y); auto with arith. (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite plus_comm; auto with arith. (* Goal: @eq comparison (Pos.compare_cont Eq bound p) Gt *) apply nat_of_P_gt_Gt_compare_complement_morphism; auto with arith. (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4; case o4; simpl in |- *. intros o4' n Eq1; rewrite nat_of_P_plus_morphism; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat o2')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (S (nat_of_P o4') * nat_of_P base). simpl in |- *; rewrite (fun x y => plus_comm x (nat_of_P y)); auto with arith. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (nat_of_P base * 1); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. rewrite Ho1; auto. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. apply lt_le_trans with (nat_of_P o1' * 1 + nat_of_P o2'); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. (* Goal: lt (Pos.to_nat o1') (Init.Nat.add (Nat.add (Pos.to_nat o1') O) (Pos.to_nat o2')) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) (Pos.to_nat o2')) (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_lt_trans with (nat_of_P o1' + 0); auto with arith. (* Goal: lt (Init.Nat.add (Pos.to_nat o1') O) (Init.Nat.add (Nat.add (Pos.to_nat o1') O) (Pos.to_nat o2')) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) (Pos.to_nat o2')) (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply plus_le_lt_compat; auto with arith. (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; auto with arith. (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply mult_S_le_reg_l with (n := pred (nat_of_P base)). (* Goal: le (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat o1')) (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat p0)) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (S (pred (nat_of_P base))) with (nat_of_P base). apply (fun p n m : nat => plus_le_reg_l n m p) with (p := nat_of_P o2'). (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (plus_comm (nat_of_P o2')); simpl in |- *; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (mult_comm (nat_of_P base)); simpl in |- *; auto with arith. (* Goal: le (Nat.add (Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Pos.to_nat o2')) (Init.Nat.add (Pos.to_nat o2') (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0))) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall _ : le (Pos.to_nat p) (Pos.to_nat xH), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match q with | xI length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xO length' => let (p, n) := Pdivless bound o1' base length' in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end | xH => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive o1') (None positive)) O end)))))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- Ho1; auto with arith. (* Goal: le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_trans with (1 := Hq0); auto with arith. replace (nat_of_P (xO p0)) with (0 + 2 * nat_of_P p0); auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply plus_le_compat; auto with arith. (* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (Pos.to_nat (xO p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) unfold nat_of_P in |- *; simpl in |- *; (rewrite ZL6; auto). generalize (lt_O_nat_of_P base); case (nat_of_P base); simpl in |- *; auto; intros tmp; inversion tmp. (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (nat_of_P 1) with 1; auto with arith. rewrite Ho1; generalize (lt_O_nat_of_P o2'); (case (nat_of_P o2'); simpl in |- *). (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. generalize (lt_O_nat_of_P o1'); (case (nat_of_P o1'); simpl in |- *). (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. generalize (lt_O_nat_of_P base); (case (nat_of_P base); simpl in |- *). (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. intros n H n0 H0 n1 H01; rewrite (fun x y => plus_comm x (S y)); simpl in |- *. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. generalize Hq; case q; simpl in |- *; auto. intros p0 Hq0 (Ho1, Ho2); (cut (nat_of_P o1' <= nat_of_P p0); [ intros Hrec | idtac ]). (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) cut (nat_of_P o1' < nat_of_P p); [ intros Hrec1 | idtac ]. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) generalize (Rec _ Hrec1 _ Hrec). (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) CaseEq (Pdivless bound o1' base p0); simpl in |- *. (* Goal: forall (p1 : prod (Option positive) (Option positive)) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat p1 n)) (_ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n)) (oZ (@snd (Option positive) (Option positive) p1)))) (and (and (lt (oZ (@fst (Option positive) (Option positive) p1)) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) p1)))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros p1; case p1; simpl in |- *. intros o3; case o3; simpl in |- *; auto. intros o3' o4; case o4; simpl in |- *; auto. (* Goal: forall (x : positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive x)) n)) (_ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat x)) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat x) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat (Pos.mul x base))) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat (Pos.mul x base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4' n Eq1; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_le_trans with (nat_of_P base * 1); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) inversion Eq1. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- H0. case (le_or_lt bound' (nat_of_P o1')); intros H'8; auto. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. Contradict H'6; auto. apply lt_not_le; rewrite Ho1; auto. apply lt_le_trans with (nat_of_P o1' * nat_of_P base + 1 * nat_of_P base); auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) simpl in |- *; auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- mult_plus_distr_r. replace (nat_of_P o1' + 1) with (S (nat_of_P o1')); auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) bound') *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- (fun x y => mult_comm (nat_of_P x) y); auto with arith. (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite plus_comm; auto with arith. (* Goal: @eq comparison (Pos.compare_cont Eq bound p) Gt *) apply nat_of_P_gt_Gt_compare_complement_morphism; auto with arith. (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4; case o4; simpl in |- *. (* Goal: forall (x : positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive x)) n)) (_ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat x)) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat x) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat (Pos.mul x base))) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat (Pos.mul x base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4' n Eq1; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, (H'2, H'3)). (* Goal: and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) generalize (lt_O_nat_of_P o1'); rewrite H'1; intros tmp; inversion tmp. rewrite Ho1; auto. (* Goal: lt (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_lt_trans with (nat_of_P o1' * 1 + 0); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) repeat rewrite (fun x => plus_comm x 0); simpl in |- *; auto with arith. (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply mult_S_le_reg_l with (n := pred (nat_of_P base)). (* Goal: le (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat o1')) (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat p0)) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (S (pred (nat_of_P base))) with (nat_of_P base). (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (mult_comm (nat_of_P base)); simpl in |- *; auto with arith. (* Goal: le (Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x => plus_comm x 0) in Ho1; simpl in Ho1; rewrite <- Ho1. generalize Hq0; clear Hq0; replace (nat_of_P (xI p0)) with (2 * nat_of_P p0 + 1); try intros Hq0. case (le_lt_or_eq _ _ Hq0); auto. (* Goal: forall _ : lt (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)), le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)), le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => plus_comm x (S y)); intros Hl1. (* Goal: le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)), le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_trans with (2 * nat_of_P p0); auto with arith. generalize Hb Ho1; case (nat_of_P base); auto. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. (* Goal: forall (n : nat) (_ : lt (S O) (S n)) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S n))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S n) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros base'; case base'. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. (* Goal: forall (n : nat) (_ : lt (S O) (S (S n))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros base''; case base''. replace (nat_of_P (xI p0)) with (1 + 2 * nat_of_P p0); auto with arith. (* Goal: forall (_ : lt (S O) (S (S O))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S O)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.mul (S (S O)) (Pos.to_nat p0))) (Pos.to_nat (xI p0)) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S (S n))))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros Hb0 Ho0 H; Contradict H; rewrite Ho0. (* Goal: not (@eq nat (Init.Nat.mul (Pos.to_nat o1') (S (S O))) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.mul (S (S O)) (Pos.to_nat p0))) (Pos.to_nat (xI p0)) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S (S n))))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (S y)). (* Goal: not (@eq nat (Nat.mul (S (S O)) (Pos.to_nat o1')) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.mul (S (S O)) (Pos.to_nat p0))) (Pos.to_nat (xI p0)) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S (S n))))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply Compare.not_eq_sym. (* Goal: not (@eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Nat.mul (S (S O)) (Pos.to_nat o1'))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.mul (S (S O)) (Pos.to_nat p0))) (Pos.to_nat (xI p0)) *) (* Goal: forall (n : nat) (_ : lt (S O) (S (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S (S n))))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply odd_even_lem. (* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (Pos.to_nat (xO p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) unfold nat_of_P in |- *; simpl in |- *; (rewrite ZL6; auto). (* Goal: forall (n : nat) (_ : lt (S O) (S (S (S n)))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o1') (S (S (S n))))) (_ : @eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O))), le (Pos.to_nat p) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Hb0 Ho0 H; rewrite H. apply le_trans with (S (S n) * nat_of_P p0 + nat_of_P p0); auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (S (S n)) (Pos.to_nat p0)) (Pos.to_nat p0)) (Init.Nat.mul (S (S (S n))) (Pos.to_nat p0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (S O)) (Pos.to_nat (xI p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (p0 : positive) (_ : le (Pos.to_nat p) (Pos.to_nat (xO p0))) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply plus_le_compat; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite plus_comm; simpl in |- *; auto with arith. rewrite plus_comm; unfold nat_of_P in |- *; simpl in |- *; (rewrite ZL6; unfold nat_of_P in |- *; auto). generalize (lt_O_nat_of_P base); case (nat_of_P base); simpl in |- *; auto; intros tmp; inversion tmp. intros p0 Hq0 (Ho1, Ho2); (cut (nat_of_P o1' <= nat_of_P p0); [ intros Hrec | idtac ]). (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) cut (nat_of_P o1' < nat_of_P p); [ intros Hrec1 | idtac ]. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) generalize (Rec _ Hrec1 _ Hrec). (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound o1' base p0))))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (p, n) := Pdivless bound o1' base p0 in let (s2, o) := p in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) CaseEq (Pdivless bound o1' base p0); simpl in |- *. (* Goal: forall (p1 : prod (Option positive) (Option positive)) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat p1 n)) (_ : and (@eq nat (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n)) (oZ (@snd (Option positive) (Option positive) p1)))) (and (and (lt (oZ (@fst (Option positive) (Option positive) p1)) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) p1)) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) p1)))))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (let (s2, o) := p1 in match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) s2 (None positive)) (S n) end))))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros p1; case p1; simpl in |- *. intros o3; case o3; simpl in |- *; auto. intros o3' o4; case o4; simpl in |- *; auto. (* Goal: forall (x : positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive x)) n)) (_ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat x)) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat x) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat (Pos.mul x base))) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat (Pos.mul x base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4' n Eq1; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace 0 with (0 * exp (nat_of_P base) n); auto with arith. intros bound' H'5 H'6; case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'7; auto. apply (H'4 bound'); auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) inversion Eq1. (* Goal: le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o3')) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- H0. case (le_or_lt bound' (nat_of_P o1')); intros H'8; auto. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. Contradict H'6; auto. apply lt_not_le; rewrite Ho1; auto. apply lt_le_trans with (nat_of_P o1' * nat_of_P base + 1 * nat_of_P base); auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) simpl in |- *; auto with arith. (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- mult_plus_distr_r. replace (nat_of_P o1' + 1) with (S (nat_of_P o1')); auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Pos.to_nat bound) *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H'5; auto with arith. (* Goal: le (Nat.mul (S (Pos.to_nat o1')) (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) bound') *) (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite <- (fun x y => mult_comm (nat_of_P x) y); auto with arith. (* Goal: @eq nat (S (Pos.to_nat o1')) (Init.Nat.add (Pos.to_nat o1') (S O)) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite plus_comm; auto with arith. (* Goal: @eq comparison (Pos.compare_cont Eq bound p) Gt *) apply nat_of_P_gt_Gt_compare_complement_morphism; auto with arith. (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4; case o4; simpl in |- *. (* Goal: forall (x : positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive x)) n)) (_ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat x)) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat x) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Pos.to_nat (Pos.mul x base))) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat (Pos.mul x base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o4' n Eq1; rewrite nat_of_P_mult_morphism. (* Goal: forall _ : and (@eq nat (Pos.to_nat o1') (Pos.to_nat o4')) (and (and (lt O (Pos.to_nat bound)) (lt (Pos.to_nat o4') (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))), and (@eq nat (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base))) (and (and (lt O (Pos.to_nat bound)) (lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt (Init.Nat.mul (Pos.to_nat o4') (Pos.to_nat base)) (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (fun x y => mult_comm x (nat_of_P y)); auto with arith. intros bound' H H0; apply (H'4 bound'); auto. case (le_or_lt (nat_of_P bound) (nat_of_P o1')); intros H'8; auto. rewrite Pdivless1 in Eq1; auto. (* Goal: le (Pos.to_nat bound) (Pos.to_nat o1') *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) discriminate. apply nat_of_P_gt_Gt_compare_complement_morphism; auto. (* Goal: forall (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) n)) (_ : and (@eq nat (Pos.to_nat o1') O) (and (and (lt O (Pos.to_nat bound)) (lt O (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n Eq1 (H'1, ((H'2, H'3), H'4)); repeat (split; auto). (* Goal: @eq nat (Pos.to_nat p) O *) (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; rewrite H'1; ring. (* Goal: lt O (Init.Nat.mul (Pos.to_nat base) (exp (Pos.to_nat base) n)) *) (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace 0 with (0 * exp (nat_of_P base) n); auto with arith. intros bound' H H0; Contradict H0; rewrite Ho1; rewrite H'1; simpl in |- *; auto with arith. (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite Ho1; auto with arith. (* Goal: lt (Pos.to_nat o1') (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_lt_trans with (nat_of_P o1' * 1 + 0); auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply mult_S_le_reg_l with (n := pred (nat_of_P base)). (* Goal: le (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat o1')) (Init.Nat.mul (S (Init.Nat.pred (Pos.to_nat base))) (Pos.to_nat p0)) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (S (pred (nat_of_P base))) with (nat_of_P base). apply le_trans with (nat_of_P p); auto. rewrite Ho1; rewrite (fun x => plus_comm x 0); simpl in |- *; auto. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite (mult_comm (nat_of_P base)); simpl in |- *; auto with arith. (* Goal: le (Pos.to_nat p) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply le_trans with (1 := Hq0); auto with arith. replace (nat_of_P (xO p0)) with (2 * nat_of_P p0); auto with arith. (* Goal: @eq nat (Init.Nat.mul (S (S O)) (Pos.to_nat p0)) (Pos.to_nat (xO p0)) *) (* Goal: @eq nat (Pos.to_nat base) (S (Init.Nat.pred (Pos.to_nat base))) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) unfold nat_of_P in |- *; simpl in |- *; (rewrite ZL6; auto). generalize (lt_O_nat_of_P base); case (nat_of_P base); simpl in |- *; auto; intros tmp; inversion tmp. (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) replace (nat_of_P 1) with 1; auto with arith. (* Goal: forall (_ : le (Pos.to_nat p) (S O)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros Hq0 (H, H0); Contradict Hq0. (* Goal: not (le (Pos.to_nat p) (S O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) apply lt_not_le. (* Goal: lt (S O) (Pos.to_nat p) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) rewrite H. generalize (lt_O_nat_of_P o1'); case (nat_of_P o1'); simpl in |- *; auto. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. (* Goal: forall (n : nat) (_ : lt O (S n)), lt (S O) (Init.Nat.add (Init.Nat.add (Pos.to_nat base) (Init.Nat.mul n (Pos.to_nat base))) O) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros n H2; generalize Hb. case (nat_of_P base); simpl in |- *; auto. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros base'; case base'; simpl in |- *; auto with arith. (* Goal: forall _ : lt (S O) (S O), lt (S O) (S (Init.Nat.add (Init.Nat.mul n (S O)) O)) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros tmp; Contradict tmp; auto with arith. (* Goal: lt (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) *) (* Goal: le (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) (Init.Nat.mul (S O) (Pos.to_nat base))) (Pos.to_nat bound) *) (* Goal: @eq comparison (Pos.compare_cont Eq bound o1') Gt *) (* Goal: forall (o : Option positive) (n : nat) (_ : @eq (prod (prod (Option positive) (Option positive)) nat) (Pdivless bound o1' base p0) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) o) n)) (_ : and (@eq nat (Pos.to_nat o1') (oZ o)) (and (and (lt O (Pos.to_nat bound)) (lt (oZ o) (exp (Pos.to_nat base) n))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat o1')), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O)))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r2 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive (Pos.mul r2 base))) (S n) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S n) end)))))) *) (* Goal: lt (Pos.to_nat o1') (Pos.to_nat p) *) (* Goal: le (Pos.to_nat o1') (Pos.to_nat p0) *) (* Goal: forall (_ : le (Pos.to_nat p) (Pos.to_nat xH)) (_ : and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (Pos.to_nat base)) O)) (lt O (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat o1') (S O)) O)) (and (and (lt (Pos.to_nat o1') (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat o1')))) *) (* Goal: forall (o : Option positive) (_ : and (@eq nat (Pos.to_nat p) (oZ o)) (lt (oZ o) (Pos.to_nat base))), and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat match o with | @Some _ r1 => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (Some positive r1)) (S O) | @None _ => @pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (None positive) (None positive)) (S O) end)))))) *) intros o2; case o2; simpl in |- *; auto with arith. (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (Pos.to_nat p) (S O)) O)) (and (and (lt (Pos.to_nat p) (Pos.to_nat bound)) (lt O (S O))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (Pos.to_nat p)))) *) (* Goal: and (@eq nat (Pos.to_nat p) (Init.Nat.add (Init.Nat.mul (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))))) (and (and (lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (Pos.to_nat bound)) (lt (oZ (@snd (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q)))) (exp (Pos.to_nat base) (@snd (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (Pdivless bound p base q))))))) *) intros o2' (Ho1, Ho2); repeat (split; auto with arith). (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. (* Goal: forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) intros bound' H H0; Contradict Ho2. (* Goal: not (lt (Pos.to_nat o2') (Pos.to_nat base)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) apply le_not_lt. (* Goal: le (Pos.to_nat base) (Pos.to_nat o2') *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite <- Ho1. (* Goal: le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) generalize H; case bound'. (* Goal: forall _ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O), le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (S n))), le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto. intros Eq2; generalize (lt_O_nat_of_P bound); rewrite Eq2; intros tmp; Contradict tmp; auto with arith. (* Goal: forall (n : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) (S n))), le (Pos.to_nat base) (Pos.to_nat p) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) intros n Eq2; apply le_trans with (nat_of_P bound); auto with arith. (* Goal: le (Pos.to_nat base) (Pos.to_nat bound) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite Eq2; auto with arith. (* Goal: le (Pos.to_nat base) (Init.Nat.mul (Pos.to_nat base) (S n)) *) (* Goal: forall _ : and (@eq nat (Pos.to_nat p) O) (lt O (Pos.to_nat base)), and (@eq nat (Pos.to_nat p) O) (and (and (lt O (Pos.to_nat bound)) (lt O (Init.Nat.mul (Pos.to_nat base) (S O)))) (forall (bound' : nat) (_ : @eq nat (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) bound')) (_ : le (Pos.to_nat bound) (Pos.to_nat p)), le (Pos.to_nat bound) (Init.Nat.mul (Pos.to_nat base) O))) *) rewrite mult_comm; simpl in |- *; auto with arith. intros (Ho1, Ho2); generalize (lt_O_nat_of_P p); rewrite Ho1; intros tmp; Contradict tmp; auto with arith. Qed. Definition PdivBound bound p base := Pdivless bound p base p. Theorem PdivBound_correct : forall bound p base, 1 < nat_of_P base -> nat_of_P p = oZ (fst (fst (PdivBound bound p base))) * exp (nat_of_P base) (snd (PdivBound bound p base)) + oZ (snd (fst (PdivBound bound p base))) /\ (oZ (fst (fst (PdivBound bound p base))) < nat_of_P bound /\ oZ (snd (fst (PdivBound bound p base))) < exp (nat_of_P base) (snd (PdivBound bound p base))) /\ (forall bound', nat_of_P bound = nat_of_P base * bound' -> nat_of_P bound <= nat_of_P p -> nat_of_P bound <= nat_of_P base * oZ (fst (fst (PdivBound bound p base)))). intros; unfold PdivBound in |- *; apply Pdivless_correct; auto. Qed. Theorem PdivBound_correct1 : forall bound p base, 1 < nat_of_P base -> nat_of_P p = oZ (fst (fst (PdivBound bound p base))) * exp (nat_of_P base) (snd (PdivBound bound p base)) + oZ (snd (fst (PdivBound bound p base))). (* Goal: forall (bound p base : positive) (_ : lt (S O) (Pos.to_nat base)), lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (PdivBound bound p base)))) (Pos.to_nat bound) *) intros bound p base H; generalize (PdivBound_correct bound p base); intuition. Qed. Theorem PdivBound_correct2 : forall bound p base, 1 < nat_of_P base -> oZ (fst (fst (PdivBound bound p base))) < nat_of_P bound. (* Goal: forall (bound p base : positive) (_ : lt (S O) (Pos.to_nat base)), lt (oZ (@fst (Option positive) (Option positive) (@fst (prod (Option positive) (Option positive)) nat (PdivBound bound p base)))) (Pos.to_nat bound) *) intros bound p base H; generalize (PdivBound_correct bound p base); intuition. Qed. Theorem PdivBound_correct3 : forall bound p base, nat_of_P p < nat_of_P bound -> PdivBound bound p base = (Some _ p, None _, 0). (* Goal: forall (bound p base : positive) (_ : lt (Pos.to_nat p) (Pos.to_nat bound)), @eq (prod (prod (Option positive) (Option positive)) nat) (PdivBound bound p base) (@pair (prod (Option positive) (Option positive)) nat (@pair (Option positive) (Option positive) (Some positive p) (None positive)) O) *) intros bound p base H; (unfold PdivBound in |- *; apply Pdivless1; auto). (* Goal: @eq comparison (Pos.compare_cont Eq bound p) Gt *) apply nat_of_P_gt_Gt_compare_complement_morphism; auto with arith. Qed. Theorem PdivBound_correct4 : forall bound p base bound', 1 < nat_of_P base -> nat_of_P bound = nat_of_P base * bound' -> nat_of_P bound <= nat_of_P p -> nat_of_P bound <= nat_of_P base * oZ (fst (fst (PdivBound bound p base))). intros bound p base bound' H H1 H2; case (PdivBound_correct bound p base); auto; intros H'1 (H'2, H'3); apply (H'3 bound'); auto with arith. Qed. Transparent Pdiv. (* Eval Compute in (PdivBound (anti_convert (9)) (times1 (anti_convert (10)) [x : ?] x (anti_convert (10))) (anti_convert (9))).*)
(**************************************************************************** IEEE754 : Fmin Laurent Thery ******************************************************************************) Require Export Zenum. Require Export FPred. Section FMinMax. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionNotZero : precision <> 0. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. (* a function that returns a boundd greater than a given nat *) Definition boundNat (n : nat) := Float 1%nat (digit radix n). Theorem boundNatCorrect : forall n : nat, (n < boundNat n)%R. (* Goal: forall n : nat, Rlt (INR n) (FtoRradix (boundNat n)) *) intros n; unfold FtoRradix, FtoR, boundNat in |- *; simpl in |- *. (* Goal: Rlt (INR n) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.of_nat (digit radix (Z.of_nat n))))) *) rewrite Rmult_1_l. (* Goal: Rlt (INR n) (powerRZ (IZR radix) (Z.of_nat (digit radix (Z.of_nat n)))) *) rewrite <- Zpower_nat_Z_powerRZ; auto with real zarith. (* Goal: Rle (IZR (up r)) (INR (Z.abs_nat (up r))) *) (* Goal: @eq R r (Rabs r) *) rewrite INR_IZR_INZ; auto with real zarith. (* Goal: Rlt (IZR (Z.of_nat n)) (IZR (Zpower_nat radix (digit radix (Z.of_nat n)))) *) apply Rle_lt_trans with (Zabs n); [rewrite (Zabs_eq (Z_of_nat n))|idtac];auto with real zarith. Qed. Theorem boundBoundNat : forall n : nat, Fbounded b (boundNat n). intros n; repeat split; unfold boundNat in |- *; simpl in |- *; (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) auto with zarith. apply vNumbMoreThanOne with (radix := radix) (precision := precision); (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) auto with zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.of_nat (digit radix (Z.of_nat n))) *) apply Zle_trans with 0%Z;[case (dExp b)|idtac]; auto with zarith. Qed. (* A function that returns a bounded greater than a given r *) Definition boundR (r : R) := boundNat (Zabs_nat (up (Rabs r))). Theorem boundRCorrect1 : forall r : R, (r < boundR r)%R. (* Goal: forall r : R, Rlt (FtoRradix (Fopp (boundR r))) r *) intros r; case (Rle_or_lt r 0); intros H'. (* Goal: Rlt r (FtoRradix (boundR r)) *) (* Goal: Rlt r (FtoRradix (boundR r)) *) apply Rle_lt_trans with (1 := H'). unfold boundR, boundNat, FtoRradix, FtoR in |- *; simpl in |- *; auto with real. (* Goal: Rlt (IZR Z0) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))))) *) (* Goal: Rlt r (FtoRradix (boundR r)) *) rewrite Rmult_1_l; auto with real zarith. (* Goal: Rlt r (FtoRradix (boundR r)) *) apply Rlt_trans with (2 := boundNatCorrect (Zabs_nat (up (Rabs r)))). (* Goal: Rlt r (INR (Z.abs_nat (up (Rabs r)))) *) replace (Rabs r) with r; auto with real. (* Goal: Rlt r (INR (Z.abs_nat (up r))) *) (* Goal: @eq R r (Rabs r) *) apply Rlt_le_trans with (r2 := IZR (up r)); auto with real zarith. (* Goal: Rlt r (IZR (up r)) *) (* Goal: Rle (IZR (up r)) (INR (Z.abs_nat (up r))) *) (* Goal: @eq R r (Rabs r) *) case (archimed r); auto. (* Goal: Rle (IZR (up r)) (INR (Z.abs_nat (up r))) *) (* Goal: @eq R r (Rabs r) *) rewrite INR_IZR_INZ; auto with real zarith. (* Goal: @eq R r (Rabs r) *) unfold Rabs in |- *; case (Rcase_abs r); auto with real. (* Goal: forall _ : Rlt r (IZR Z0), @eq R r (Ropp r) *) intros H'0; Contradict H'0; auto with real. Qed. Theorem boundRrOpp : forall r : R, boundR r = boundR (- r). (* Goal: forall r : R, @eq float (boundR r) (boundR (Ropp r)) *) intros R; unfold boundR in |- *. (* Goal: @eq float (boundNat (Z.abs_nat (up (Rabs R)))) (boundNat (Z.abs_nat (up (Rabs (Ropp R))))) *) rewrite Rabs_Ropp; auto. Qed. Theorem boundRCorrect2 : forall r : R, (Fopp (boundR r) < r)%R. (* Goal: forall r : R, Rlt (FtoRradix (Fopp (boundR r))) r *) intros r; case (Rle_or_lt r 0); intros H'. (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) rewrite boundRrOpp. (* Goal: Rlt (FtoRradix (Fopp (boundR (Ropp r)))) r *) (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) pattern r at 2 in |- *; rewrite <- (Ropp_involutive r). (* Goal: isMin (FtoRradix (Fopp p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rlt (Ropp (FtoR radix (boundR (Ropp r)))) (Ropp (Ropp r)) *) (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) apply Ropp_lt_contravar; apply boundRCorrect1; auto. (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) apply Rle_lt_trans with 0%R; auto. (* Goal: Rle (FtoRradix (Fopp (boundR r))) (IZR Z0) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMin (FtoRradix (Fopp p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (Ropp (Ropp (FtoR radix f))) (Ropp (FtoR radix p)) *) apply Ropp_le_contravar. unfold boundR, boundNat, FtoRradix, FtoR in |- *; simpl in |- *; auto with real zarith. (* Goal: Rle (IZR Z0) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))))) *) rewrite Rmult_1_l; apply Rlt_le; auto with real zarith arith. Qed. (* A function that returns a list containing all the bounded smaller than a given real *) Definition mBFloat (p : R) := map (fun p : Z * Z => Float (fst p) (snd p)) (mProd Z Z (Z * Z) (mZlist (- pPred (vNum b)) (pPred (vNum b))) (mZlist (- dExp b) (Fexp (boundR p)))). Theorem mBFadic_correct1 : forall (r : R) (q : float), ~ is_Fzero q -> (Fopp (boundR r) < q)%R -> (q < boundR r)%R -> Fbounded b q -> In q (mBFloat r). (* Goal: forall (r : R) (q : float) (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) intros r q. (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) case (Zle_or_lt (Fexp (boundR r)) (Fexp q)); intros H'. (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) intros H'0 H'1 H'2 H'3; case H'0. (* Goal: is_Fzero q *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) apply is_Fzero_rep2 with (radix := radix); auto. rewrite <- FshiftCorrect with (n := Zabs_nat (Fexp q - Fexp (boundR r))) (x := q); auto with arith. (* Goal: @eq R (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (IZR Z0) *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) apply is_Fzero_rep1 with (radix := radix). (* Goal: is_Fzero (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q) *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) unfold is_Fzero in |- *. cut (forall p : Z, (- 1%nat < p)%Z -> (p < 1%nat)%Z -> p = 0%Z); [ intros tmp; apply tmp | idtac ]. (* Goal: Z.lt (Z.opp (Z.of_nat (S O))) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) replace (- 1%nat)%Z with (Fnum (Fopp (boundR r))). (* Goal: Z.lt (Fnum (Fopp (boundR r))) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) *) (* Goal: @eq Z (Fnum (Fopp (boundR r))) (Z.opp (Z.of_nat (S O))) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with real zarith. (* Goal: Rlt (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (FtoR radix (boundR r)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Fexp (boundR r)) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) rewrite FshiftCorrect; auto. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Fexp (boundR r)) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))) (Z.sub (Fexp q) (Z.of_nat (Z.abs_nat (Z.sub (Fexp q) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))))))) *) (* Goal: @eq Z (Fnum (Fopp (boundR r))) (Z.opp (Z.of_nat (S O))) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) rewrite (fun x y => inj_abs (x - y)); auto with zarith. (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) simpl in |- *; auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) replace (Z_of_nat 1) with (Fnum (boundR r)). (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Fnum (boundR r)) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with zarith. (* Goal: Rlt (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (FtoR radix (boundR r)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Fexp (boundR r)) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) rewrite FshiftCorrect; auto. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp (boundR r)))) q)) (Fexp (boundR r)) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.sub (Fexp q) (Z.of_nat (Z.abs_nat (Z.sub (Fexp q) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))))))) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) rewrite inj_abs; auto with zarith. (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) generalize H'; simpl in |- *; auto with zarith. (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) simpl in |- *; auto. (* Goal: forall (p : Z) (_ : Z.lt (Zneg xH) p) (_ : Z.lt p (Zpos xH)), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) intros p0; case p0; simpl in |- *; auto with zarith. (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) intros H'0 H'1 H'2 H'3; unfold mBFloat in |- *. replace q with ((fun p : Z * Z => Float (fst p) (snd p)) (Fnum q, Fexp q)). apply in_map with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: @In (prod Z Z) (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p)))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mProd_correct; auto. (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply mZlist_correct; auto with float. (* Goal: Z.le (Z.opp (pPred (vNum b))) (Fnum q) *) (* Goal: Z.le (Fnum q) (pPred (vNum b)) *) (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zle_Zabs_inv1; auto with float. (* Goal: Z.le (Z.abs (Fnum q)) (pPred (vNum b)) *) (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold pPred in |- *; apply Zle_Zpred; auto with float. (* Goal: Z.le (Fnum q) (pPred (vNum b)) *) (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zle_Zabs_inv2; auto with float. (* Goal: Z.le (Z.abs (Fnum q)) (pPred (vNum b)) *) (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold pPred in |- *; apply Zle_Zpred; auto with float. (* Goal: @In Z (Fexp q) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply mZlist_correct; auto with float. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case q; simpl in |- *; auto with zarith. Qed. Theorem mBFadic_correct2 : forall r : R, In (boundR r) (mBFloat r). (* Goal: forall r : R, @In float (Fopp (boundR r)) (mBFloat r) *) intros r; unfold mBFloat in |- *. replace (boundR r) with ((fun p : Z * Z => Float (fst p) (snd p)) (Fnum (boundR r), Fexp (boundR r))). apply in_map with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: @In (prod Z Z) (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p)))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mProd_correct; auto. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zle_trans with (- (0))%Z; auto with zarith. (* Goal: Z.le (Z.opp (pPred (vNum b))) (Z.opp Z0) *) (* Goal: Z.le (Fnum (boundR r)) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (boundR r)) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))) (boundR r) *) apply Zle_Zopp; unfold pPred in |- *; apply Zle_Zpred; simpl in |- *. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zlt_trans with 1%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) (* Goal: @In Z (Fexp (boundR r)) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))) (boundR r) *) apply vNumbMoreThanOne with (3 := pGivesBound); auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fnum (Fopp (boundR r))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Fopp (boundR r))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r))))) (@snd Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r)))))) (Fopp (boundR r)) *) unfold pPred in |- *; apply Zle_Zpred; simpl in |- *. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) (* Goal: @In Z (Fexp (boundR r)) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))) (boundR r) *) apply vNumbMoreThanOne with (3 := pGivesBound); auto. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))) *) (* Goal: Z.le (Fexp (boundR r)) (Fexp (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r)))) (@snd Z Z (@pair Z Z (Fnum (boundR r)) (Fexp (boundR r))))) (boundR r) *) apply Zle_trans with 0%Z; auto with zarith arith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (dExp b); auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (boundR r); simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (boundR r); simpl in |- *; auto with zarith. Qed. Theorem mBFadic_correct3 : forall r : R, In (Fopp (boundR r)) (mBFloat r). (* Goal: forall r : R, @In float (Fopp (boundR r)) (mBFloat r) *) intros r; unfold mBFloat in |- *. replace (Fopp (boundR r)) with ((fun p : Z * Z => Float (fst p) (snd p)) (Fnum (Fopp (boundR r)), Fexp (Fopp (boundR r)))). apply in_map with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: @In (prod Z Z) (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p)))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mProd_correct; auto. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) replace (-1)%Z with (- Z_of_nat 1)%Z; auto with zarith. (* Goal: Z.le (Z.opp (pPred (vNum b))) (Z.opp (Z.of_nat (S O))) *) (* Goal: Z.le (Fnum (Fopp (boundR r))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Fopp (boundR r))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r))))) (@snd Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r)))))) (Fopp (boundR r)) *) apply Zle_Zopp. (* Goal: Z.le (Fnum (Fopp (boundR r))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Fopp (boundR r))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r))))) (@snd Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r)))))) (Fopp (boundR r)) *) unfold pPred in |- *; apply Zle_Zpred; simpl in |- *. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) auto with zarith. (* Goal: Z.le (Fnum (Fopp (boundR r))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Fopp (boundR r))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r))))) (@snd Z Z (@pair Z Z (Fnum (Fopp (boundR r))) (Fexp (Fopp (boundR r)))))) (Fopp (boundR r)) *) unfold pPred in |- *; apply Zle_Zpred; simpl in |- *. (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) red in |- *; simpl in |- *; auto. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zle_trans with 0%Z; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (dExp b); auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (boundR r); simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (boundR r); simpl in |- *; auto with zarith. Qed. Theorem mBFadic_correct4 : forall r : R, In (Float 0%nat (- dExp b)) (mBFloat r). (* Goal: forall r : R, @In float (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) (mBFloat r) *) intros p; unfold mBFloat in |- *. replace (Float 0%nat (- dExp b)) with ((fun p : Z * Z => Float (fst p) (snd p)) (Fnum (Float 0%nat (- dExp b)), Fexp (Float 0%nat (- dExp b)))). apply in_map with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: @In (prod Z Z) (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p)))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mProd_correct; auto. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) simpl in |- *; auto with zarith. (* Goal: Z.le (Z.opp (pPred (vNum b))) Z0 *) (* Goal: Z.le (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) replace 0%Z with (- (0))%Z; [ idtac | simpl in |- *; auto ]. (* Goal: Z.le (Z.opp (pPred (vNum b))) (Z.opp Z0) *) (* Goal: Z.le (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply Zle_Zopp; unfold pPred in |- *; apply Zle_Zpred. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) red in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) simpl in |- *; auto with zarith. (* Goal: Z.le Z0 (pPred (vNum b)) *) (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) unfold pPred in |- *; apply Zle_Zpred. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) red in |- *; simpl in |- *; auto with zarith. (* Goal: @In Z (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR p))) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))))) (@snd Z Z (@pair Z Z (Fnum (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (Fexp (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))))))) (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) *) apply mZlist_correct; auto. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) unfold boundR, boundNat in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) apply Zle_trans with 0%Z; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) case (dExp b); auto with zarith. (* Goal: Z.le (Fexp q) (Fexp (boundR r)) *) (* Goal: @eq float (Float (@fst Z Z (@pair Z Z (Fnum q) (Fexp q))) (@snd Z Z (@pair Z Z (Fnum q) (Fexp q)))) q *) simpl in |- *; auto with zarith. Qed. Theorem mBPadic_Fbounded : forall (p : float) (r : R), In p (mBFloat r) -> Fbounded b p. (* Goal: forall (p : float) (r : R) (_ : @In float p (mBFloat r)), Fbounded b p *) intros p r H'; red in |- *; repeat (split; auto). (* Goal: Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp p) *) apply Zpred_Zle_Zabs_intro. apply mZlist_correct_rev1 with (q := Zpred (Zpos (vNum b))); auto with real. apply mProd_correct_rev1 with (l2 := mZlist (- dExp b) (Fexp (boundR r))) (C := (Z * Z)%type) (b := Fexp p); auto. apply in_map_inv with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: forall (a b : prod Z Z) (_ : @eq float (Float (@fst Z Z a) (@snd Z Z a)) (Float (@fst Z Z b) (@snd Z Z b))), @eq (prod Z Z) a b *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros a1 b1; case a1; case b1; simpl in |- *. (* Goal: forall (z z0 z1 z2 : Z) (_ : @eq float (Float z1 z2) (Float z z0)), @eq (prod Z Z) (@pair Z Z z1 z2) (@pair Z Z z z0) *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros z z0 z1 z2 H'0; inversion H'0; auto. (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) generalize H'; case p; auto. apply mZlist_correct_rev2 with (p := (- Zpred (Zpos (vNum b)))%Z); auto. apply mProd_correct_rev1 with (l2 := mZlist (- dExp b) (Fexp (boundR r))) (C := (Z * Z)%type) (b := Fexp p); auto. apply in_map_inv with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: forall (a b : prod Z Z) (_ : @eq float (Float (@fst Z Z a) (@snd Z Z a)) (Float (@fst Z Z b) (@snd Z Z b))), @eq (prod Z Z) a b *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros a1 b1; case a1; case b1; simpl in |- *. (* Goal: forall (z z0 z1 z2 : Z) (_ : @eq float (Float z1 z2) (Float z z0)), @eq (prod Z Z) (@pair Z Z z1 z2) (@pair Z Z z z0) *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros z z0 z1 z2 H'0; inversion H'0; auto. (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) generalize H'; case p; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp p) *) apply mZlist_correct_rev1 with (q := Fexp (boundR r)); auto. apply mProd_correct_rev2 with (l1 := mZlist (- pPred (vNum b)) (pPred (vNum b))) (C := (Z * Z)%type) (a := Fnum p); auto. apply in_map_inv with (f := fun p : Z * Z => Float (fst p) (snd p)); auto. (* Goal: forall (a b : prod Z Z) (_ : @eq float (Float (@fst Z Z a) (@snd Z Z a)) (Float (@fst Z Z b) (@snd Z Z b))), @eq (prod Z Z) a b *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros a1 b1; case a1; case b1; simpl in |- *. (* Goal: forall (z z0 z1 z2 : Z) (_ : @eq float (Float z1 z2) (Float z z0)), @eq (prod Z Z) (@pair Z Z z1 z2) (@pair Z Z z z0) *) (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) intros z z0 z1 z2 H'0; inversion H'0; auto. (* Goal: @In float (Float (@fst Z Z (@pair Z Z (Fnum p) (Fexp p))) (@snd Z Z (@pair Z Z (Fnum p) (Fexp p)))) (@map (prod Z Z) float (fun p : prod Z Z => Float (@fst Z Z p) (@snd Z Z p)) (mProd Z Z (prod Z Z) (mZlist (Z.opp (pPred (vNum b))) (pPred (vNum b))) (mZlist (Z.opp (Z.of_N (dExp b))) (Fexp (boundR r))))) *) generalize H'; case p; auto. Qed. (* Some general properties of rounded predicate : -Projector A bounded is rounded to something equal to itself - Monotone : the rounded predicate is monotone *) Definition ProjectorP (P : R -> float -> Prop) := forall p q : float, Fbounded b p -> P p q -> p = q :>R. Definition MonotoneP (P : R -> float -> Prop) := forall (p q : R) (p' q' : float), (p < q)%R -> P p p' -> P q q' -> (p' <= q')%R. (* What it is to be a minimum*) Definition isMin (r : R) (min : float) := Fbounded b min /\ (min <= r)%R /\ (forall f : float, Fbounded b f -> (f <= r)%R -> (f <= min)%R). (* Min is a projector *) Theorem isMin_inv1 : forall (p : float) (r : R), isMin r p -> (p <= r)%R. (* Goal: forall (p : float) (r : R) (_ : isMax r p), Rle r (FtoRradix p) *) intros p r H; case H; intros H1 H2; case H2; auto. Qed. Theorem ProjectMin : ProjectorP isMin. (* Goal: MonotoneP isMax *) red in |- *. (* Goal: forall (p q : float) (_ : Fbounded b p) (_ : isMax (FtoRradix p) q), @eq R (FtoRradix p) (FtoRradix q) *) intros p q H' H'0; apply Rle_antisym. elim H'0; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2; auto with real. (* Goal: Rle (FtoRradix q) r *) apply isMin_inv1 with (1 := H'0); auto. Qed. (* It is monotone *) Theorem MonotoneMin : MonotoneP isMin. (* Goal: MonotoneP isMax *) red in |- *. (* Goal: forall (p q : R) (p' q' : float) (_ : Rlt p q) (_ : isMax p p') (_ : isMax q q'), Rle (FtoRradix p') (FtoRradix q') *) intros p q p' q' H' H'0 H'1. elim H'1; intros H'2 H'3; elim H'3; intros H'4 H'5; apply H'5; clear H'3 H'1; auto. (* Goal: Fbounded b q *) (* Goal: Rle r (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) case H'0; auto. (* Goal: Rle (FtoRradix p') q *) apply Rle_trans with p; auto. (* Goal: Rle (FtoRradix q) r *) apply isMin_inv1 with (1 := H'0); auto. (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) apply Rlt_le; auto. Qed. (* What it is to be a maximum *) Definition isMax (r : R) (max : float) := Fbounded b max /\ (r <= max)%R /\ (forall f : float, Fbounded b f -> (r <= f)%R -> (max <= f)%R). (* It is a projector *) Theorem isMax_inv1 : forall (p : float) (r : R), isMax r p -> (r <= p)%R. (* Goal: forall (p : float) (r : R) (_ : isMax r p), Rle r (FtoRradix p) *) intros p r H; case H; intros H1 H2; case H2; auto. Qed. Theorem ProjectMax : ProjectorP isMax. (* Goal: MonotoneP isMax *) red in |- *. (* Goal: forall (p q : float) (_ : Fbounded b p) (_ : isMax (FtoRradix p) q), @eq R (FtoRradix p) (FtoRradix q) *) intros p q H' H'0; apply Rle_antisym. (* Goal: Rle r (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply isMax_inv1 with (1 := H'0); auto. elim H'0; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2; auto with real. Qed. (* It is monotone *) Theorem MonotoneMax : MonotoneP isMax. (* Goal: MonotoneP isMax *) red in |- *. (* Goal: forall (p q : R) (p' q' : float) (_ : Rlt p q) (_ : isMax p p') (_ : isMax q q'), Rle (FtoRradix p') (FtoRradix q') *) intros p q p' q' H' H'0 H'1. (* Goal: Rle (FtoRradix p') (FtoRradix q') *) elim H'0; intros H'2 H'3; elim H'3; intros H'4 H'5; apply H'5; clear H'3 H'0. (* Goal: Fbounded b q' *) (* Goal: Rle p (FtoRradix q') *) case H'1; auto. (* Goal: Rle p (FtoRradix q') *) apply Rle_trans with q; auto. (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) apply Rlt_le; auto. (* Goal: Rle q (FtoRradix q') *) apply isMax_inv1 with (1 := H'1); auto. Qed. (* Minimun is defined upto equality *) Theorem MinEq : forall (p q : float) (r : R), isMin r p -> isMin r q -> p = q :>R. (* Goal: forall (p q : float) (r : R) (_ : isMax r p) (_ : isMax r q), @eq R (FtoRradix p) (FtoRradix q) *) intros p q r H' H'0; apply Rle_antisym. elim H'0; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2 H'0; auto. (* Goal: Fbounded b p *) (* Goal: Rle r (FtoRradix p) *) case H'; auto. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply isMin_inv1 with (1 := H'); auto. elim H'; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2 H'; auto. (* Goal: Fbounded b q *) (* Goal: Rle r (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) case H'0; auto. (* Goal: Rle (FtoRradix q) r *) apply isMin_inv1 with (1 := H'0); auto. Qed. (* Maximum is defined upto equality *) Theorem MaxEq : forall (p q : float) (r : R), isMax r p -> isMax r q -> p = q :>R. (* Goal: forall (p q : float) (r : R) (_ : isMax r p) (_ : isMax r q), @eq R (FtoRradix p) (FtoRradix q) *) intros p q r H' H'0; apply Rle_antisym. elim H'; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2 H'; auto. (* Goal: Fbounded b q *) (* Goal: Rle r (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) case H'0; auto. (* Goal: Rle r (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply isMax_inv1 with (1 := H'0); auto. elim H'0; intros H'1 H'2; elim H'2; intros H'3 H'4; apply H'4; clear H'2 H'0; auto. (* Goal: Fbounded b p *) (* Goal: Rle r (FtoRradix p) *) case H'; auto. (* Goal: Rle r (FtoRradix p) *) apply isMax_inv1 with (1 := H'); auto. Qed. (* Min and Max are related *) Theorem MinOppMax : forall (p : float) (r : R), isMin r p -> isMax (- r) (Fopp p). (* Goal: forall (p : float) (r : R) (_ : isMax r p), isMin (Ropp r) (Fopp p) *) intros p r H'; split. (* Goal: Fbounded b p *) (* Goal: Rle r (FtoRradix p) *) apply oppBounded; case H'; auto. (* Goal: and (Rle r (FtoRradix (FNSucc b radix precision p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f)) *) split. (* Goal: isMin (FtoRradix (Fopp p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply Ropp_le_contravar; apply isMin_inv1 with (1 := H'); auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) (Ropp r)), Rle (FtoRradix f) (FtoRradix (Fopp p)) *) intros f H'0 H'1. (* Goal: Rle (FtoRradix f) (FtoRradix (Fopp p)) *) rewrite <- (Fopp_Fopp f). (* Goal: Rle (FtoRradix (Fopp p)) (FtoRradix (Fopp (Fopp f))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; rewrite Fopp_correct. (* Goal: Rle (Ropp (Ropp (FtoR radix f))) (Ropp (FtoR radix p)) *) apply Ropp_le_contravar. (* Goal: Rle (FtoR radix p) (FtoR radix (Fopp f)) *) elim H'. (* Goal: forall (_ : Fbounded b p) (_ : and (Rle r (FtoRradix p)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix p) (FtoRradix f))), Rle (FtoR radix p) (FtoR radix (Fopp f)) *) intros H'2 H'3; elim H'3; intros H'4 H'5; apply H'5; clear H'3. (* Goal: Fbounded b p *) (* Goal: Rle r (FtoRradix p) *) apply oppBounded; case H'; auto. (* Goal: isMin r (Fopp (Fopp (FNPred b radix precision p))) *) rewrite <- (Ropp_involutive r). (* Goal: Rle (FtoRradix (Fopp p)) (Ropp r) *) (* Goal: Rlt (Ropp r) (FtoRradix (FNSucc b radix precision (Fopp p))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. Qed. (* Max and Min are related *) Theorem MaxOppMin : forall (p : float) (r : R), isMax r p -> isMin (- r) (Fopp p). (* Goal: forall (p : float) (r : R) (_ : isMax r p), isMin (Ropp r) (Fopp p) *) intros p r H'; split. (* Goal: Fbounded b p *) (* Goal: Rle r (FtoRradix p) *) apply oppBounded; case H'; auto. (* Goal: and (Rle r (FtoRradix (FNSucc b radix precision p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f)) *) split. (* Goal: isMin (FtoRradix (Fopp p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle r (FtoRradix p) *) apply Ropp_le_contravar; apply isMax_inv1 with (1 := H'); auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) (Ropp r)), Rle (FtoRradix f) (FtoRradix (Fopp p)) *) intros f H'0 H'1. (* Goal: Rle (FtoRradix f) (FtoRradix (Fopp p)) *) rewrite <- (Fopp_Fopp f). (* Goal: Rle (FtoRradix (Fopp (Fopp f))) (FtoRradix (Fopp p)) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct. (* Goal: Rle (Ropp (Ropp (FtoR radix f))) (Ropp (FtoR radix p)) *) apply Ropp_le_contravar. (* Goal: Rle (FtoR radix p) (Ropp (FtoR radix f)) *) rewrite <- (Fopp_correct radix f). (* Goal: Rle (FtoR radix p) (FtoR radix (Fopp f)) *) elim H'. (* Goal: forall (_ : Fbounded b p) (_ : and (Rle r (FtoRradix p)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix p) (FtoRradix f))), Rle (FtoR radix p) (FtoR radix (Fopp f)) *) intros H'2 H'3; elim H'3; intros H'4 H'5; apply H'5; clear H'3. (* Goal: Fbounded b (Fopp f) *) (* Goal: Rle r (FtoRradix (Fopp f)) *) apply oppBounded; auto. (* Goal: isMin r (Fopp (Fopp (FNPred b radix precision p))) *) rewrite <- (Ropp_involutive r). (* Goal: Rle (FtoRradix (Fopp p)) (Ropp r) *) (* Goal: Rlt (Ropp r) (FtoRradix (FNSucc b radix precision (Fopp p))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. Qed. (* If I have a strict min I can get a max using FNSucc *) Theorem MinMax : forall (p : float) (r : R), isMin r p -> r <> p :>R -> isMax r (FNSucc b radix precision p). (* Goal: forall (p : float) (r : R) (_ : isMax r p) (_ : not (@eq R r (FtoRradix p))), isMin r (FNPred b radix precision p) *) intros p r H' H'0. (* Goal: and (Rle r (FtoRradix (FNSucc b radix precision p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f)) *) split. (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply FcanonicBound with (radix := radix); auto with float. (* Goal: Fcanonic radix b (FNSucc b radix precision p) *) (* Goal: and (Rle r (FtoRradix (FNSucc b radix precision p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f)) *) apply FNSuccCanonic; auto. (* Goal: Fbounded b p *) (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) inversion H'; auto. (* Goal: and (Rle r (FtoRradix (FNSucc b radix precision p))) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f)) *) split. (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) case (Rle_or_lt (FNSucc b radix precision p) r); intros H'2; auto. (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) absurd (FNSucc b radix precision p <= p)%R. (* Goal: not (Rle (FtoRradix f) r) *) apply Rlt_not_le. (* Goal: Rlt (FtoRradix p) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix p) *) (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) unfold FtoRradix in |- *; apply FNSuccLt; auto. (* Goal: Fbounded b p *) (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) inversion H'; auto. (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix p) *) (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) elim H0; intros H'1 H'3; apply H'3; auto. (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply FcanonicBound with (radix := radix); auto with float. (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) apply Rlt_le; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix p) *) intros f H'2 H'3. (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) replace (FtoRradix f) with (FtoRradix (Fnormalize radix b precision f)). (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) unfold FtoRradix in |- *; apply FNSuccProp; auto. (* Goal: Fbounded b p *) (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) inversion H'; auto. (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply FcanonicBound with (radix := radix); auto with float. (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply Rlt_le_trans with r; auto. (* Goal: Rlt (FtoR radix p) r *) (* Goal: Rle r (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) case (Rle_or_lt r p); auto. (* Goal: forall _ : Rle r (FtoRradix p), Rlt (FtoR radix p) r *) (* Goal: Rle r (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) intros H'4; Contradict H'0. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply Rle_antisym; auto; apply isMin_inv1 with (1 := H'); auto. (* Goal: Rle r (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) rewrite FnormalizeCorrect; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. Qed. (* Find a minimun in a given list if it exists *) Theorem MinExList : forall (r : R) (L : list float), (forall f : float, In f L -> (r < f)%R) \/ (exists min : float, In min L /\ (min <= r)%R /\ (forall f : float, In f L -> (f <= r)%R -> (f <= min)%R)). (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) intros r L; elim L; simpl in |- *; auto. (* Goal: Rle (FtoR radix p) (FtoR radix (Fopp f)) *) left; intros f H'; elim H'. (* Goal: forall (a : float) (l : list float) (_ : or (forall (f : float) (_ : @In float f l), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (@In float min l) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : @In float f l) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min)))))), or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) intros a l H'. elim H'; [ intros H'0; clear H' | intros H'0; elim H'0; intros min E; elim E; intros H'1 H'2; elim H'2; intros H'3 H'4; try exact H'4; clear H'2 E H'0 H' ]. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) case (Rle_or_lt a r); intros H'1. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) right; exists a; repeat split; auto. intros f H'; elim H'; [ intros H'2; rewrite <- H'2; clear H' | intros H'2; clear H' ]; auto with real. (* Goal: forall _ : Rle (FtoRradix f) r, Rle (FtoRradix f) (FtoRradix a) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) intros H'; Contradict H'; auto with real. (* Goal: not (Rle (FtoRradix f) r) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) apply Rlt_not_le; auto with real. left; intros f H'; elim H'; [ intros H'2; rewrite <- H'2; clear H' | intros H'2; clear H' ]; auto. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) case (Rle_or_lt a min); intros H'5. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) right; exists min; repeat split; auto. intros f H'; elim H'; [ intros H'0; rewrite <- H'0; clear H' | intros H'0; clear H' ]; auto. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) case (Rle_or_lt a r); intros H'6. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) right; exists a; repeat split; auto. intros f H'; elim H'; [ intros H'0; rewrite <- H'0; clear H' | intros H'0; clear H' ]; auto with real. (* Goal: forall _ : Rle (FtoRradix f) r, Rle (FtoRradix f) (FtoRradix a) *) (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) intros H'; apply Rle_trans with (FtoRradix min); auto with real. (* Goal: or (forall (f : float) (_ : or (@eq float a f) (@In float f l)), Rlt r (FtoRradix f)) (@ex float (fun min : float => and (or (@eq float a min) (@In float min l)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : or (@eq float a f) (@In float f l)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min))))) *) right; exists min; split; auto; split; auto. intros f H'; elim H'; [ intros H'0; elim H'0; clear H' | intros H'0; clear H' ]; auto. (* Goal: forall _ : Rle (FtoRradix a) r, Rle (FtoRradix a) (FtoRradix min) *) intros H'; Contradict H'6; auto with real. (* Goal: not (Rlt r (FtoRradix a)) *) apply Rle_not_lt; auto. Qed. Theorem MinEx : forall r : R, exists min : float, isMin r min. (* Goal: forall r : R, @ex float (fun min : float => isMin r min) *) intros r. (* Goal: @ex float (fun min : float => isMin r min) *) case (MinExList r (mBFloat r)). (* Goal: forall _ : forall (f : float) (_ : @In float f (mBFloat r)), Rlt r (FtoRradix f), @ex float (fun min : float => isMin r min) *) (* Goal: forall _ : @ex float (fun min : float => and (@In float min (mBFloat r)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : @In float f (mBFloat r)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min)))), @ex float (fun min : float => isMin r min) *) intros H'0; absurd (Fopp (boundR r) <= r)%R; auto. (* Goal: not (Rle (FtoRradix f) r) *) apply Rlt_not_le. (* Goal: Rlt r (FtoRradix (Fopp (boundR r))) *) (* Goal: Rle (FtoRradix (Fopp (boundR r))) r *) (* Goal: forall _ : @ex float (fun min : float => and (@In float min (mBFloat r)) (and (Rle (FtoRradix min) r) (forall (f : float) (_ : @In float f (mBFloat r)) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min)))), @ex float (fun min : float => isMin r min) *) apply H'0. (* Goal: @In float (Fopp (boundR r)) (mBFloat r) *) (* Goal: Rle (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply mBFadic_correct3; auto. (* A minimum always exists *) (* Goal: Rle (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply Rlt_le. (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply boundRCorrect2; auto. intros H'0; elim H'0; intros min E; elim E; intros H'1 H'2; elim H'2; intros H'3 H'4; clear H'2 E H'0. (* Goal: @ex float (fun min : float => isMin r min) *) exists min; split; auto. (* Goal: Fbounded b min *) (* Goal: and (Rle (FtoRradix min) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min)) *) apply mBPadic_Fbounded with (r := r); auto. (* Goal: and (Rle (FtoRradix p) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix p)) *) split; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix min) *) intros f H'0 H'2. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) case (Req_dec f 0); intros H'6. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) replace (FtoRradix f) with (FtoRradix (Float 0%nat (- dExp b))). (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply H'4; auto. (* Goal: @In float (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b)))) (mBFloat r) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) r *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (FtoRradix f) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply mBFadic_correct4; auto. (* Goal: Rle (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) r *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (FtoRradix f) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) replace (FtoRradix (Float 0%nat (- dExp b))) with (FtoRradix f); auto. (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (FtoRradix f) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) rewrite H'6. (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (IZR Z0) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real. (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (FtoRradix f) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) rewrite H'6. (* Goal: @eq R (FtoRradix (Float (Z.of_nat O) (Z.opp (Z.of_N (dExp b))))) (IZR Z0) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) case (Rle_or_lt f (Fopp (boundR r))); intros H'5. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply Rle_trans with (FtoRradix (Fopp (boundR r))); auto. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply H'4; auto. (* Goal: @In float (Fopp (boundR r)) (mBFloat r) *) (* Goal: Rle (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply mBFadic_correct3; auto. (* Goal: Rle (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply Rlt_le. (* Goal: Rlt (FtoRradix (Fopp (boundR r))) r *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply boundRCorrect2; auto. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) case (Rle_or_lt (boundR r) f); intros H'7. (* Goal: not (Rle (FtoRradix f) r) *) Contradict H'2; apply Rlt_not_le. (* Goal: Rlt r (FtoRradix f) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply Rlt_le_trans with (FtoRradix (boundR r)); auto. (* Goal: Rlt r (FtoRradix (boundR r)) *) (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply boundRCorrect1; auto. (* Goal: Rle (FtoRradix f) (FtoRradix min) *) apply H'4; auto. (* Goal: @In float f (mBFloat r) *) apply mBFadic_correct1; auto. (* Goal: not (is_Fzero f) *) Contradict H'6; unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. Qed. Theorem MaxEx : forall r : R, exists max : float, isMax r max. (* Goal: forall r : R, @ex float (fun max : float => isMax r max) *) intros r; case (MinEx r). (* Goal: forall (x : float) (_ : isMin r x), @ex float (fun max : float => isMax r max) *) intros x H'. (* Goal: @ex float (fun max : float => isMax r max) *) case (Req_dec x r); intros H'1. (* Goal: @ex float (fun max : float => isMax r max) *) (* Goal: @ex float (fun max : float => isMax r max) *) exists x. (* Goal: isMax r x *) (* Goal: @ex float (fun max : float => isMax r max) *) rewrite <- H'1. (* Goal: isMax (FtoRradix x) x *) (* Goal: @ex float (fun max : float => isMax r max) *) red in |- *; split; [ case H' | split ]; auto with real. (* A maximum always exists *) (* Goal: @ex float (fun max : float => isMax r max) *) exists (FNSucc b radix precision x). (* Goal: isMax (Ropp r) (FNSucc b radix precision (Fopp p)) *) apply MinMax; auto. Qed. Theorem MinBinade : forall (r : R) (p : float), Fbounded b p -> (p <= r)%R -> (r < FNSucc b radix precision p)%R -> isMin r p. (* Goal: forall (r : R) (p : float) (_ : Fbounded b p) (_ : Rle r (FtoRradix p)) (_ : Rlt (FtoRradix (FNPred b radix precision p)) r), isMax r p *) intros r p H' H'0 H'1. (* Goal: and (Rle (FtoRradix p) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix p)) *) split; auto. (* Goal: and (Rle (FtoRradix p) r) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix p)) *) split; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoRradix f) r), Rle (FtoRradix f) (FtoRradix p) *) intros f H'2 H'3. (* Goal: Rle (FtoRradix f) (FtoRradix p) *) case (Rle_or_lt f p); auto; intros H'5. (* Goal: Rle (FtoRradix f) (FtoRradix p) *) Contradict H'3. (* If we are between a bound and its successor, it is our minimum *) (* Goal: not (Rle (FtoRradix f) r) *) apply Rlt_not_le. (* Goal: Rlt r (FtoRradix f) *) apply Rlt_le_trans with (1 := H'1); auto with real. (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) replace (FtoRradix f) with (FtoRradix (Fnormalize radix b precision f)). unfold FtoRradix in |- *; apply FNSuccProp; auto; try apply FnormalizeCanonic; auto. (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) unfold FtoRradix in |- *; repeat rewrite FnormalizeCorrect; auto with real. (* Goal: Fbounded b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply FcanonicBound with (radix := radix); auto. (* Goal: Fcanonic radix b (Fnormalize radix b precision f) *) (* Goal: Rlt (FtoR radix p) (FtoR radix (Fnormalize radix b precision f)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) apply FnormalizeCanonic; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) unfold FtoRradix in |- *; rewrite FnormalizeCorrect; auto with real. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) unfold FtoRradix in |- *; rewrite FnormalizeCorrect; auto with real. Qed. Theorem FminRep : forall p q : float, isMin p q -> exists m : Z, q = Float m (Fexp p) :>R. intros p q H'. replace (FtoRradix q) with (FtoRradix (Fnormalize radix b precision q)). (* Goal: @eq R (FtoRradix (Fnormalize radix b precision f)) (FtoRradix f) *) 2: unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. case (Zle_or_lt (Fexp (Fnormalize radix b precision q)) (Fexp p)); intros H'1. exists (Fnum p). unfold FtoRradix in |- *; apply FSuccZleEq with (3 := pGivesBound); auto. (* A min of a float is always represnetable with the same exposant *) replace (Float (Fnum p) (Fexp p)) with p; [ idtac | case p ]; auto. replace (FtoR radix (Fnormalize radix b precision q)) with (FtoR radix q); [ idtac | rewrite FnormalizeCorrect ]; auto. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle (FtoRradix q) (FtoRradix p) *) apply isMin_inv1 with (1 := H'); auto. replace (FSucc b radix precision (Fnormalize radix b precision q)) with (FNSucc b radix precision q); [ idtac | case p ]; auto. replace (Float (Fnum p) (Fexp p)) with p; [ idtac | case p ]; auto. case (Req_dec p q); intros Eq0. unfold FtoRradix in Eq0; rewrite Eq0. apply FNSuccLt; auto. case (MinMax q p); auto. intros H'2 H'3; elim H'3; intros H'4 H'5; clear H'3. case H'4; auto. intros H'0; absurd (p <= q)%R; rewrite H'0; auto. apply Rlt_not_le; auto. (* Goal: Rlt (FtoRradix p) (FtoRradix (FNSucc b radix precision p)) *) (* Goal: Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix p) *) (* Goal: Rle r (FtoRradix (FNSucc b radix precision p)) *) (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoRradix f)), Rle (FtoRradix (FNSucc b radix precision p)) (FtoRradix f) *) unfold FtoRradix in |- *; apply FNSuccLt; auto. inversion H'. elim H0; intros H'3 H'6; apply H'6; clear H0; auto. rewrite <- H'0; auto with real. exists (Fnum (Fshift radix (Zabs_nat (Fexp (Fnormalize radix b precision q) - Fexp p)) (Fnormalize radix b precision q))). pattern (Fexp p) at 2 in |- *; replace (Fexp p) with (Fexp (Fshift radix (Zabs_nat (Fexp (Fnormalize radix b precision q) - Fexp p)) (Fnormalize radix b precision q))). unfold FtoRradix in |- *; rewrite <- FshiftCorrect with (n := Zabs_nat (Fexp (Fnormalize radix b precision q) - Fexp p)) (x := Fnormalize radix b precision q). case (Fshift radix (Zabs_nat (Fexp (Fnormalize radix b precision q) - Fexp p)) (Fnormalize radix b precision q)); auto. auto with arith. (* Goal: @eq Z (Z.sub (Fexp q) (Z.of_nat (Z.abs_nat (Z.sub (Fexp q) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))))))) (Z.of_nat (digit radix (Z.of_nat (Z.abs_nat (up (Rabs r)))))) *) (* Goal: @eq Z (Fnum (boundR r)) (Z.of_nat (S O)) *) (* Goal: forall (p : Z) (_ : Z.lt (Z.opp (Z.of_nat (S O))) p) (_ : Z.lt p (Z.of_nat (S O))), @eq Z p Z0 *) (* Goal: forall (_ : not (is_Fzero q)) (_ : Rlt (FtoRradix (Fopp (boundR r))) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (boundR r))) (_ : Fbounded b q), @In float q (mBFloat r) *) simpl in |- *; rewrite inj_abs; auto with zarith. Qed. Theorem MaxBinade : forall (r : R) (p : float), Fbounded b p -> (r <= p)%R -> (FNPred b radix precision p < r)%R -> isMax r p. (* Goal: forall (r : R) (p : float) (_ : Fbounded b p) (_ : Rle r (FtoRradix p)) (_ : Rlt (FtoRradix (FNPred b radix precision p)) r), isMax r p *) intros r p H' H'0 H'1. (* Goal: isMin r (Fopp (Fopp (FNPred b radix precision p))) *) rewrite <- (Ropp_involutive r). (* Goal: isMax (Ropp (Ropp r)) p *) rewrite <- (Fopp_Fopp p). (* Goal: isMax (Ropp (Ropp r)) (Fopp (Fopp p)) *) apply MinOppMax. (* Goal: isMin (Ropp r) (Fopp p) *) apply MinBinade; auto with real float. (* Goal: Rle (FtoRradix (Fopp p)) (Ropp r) *) (* Goal: Rlt (Ropp r) (FtoRradix (FNSucc b radix precision (Fopp p))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Same for max *) (* Goal: Rlt (Ropp r) (FtoRradix (FNSucc b radix precision (Fopp p))) *) rewrite <- (Fopp_Fopp (FNSucc b radix precision (Fopp p))). (* Goal: Rlt (Ropp r) (FtoRradix (Fopp (Fopp (FNSucc b radix precision (Fopp p))))) *) rewrite <- FNPredFopFNSucc; auto. (* Goal: Rlt (Ropp r) (FtoRradix (Fopp (FNPred b radix precision p))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real arith. Qed. Theorem MaxMin : forall (p : float) (r : R), isMax r p -> r <> p :>R -> isMin r (FNPred b radix precision p). (* Goal: forall (p : float) (r : R) (_ : isMax r p) (_ : not (@eq R r (FtoRradix p))), isMin r (FNPred b radix precision p) *) intros p r H' H'0. (* Goal: isMin r (FNPred b radix precision p) *) rewrite <- (Fopp_Fopp (FNPred b radix precision p)). (* Goal: isMin r (Fopp (Fopp (FNPred b radix precision p))) *) rewrite <- (Ropp_involutive r). (* Goal: isMin (Ropp (Ropp r)) (Fopp (Fopp (FNPred b radix precision p))) *) apply MaxOppMin. (* Goal: isMax (Ropp r) (Fopp (FNPred b radix precision p)) *) rewrite FNPredFopFNSucc; auto. (* Goal: isMax (Ropp r) (Fopp (Fopp (FNSucc b radix precision (Fopp p)))) *) rewrite Fopp_Fopp; auto. (* Taking the pred of a max we get a min *) (* Goal: isMax (Ropp r) (FNSucc b radix precision (Fopp p)) *) apply MinMax; auto. (* Goal: isMin (Ropp (FtoR radix p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) apply MaxOppMin; auto. (* Goal: not (@eq R (Ropp r) (FtoRradix (Fopp p))) *) Contradict H'0. rewrite <- (Ropp_involutive r); rewrite H'0; auto; unfold FtoRradix in |- *; rewrite Fopp_correct; auto; apply Ropp_involutive. Qed. Theorem FmaxRep : forall p q : float, isMax p q -> exists m : Z, q = Float m (Fexp p) :>R. (* Goal: forall (p q : float) (_ : isMax (FtoRradix p) q), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) intros p q H'; case (FminRep (Fopp p) (Fopp q)). (* Goal: isMin (FtoRradix (Fopp p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: isMin (Ropp (FtoR radix p)) (Fopp q) *) (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) apply MaxOppMin; auto. (* Goal: forall (x : Z) (_ : @eq R (FtoRradix (Fopp q)) (FtoRradix (Float x (Fexp (Fopp p))))), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) intros x H'0. (* Goal: @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) exists (- x)%Z. (* Goal: @eq R (FtoRradix q) (FtoRradix (Float (Z.opp x) (Fexp p))) *) rewrite <- (Ropp_involutive (FtoRradix q)). (* The max of a float can be represented with the same exposant *) (* Goal: @eq R (Ropp (Ropp (FtoRradix q))) (FtoRradix (Float (Z.opp x) (Fexp p))) *) unfold FtoRradix in |- *; rewrite <- Fopp_correct. (* Goal: @eq R (Ropp (FtoR radix (Fopp q))) (FtoR radix (Float (Z.opp x) (Fexp p))) *) unfold FtoRradix in H'0; rewrite H'0. (* Goal: @eq R (Ropp (FtoR radix (Float x (Fexp (Fopp p))))) (FtoR radix (Float (Z.opp x) (Fexp p))) *) unfold FtoR in |- *; simpl in |- *; auto with real. (* Goal: @eq R (Ropp (Rmult (IZR x) (powerRZ (IZR radix) (Fexp p)))) (Rmult (IZR (Z.opp x)) (powerRZ (IZR radix) (Fexp p))) *) rewrite Ropp_Ropp_IZR; rewrite Ropp_mult_distr_l_reverse; auto. Qed. End FMinMax. Hint Resolve ProjectMax MonotoneMax MinOppMax MaxOppMin MinMax MinBinade MaxBinade MaxMin: float.
(**************************************************************************** IEEE754 : MSB Laurent Thery ******************************************************************************) Require Export Fprop. Require Export Zdivides. Require Export Fnorm. Section mf. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Fixpoint maxDiv (v : Z) (p : nat) {struct p} : nat := match p with | O => 0 | S p' => match ZdividesP v (Zpower_nat radix p) with | left _ => p | right _ => maxDiv v p' end end. Theorem maxDivLess : forall (v : Z) (p : nat), maxDiv v p <= p. (* Goal: forall (v : Z) (p : nat), @eq nat (maxDiv v p) (maxDiv (Z.abs v) p) *) intros v p; elim p; simpl in |- *; auto. (* Goal: forall (n : nat) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), lt (if ZdividesP v (Z.mul radix (Zpower_nat radix n)) then S n else maxDiv v n) (S n) *) intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); auto. Qed. Theorem maxDivLt : forall (v : Z) (p : nat), ~ Zdivides v (Zpower_nat radix p) -> maxDiv v p < p. (* Goal: forall (v : Z) (p : nat) (_ : not (Zdivides v (Zpower_nat radix p))), lt (maxDiv v p) p *) intros v p; case p; simpl in |- *; auto. (* Goal: forall _ : not (Zdivides v (Zpos xH)), lt O O *) (* Goal: forall (n : nat) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), lt (if ZdividesP v (Z.mul radix (Zpower_nat radix n)) then S n else maxDiv v n) (S n) *) intros H'; case H'. (* Goal: Zdivides v (Z.of_nat (S O)) *) (* Goal: forall (n : nat) (_ : Zdivides v (Zpower_nat radix (maxDiv v n))), Zdivides v (Zpower_nat radix (maxDiv v (S n))) *) apply Zdivides1. (* Goal: forall (n : nat) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), lt (if ZdividesP v (Z.mul radix (Zpower_nat radix n)) then S n else maxDiv v n) (S n) *) intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); auto. (* Goal: forall _ : Zdivides v (Z.mul radix (Zpower_nat radix n)), lt (S n) (S n) *) (* Goal: forall _ : not (Zdivides v (Z.mul radix (Zpower_nat radix n))), lt (maxDiv v n) (S n) *) intros H'0; case H'; auto. (* Goal: forall _ : not (Zdivides v (Z.mul radix (Zpower_nat radix n))), lt (maxDiv v n) (S n) *) intros H'0; generalize (maxDivLess v n); auto with arith. Qed. Theorem maxDivCorrect : forall (v : Z) (p : nat), Zdivides v (Zpower_nat radix (maxDiv v p)). (* Goal: forall (v : Z) (p : nat), Zdivides v (Zpower_nat radix (maxDiv v p)) *) intros v p; elim p. (* Goal: Zdivides v (Zpower_nat radix (maxDiv v O)) *) (* Goal: forall (n : nat) (_ : Zdivides v (Zpower_nat radix (maxDiv v n))), Zdivides v (Zpower_nat radix (maxDiv v (S n))) *) unfold maxDiv in |- *; rewrite Zpower_nat_O; auto. (* Goal: Zdivides v (Z.of_nat (S O)) *) (* Goal: forall (n : nat) (_ : Zdivides v (Zpower_nat radix (maxDiv v n))), Zdivides v (Zpower_nat radix (maxDiv v (S n))) *) apply Zdivides1. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) simpl in |- *. intros n H'; case (ZdividesP v (radix * Zpower_nat radix n)); simpl in |- *; (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) auto with zarith. Qed. Theorem maxDivSimplAux : forall (v : Z) (p q : nat), p = maxDiv v (S (q + p)) -> p = maxDiv v (S p). intros v p q; elim q. simpl in |- *; case (ZdividesP v (radix * Zpower_nat radix p)); auto. intros n H' H'0. apply H'; auto; clear H'. simpl in H'0; generalize H'0; clear H'0. case (ZdividesP v (radix * (radix * Zpower_nat radix (n + p)))). 2: simpl in |- *; auto. intros H' H'0; Contradict H'0; auto with zarith. Qed. Theorem maxDivSimpl : forall (v : Z) (p q : nat), p < q -> p = maxDiv v q -> p = maxDiv v (S p). (* Goal: forall (v : Z) (p q : nat) (_ : lt p q) (_ : @eq nat p (maxDiv v (S p))), @eq nat p (maxDiv v q) *) intros v p q H' H'0. (* Goal: @eq nat p (maxDiv v (S p)) *) apply maxDivSimplAux with (q := q - S p); auto. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add (Init.Nat.sub q (S p)) p))) *) replace (S (q - S p + p)) with q; auto with zarith. Qed. Theorem maxDivSimplInvAux : forall (v : Z) (p q : nat), p = maxDiv v (S p) -> p = maxDiv v (S (q + p)). (* Goal: forall (v : Z) (p q : nat) (_ : @eq nat p (maxDiv v (S p))), @eq nat p (maxDiv v (S (Init.Nat.add q p))) *) intros v p q H'; elim q. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add O p))) *) (* Goal: forall (n : nat) (_ : @eq nat p (maxDiv v (S (Init.Nat.add n p)))), @eq nat p (maxDiv v (S (Init.Nat.add (S n) p))) *) simpl in |- *; auto. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros n; simpl in |- *. (* Goal: forall _ : @eq nat p (if ZdividesP v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))) then S (Init.Nat.add n p) else maxDiv v (Init.Nat.add n p)), @eq nat p (if ZdividesP v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) then S (S (Init.Nat.add n p)) else if ZdividesP v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))) then S (Init.Nat.add n p) else maxDiv v (Init.Nat.add n p)) *) case (ZdividesP v (radix * Zpower_nat radix (n + p))); auto. (* Goal: forall (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : @eq nat p (maxDiv v (Init.Nat.add n p))), @eq nat p (if ZdividesP v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) then S (S (Init.Nat.add n p)) else maxDiv v (Init.Nat.add n p)) *) case (ZdividesP v (radix * (radix * Zpower_nat radix (n + p)))); auto. (* Goal: forall (_ : Zdivides v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) (_ : @eq nat p (S (Init.Nat.add n p))), @eq nat p (S (S (Init.Nat.add n p))) *) (* Goal: forall (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : @eq nat p (maxDiv v (Init.Nat.add n p))), @eq nat p (if ZdividesP v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) then S (S (Init.Nat.add n p)) else maxDiv v (Init.Nat.add n p)) *) intros H'0 H'1 H'2; Contradict H'2; auto with zarith. (* Goal: forall (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : @eq nat p (maxDiv v (Init.Nat.add n p))), @eq nat p (if ZdividesP v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) then S (S (Init.Nat.add n p)) else maxDiv v (Init.Nat.add n p)) *) case (ZdividesP v (radix * (radix * Zpower_nat radix (n + p)))); auto. (* Goal: forall (_ : Zdivides v (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))))) (_ : @eq nat p (maxDiv v (Init.Nat.add n p))), @eq nat p (S (S (Init.Nat.add n p))) *) intros H'0 H'1 H'2; case H'1. (* Goal: Zdivides v (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))) *) case H'0; intros z1 Hz1; exists (radix * z1)%Z;rewrite Hz1. (* Goal: @eq Z (Z.mul (Z.mul radix (Z.mul radix (Zpower_nat radix (Init.Nat.add n p)))) z1) (Z.mul (Z.mul radix (Zpower_nat radix (Init.Nat.add n p))) (Z.mul radix z1)) *) unfold Zpower_nat; simpl; ring. Qed. Theorem maxDivSimplInv : forall (v : Z) (p q : nat), p < q -> p = maxDiv v (S p) -> p = maxDiv v q. (* Goal: forall (v : Z) (p q : nat) (_ : lt p q) (_ : @eq nat p (maxDiv v (S p))), @eq nat p (maxDiv v q) *) intros v p q H' H'0. (* Goal: @eq nat p (maxDiv v q) *) replace q with (S (q - S p + p)); auto with zarith. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add (Init.Nat.sub q (S p)) p))) *) apply maxDivSimplInvAux; auto. Qed. Theorem maxDivUnique : forall (v : Z) (p : nat), p = maxDiv v (S p) -> Zdivides v (Zpower_nat radix p) /\ ~ Zdivides v (Zpower_nat radix (S p)). (* Goal: forall (v : Z) (p : nat) (_ : @eq nat p (maxDiv v (S p))), and (Zdivides v (Zpower_nat radix p)) (not (Zdivides v (Zpower_nat radix (S p)))) *) intros v p H'; split. (* Goal: Zdivides v (Zpower_nat radix p) *) (* Goal: not (Zdivides v (Zpower_nat radix (S p))) *) rewrite H'. (* Goal: Zdivides v (Zpower_nat radix (maxDiv v (S p))) *) (* Goal: not (Zdivides v (Zpower_nat radix (S p))) *) apply maxDivCorrect; auto. (* Goal: not (Zdivides v (Zpower_nat radix (S p))) *) red in |- *; intros H'0; generalize H'; clear H'. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) simpl in |- *. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add O p))) *) (* Goal: forall (n : nat) (_ : @eq nat p (maxDiv v (S (Init.Nat.add n p)))), @eq nat p (maxDiv v (S (Init.Nat.add (S n) p))) *) case (ZdividesP v (radix * Zpower_nat radix p)); simpl in |- *; auto. (* Goal: forall (_ : Zdivides v (Z.mul radix (Zpower_nat radix p))) (_ : @eq nat p (S p)), False *) intros H' H'1; Contradict H'1; auto with zarith. Qed. Theorem maxDivUniqueDigit : forall v : Z, v <> 0 -> Zdivides v (Zpower_nat radix (maxDiv v (digit radix v))) /\ ~ Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))). (* Goal: forall (v : Z) (_ : not (@eq Z v (Z.of_nat O))), and (Zdivides v (Zpower_nat radix (maxDiv v (digit radix v)))) (not (Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))))) *) intros v H'. (* Goal: and (Zdivides v (Zpower_nat radix (maxDiv v (digit radix v)))) (not (Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))))) *) apply maxDivUnique; auto. (* Goal: @eq nat (maxDiv v (digit radix v)) (maxDiv v (S (maxDiv v (digit radix v)))) *) apply maxDivSimpl with (q := digit radix v); auto. (* Goal: lt (maxDiv (Fnum x) (Fdigit radix x)) (Fdigit radix x) *) apply maxDivLt; auto. (* Goal: not (Zdivides v (Zpower_nat radix (digit radix v))) *) apply NotDividesDigit; auto. Qed. Theorem maxDivUniqueInverse : forall (v : Z) (p : nat), Zdivides v (Zpower_nat radix p) -> ~ Zdivides v (Zpower_nat radix (S p)) -> p = maxDiv v (S p). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros v p H' H'0; simpl in |- *. (* Goal: @eq nat p (if ZdividesP v (Z.mul radix (Zpower_nat radix p)) then S p else maxDiv v p) *) case (ZdividesP v (radix * Zpower_nat radix p)); auto. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add O p))) *) (* Goal: forall (n : nat) (_ : @eq nat p (maxDiv v (S (Init.Nat.add n p)))), @eq nat p (maxDiv v (S (Init.Nat.add (S n) p))) *) intros H'1; case H'0; simpl in |- *; auto. (* Goal: forall _ : not (Zdivides v (Z.mul radix (Zpower_nat radix p))), @eq nat p (maxDiv v p) *) intros H'1. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add O p))) *) (* Goal: forall (n : nat) (_ : @eq nat p (maxDiv v (S (Init.Nat.add n p)))), @eq nat p (maxDiv v (S (Init.Nat.add (S n) p))) *) generalize H'; case p; simpl in |- *; auto. (* Goal: forall (n : nat) (_ : Zdivides v (Z.mul radix (Zpower_nat radix n))), @eq nat (S n) (if ZdividesP v (Z.mul radix (Zpower_nat radix n)) then S n else maxDiv v n) *) intros n H'2; case (ZdividesP v (radix * Zpower_nat radix n)); auto. (* Goal: forall _ : not (Zdivides v (Z.mul radix (Zpower_nat radix n))), @eq nat (S n) (maxDiv v n) *) intros H'3; case H'3; auto. Qed. Theorem maxDivUniqueInverseDigit : forall (v : Z) (p : nat), v <> 0 -> Zdivides v (Zpower_nat radix p) -> ~ Zdivides v (Zpower_nat radix (S p)) -> p = maxDiv v (digit radix v). intros v p H' H'0 H'1. apply maxDivSimplInv; auto. 2: apply maxDivUniqueInverse; auto. apply Zpower_nat_anti_monotone_lt with (n := radix); auto. apply Zle_lt_trans with (m := Zabs v); auto. rewrite <- (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith; apply ZDividesLe; auto. apply digitMore; auto. Qed. Theorem maxDivPlus : forall (v : Z) (n : nat), v <> 0 -> maxDiv (v * Zpower_nat radix n) (digit radix v + n) = maxDiv v (digit radix v) + n. (* Goal: forall (v : Z) (n : nat) (_ : not (@eq Z v (Z.of_nat O))), @eq nat (maxDiv (Z.mul v (Zpower_nat radix n)) (Init.Nat.add (digit radix v) n)) (Init.Nat.add (maxDiv v (digit radix v)) n) *) intros v n H. (* Goal: @eq nat (maxDiv (Z.mul v (Zpower_nat radix n)) (Init.Nat.add (digit radix v) n)) (Init.Nat.add (maxDiv v (digit radix v)) n) *) replace (digit radix v + n) with (digit radix (v * Zpower_nat radix n)); auto. (* Goal: @eq nat (maxDiv (Z.mul v (Zpower_nat radix n)) (digit radix (Z.mul v (Zpower_nat radix n)))) (Init.Nat.add (maxDiv v (digit radix v)) n) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) apply sym_equal. (* Goal: @eq nat (Init.Nat.add (maxDiv v (digit radix v)) n) (maxDiv (Z.mul v (Zpower_nat radix n)) (digit radix (Z.mul v (Zpower_nat radix n)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) apply maxDivUniqueInverseDigit; auto. (* Goal: not (@eq Z (Z.mul v (Zpower_nat radix n)) (Z.of_nat O)) *) (* Goal: Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (Init.Nat.add (maxDiv v (digit radix v)) n)) *) (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (S (Init.Nat.add (maxDiv v (digit radix v)) n)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) red in |- *; intros Z1; case (Zmult_integral _ _ Z1); intros Z2. (* Goal: False *) (* Goal: False *) (* Goal: Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (Init.Nat.add (maxDiv v (digit radix v)) n)) *) (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (S (Init.Nat.add (maxDiv v (digit radix v)) n)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) case H; auto. (* Goal: False *) (* Goal: Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (Init.Nat.add (maxDiv v (digit radix v)) n)) *) (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (S (Init.Nat.add (maxDiv v (digit radix v)) n)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) absurd (0 < Zpower_nat radix n)%Z; auto with zarith. (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (Init.Nat.add (S (maxDiv v (digit radix v))) n))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) rewrite Zpower_nat_is_exp. (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Z.mul (Zpower_nat radix (S (maxDiv v (digit radix v)))) (Zpower_nat radix n))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) repeat rewrite (fun x : Z => Zmult_comm x (Zpower_nat radix n)). (* Goal: Zdivides (Z.mul (Zpower_nat radix n) v) (Z.mul (Zpower_nat radix n) (Zpower_nat radix (maxDiv v (digit radix v)))) *) (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (S (Init.Nat.add (maxDiv v (digit radix v)) n)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) apply ZdividesMult; auto. (* Goal: not (Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v))))) *) (* Goal: Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) case (maxDivUniqueDigit v); auto. replace (S (maxDiv v (digit radix v) + n)) with (S (maxDiv v (digit radix v)) + n); auto. (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Zpower_nat radix (Init.Nat.add (S (maxDiv v (digit radix v))) n))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) rewrite Zpower_nat_is_exp. (* Goal: not (Zdivides (Z.mul v (Zpower_nat radix n)) (Z.mul (Zpower_nat radix (S (maxDiv v (digit radix v)))) (Zpower_nat radix n))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) repeat rewrite (fun x : Z => Zmult_comm x (Zpower_nat radix n)). (* Goal: not (Zdivides (Z.mul (Zpower_nat radix n) v) (Z.mul (Zpower_nat radix n) (Zpower_nat radix (S (maxDiv v (digit radix v)))))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) red in |- *; intros H'. (* Goal: False *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) absurd (Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v))))). (* Goal: not (Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v))))) *) (* Goal: Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) case (maxDivUniqueDigit v); auto. (* Goal: Zdivides v (Zpower_nat radix (S (maxDiv v (digit radix v)))) *) (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) apply ZdividesDiv with (p := Zpower_nat radix n); auto with zarith. (* Goal: @eq nat (digit radix (Z.mul v (Zpower_nat radix n))) (Init.Nat.add (digit radix v) n) *) apply digitAdd; auto with zarith. Qed. Definition LSB (x : float) := (Z_of_nat (maxDiv (Fnum x) (Fdigit radix x)) + Fexp x)%Z. Theorem LSB_shift : forall (x : float) (n : nat), ~ is_Fzero x -> LSB x = LSB (Fshift radix n x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x n H'; unfold LSB, Fdigit in |- *; simpl in |- *. (* Goal: @eq Z (Z.add (Z.of_nat (maxDiv (Fnum x) (digit radix (Fnum x)))) (Fexp x)) (Z.add (Z.of_nat (maxDiv (Z.mul (Fnum x) (Zpower_nat radix n)) (digit radix (Z.mul (Fnum x) (Zpower_nat radix n))))) (Z.sub (Fexp x) (Z.of_nat n))) *) rewrite digitAdd; auto with arith. (* Goal: @eq Z (Z.add (Z.of_nat (maxDiv (Fnum x) (digit radix (Fnum x)))) (Fexp x)) (Z.add (Z.of_nat (maxDiv (Z.mul (Fnum x) (Zpower_nat radix n)) (Init.Nat.add (digit radix (Fnum x)) n))) (Z.sub (Fexp x) (Z.of_nat n))) *) rewrite maxDivPlus; auto. (* Goal: @eq Z (Z.add (Z.of_nat (maxDiv (Fnum x) (digit radix (Fnum x)))) (Fexp x)) (Z.add (Z.of_nat (Init.Nat.add (maxDiv (Fnum x) (digit radix (Fnum x))) n)) (Z.sub (Fexp x) (Z.of_nat n))) *) rewrite inj_plus; ring. Qed. Theorem LSB_comp : forall (x y : float) (n : nat), ~ is_Fzero x -> x = y :>R -> LSB x = LSB y. (* Goal: forall (x y : float) (_ : nat) (_ : not (is_Fzero x)) (_ : @eq R (FtoRradix x) (FtoRradix y)), @eq Z (MSB x) (MSB y) *) intros x y H' H'0 H'1. (* Goal: @eq Z (MSB x) (MSB y) *) case (FshiftCorrectSym radix) with (2 := H'1); auto. (* Goal: forall (x0 : nat) (_ : @ex nat (fun m : nat => @eq float (Fshift radix x0 x) (Fshift radix m y))), @eq Z (MSB x) (MSB y) *) intros m1 H'2; elim H'2; intros m2 E; clear H'2. (* Goal: @eq Z (LSB x) (LSB y) *) rewrite (LSB_shift x m1); auto. (* Goal: @eq Z (MSB (Fshift radix m1 x)) (MSB y) *) rewrite E; auto. (* Goal: @eq Z (LSB (Fshift radix m2 y)) (LSB y) *) apply sym_equal; apply LSB_shift; auto. (* Goal: not (is_Fzero y) *) apply (NisFzeroComp radix) with (x := x); auto. Qed. Theorem maxDiv_opp : forall (v : Z) (p : nat), maxDiv v p = maxDiv (- v) p. (* Goal: forall (v : Z) (p : nat), @eq nat (maxDiv v p) (maxDiv (Z.abs v) p) *) intros v p; elim p; simpl in |- *; auto. intros n H; case (ZdividesP v (radix * Zpower_nat radix n)); case (ZdividesP (- v) (radix * Zpower_nat radix n)); auto. (* Goal: forall (_ : not (Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n)))) (_ : Zdivides v (Z.mul radix (Zpower_nat radix n))), @eq nat (S n) (maxDiv (Z.abs v) n) *) (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) intros Z1 Z2; case Z1. (* Goal: Zdivides (Z.opp v) (Z.mul radix (Zpower_nat radix n)) *) (* Goal: forall (_ : Zdivides (Z.opp v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) case Z2; intros z1 Hz1; exists (- z1)%Z; rewrite Hz1; ring. (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) intros Z1 Z2; case Z2. (* Goal: Zdivides v (Z.mul radix (Zpower_nat radix n)) *) case Z1; intros z1 Hz1; exists (- z1)%Z. (* Goal: @eq Z v (Z.mul (Z.mul radix (Zpower_nat radix n)) (Z.opp z1)) *) rewrite <- (Zopp_involutive v); rewrite Hz1; ring. Qed. Theorem LSB_opp : forall x : float, LSB x = LSB (Fopp x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x; unfold LSB in |- *; simpl in |- *. (* Goal: @eq Z (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Fdigit radix (Fopp x))) (Fexp x))) *) rewrite Fdigit_opp; auto. (* Goal: @eq Z (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) (Z.add (Z.of_nat (maxDiv (Z.opp (Fnum x)) (Fdigit radix x))) (Fexp x)) *) rewrite maxDiv_opp; auto. Qed. Theorem maxDiv_abs : forall (v : Z) (p : nat), maxDiv v p = maxDiv (Zabs v) p. (* Goal: forall (v : Z) (p : nat), @eq nat (maxDiv v p) (maxDiv (Z.abs v) p) *) intros v p; elim p; simpl in |- *; auto. intros n H; case (ZdividesP v (radix * Zpower_nat radix n)); case (ZdividesP (Zabs v) (radix * Zpower_nat radix n)); auto. (* Goal: forall (_ : not (Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n)))) (_ : Zdivides v (Z.mul radix (Zpower_nat radix n))), @eq nat (S n) (maxDiv (Z.abs v) n) *) (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) intros Z1 Z2; case Z1. (* Goal: Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n)) *) (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) case Z2; intros z1 Hz1; exists (Zabs z1); rewrite Hz1. (* Goal: @eq Z (Z.abs (Z.mul (Z.mul radix (Zpower_nat radix n)) z1)) (Z.mul (Z.mul radix (Zpower_nat radix n)) (Z.abs z1)) *) (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) rewrite Zabs_Zmult; f_equal. apply Zabs_eq. auto with zarith. (* Goal: forall (_ : Zdivides (Z.abs v) (Z.mul radix (Zpower_nat radix n))) (_ : not (Zdivides v (Z.mul radix (Zpower_nat radix n)))), @eq nat (maxDiv v n) (S n) *) intros Z1 Z2; case Z2. (* Goal: Zdivides v (Z.mul radix (Zpower_nat radix n)) *) case Z1; intros z1 Hz1. (* Goal: Zdivides v (Z.mul radix (Zpower_nat radix n)) *) case (Zle_or_lt v 0); intros Z4. exists (- z1)%Z; rewrite <- (Zopp_involutive v); (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) rewrite <- (Zabs_eq_opp v); auto; rewrite Hz1; ring. (* Goal: Zdivides v (Z.mul radix (Zpower_nat radix n)) *) exists z1; rewrite <- (Zabs_eq v); auto with zarith; rewrite Hz1; ring. Qed. Theorem LSB_abs : forall x : float, LSB x = LSB (Fabs x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x; unfold LSB in |- *; simpl in |- *. (* Goal: @eq Z (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Fdigit radix (Fabs x))) (Fexp x))) *) rewrite Fdigit_abs; auto. (* Goal: @eq Z (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) (Z.add (Z.of_nat (maxDiv (Z.abs (Fnum x)) (Fdigit radix x))) (Fexp x)) *) rewrite maxDiv_abs; auto. Qed. Definition MSB (x : float) := Zpred (Z_of_nat (Fdigit radix x) + Fexp x). Theorem MSB_shift : forall (x : float) (n : nat), ~ is_Fzero x -> MSB x = MSB (Fshift radix n x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros; unfold MSB, Fshift, Fdigit in |- *; simpl in |- *. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite digitAdd; auto with zarith. (* Goal: @eq Z (Z.pred (Z.add (Z.of_nat (digit radix (Fnum x))) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Init.Nat.add (digit radix (Fnum x)) n)) (Z.sub (Fexp x) (Z.of_nat n)))) *) rewrite inj_plus; unfold Zpred in |- *; ring. Qed. Theorem MSB_comp : forall (x y : float) (n : nat), ~ is_Fzero x -> x = y :>R -> MSB x = MSB y. (* Goal: forall (x y : float) (_ : nat) (_ : not (is_Fzero x)) (_ : @eq R (FtoRradix x) (FtoRradix y)), @eq Z (MSB x) (MSB y) *) intros x y H' H'0 H'1. (* Goal: @eq Z (MSB x) (MSB y) *) case (FshiftCorrectSym radix) with (2 := H'1); auto. (* Goal: forall (x0 : nat) (_ : @ex nat (fun m : nat => @eq float (Fshift radix x0 x) (Fshift radix m y))), @eq Z (MSB x) (MSB y) *) intros m1 H'2; elim H'2; intros m2 E; clear H'2. (* Goal: @eq Z (MSB x) (MSB y) *) rewrite (MSB_shift x m1); auto. (* Goal: @eq Z (MSB (Fshift radix m1 x)) (MSB y) *) rewrite E; auto. (* Goal: @eq Z (MSB (Fshift radix m2 y)) (MSB y) *) apply sym_equal; apply MSB_shift; auto. (* Goal: not (is_Fzero y) *) apply (NisFzeroComp radix) with (x := x); auto. Qed. Theorem MSB_opp : forall x : float, MSB x = MSB (Fopp x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x; unfold MSB in |- *; simpl in |- *. (* Goal: @eq Z (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Fdigit radix (Fopp x))) (Fexp x))) *) rewrite Fdigit_opp; auto. Qed. Theorem MSB_abs : forall x : float, MSB x = MSB (Fabs x). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x; unfold MSB in |- *; simpl in |- *. (* Goal: @eq Z (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Fdigit radix (Fabs x))) (Fexp x))) *) rewrite Fdigit_abs; auto. Qed. Theorem LSB_le_MSB : forall x : float, ~ is_Fzero x -> (LSB x <= MSB x)%Z. (* Goal: forall (x : float) (_ : not (is_Fzero x)), Z.le (LSB x) (MSB x) *) intros x H'; unfold LSB, MSB in |- *. (* Goal: Z.le (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) *) apply Zle_Zpred. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) cut (maxDiv (Fnum x) (Fdigit radix x) < Fdigit radix x); auto with zarith. (* Goal: lt (maxDiv (Fnum x) (Fdigit radix x)) (Fdigit radix x) *) apply maxDivLt; auto. (* Goal: not (Zdivides v (Zpower_nat radix (digit radix v))) *) unfold Fdigit in |- *; apply NotDividesDigit; auto. Qed. Theorem Fexp_le_LSB : forall x : float, (Fexp x <= LSB x)%Z. (* Goal: forall x : float, Z.le (Fexp x) (LSB x) *) intros x; unfold LSB in |- *. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) auto with zarith. Qed. Theorem Ulp_Le_LSigB : forall x : float, (Float 1%nat (Fexp x) <= Float 1%nat (LSB x))%R. (* Goal: forall x : float, Rle (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) (FtoRradix (Float (Z.of_nat (S O)) (LSB x))) *) intros x; apply (oneExp_le radix); auto. (* Goal: Z.le (Fexp x) (LSB x) *) apply Fexp_le_LSB; auto. Qed. Theorem Fexp_le_MSB : forall x : float, ~ is_Fzero x -> (Fexp x <= MSB x)%Z. (* Goal: forall (x : float) (_ : not (is_Fzero x)), Z.le (Fexp x) (MSB x) *) intros x H'; unfold MSB in |- *. cut (Fdigit radix x <> 0%Z :>Z); unfold Zpred in |- *; (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) auto with zarith. (* Goal: not (@eq nat (Fdigit radix x) O) *) unfold Fdigit in |- *. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) red in |- *; intros H'0; absurd (digit radix (Fnum x) = 0); auto with zarith. (* Goal: not (@eq nat (digit radix (Fnum y)) O) *) apply not_eq_sym; apply lt_O_neq; apply digitNotZero; auto. Qed. Theorem MSB_le_abs : forall x : float, ~ is_Fzero x -> (Float 1%nat (MSB x) <= Fabs x)%R. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x H'; unfold MSB, FtoRradix, FtoR in |- *; simpl in |- *. replace (Zpred (Fdigit radix x + Fexp x)) with (Zpred (Fdigit radix x) + Fexp x)%Z; [ idtac | unfold Zpred in |- *; ring ]. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)))))) (powerRZ (IZR radix) (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)))) *) rewrite powerRZ_add; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (Rmult (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x)))) (powerRZ (IZR radix) (Fexp x)))) *) rewrite Rmult_1_l. (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Rmult (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x)))) (powerRZ (IZR radix) (Fexp x))) *) repeat rewrite (fun r : R => Rmult_comm r (powerRZ radix (Fexp x))). (* Goal: Rle (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Z.pred (Z.of_nat (Fdigit radix x))))) (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Z.abs (Fnum x)))) *) apply Rmult_le_compat_l; auto with real zarith. (* Goal: Rle (powerRZ (IZR radix) (Z.pred (Z.of_nat (Fdigit radix x)))) (IZR (Z.abs (Fnum x))) *) rewrite <- inj_pred; auto with real zarith. (* Goal: Rle (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred (Fdigit radix x)))) (IZR (Z.abs (Fnum x))) *) (* Goal: not (@eq nat (Fdigit radix x) O) *) rewrite <- Zpower_nat_Z_powerRZ; auto. (* Goal: Rle (IZR (Zpower_nat radix (Init.Nat.pred (Fdigit radix x)))) (IZR (Z.abs (Fnum x))) *) (* Goal: not (@eq nat (Fdigit radix x) O) *) apply Rle_IZR; auto. (* Goal: Z.lt (Z.abs (Fnum x)) (Zpower_nat radix (Fdigit radix (Fabs x))) *) unfold Fdigit in |- *; auto with arith. (* Goal: Z.le (Zpower_nat radix (Init.Nat.pred (digit radix (Fnum x)))) (Z.abs (Fnum x)) *) (* Goal: not (@eq nat (Fdigit radix x) O) *) apply digitLess; auto. (* Goal: not (@eq nat (Fdigit radix x) O) *) unfold Fdigit in |- *. (* Goal: not (@eq nat (digit radix (Fnum y)) O) *) apply not_eq_sym; apply lt_O_neq; apply digitNotZero; auto. Qed. Theorem abs_lt_MSB : forall x : float, (Fabs x < Float 1%nat (Zsucc (MSB x)))%R. (* Goal: forall x : float, Rlt (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB x)))) *) intros x. (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB x)))) *) rewrite (MSB_abs x). (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB (Fabs x))))) *) unfold MSB, FtoRradix, FtoR in |- *. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) rewrite <- Zsucc_pred; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)))))) (powerRZ (IZR radix) (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)))) *) rewrite powerRZ_add; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (Rmult (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x)))) (powerRZ (IZR radix) (Fexp x)))) *) rewrite Rmult_1_l. (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Rmult (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x)))) (powerRZ (IZR radix) (Fexp x))) *) repeat rewrite (fun r : R => Rmult_comm r (powerRZ radix (Fexp x))). (* Goal: Rlt (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Z.abs (Fnum x)))) (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x))))) *) apply Rmult_lt_compat_l; auto with real zarith. (* Goal: Rlt (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Z.of_nat (Fdigit radix (Fabs x)))) *) rewrite <- Zpower_nat_Z_powerRZ; auto with arith. (* Goal: Rlt (IZR (Z.abs (Fnum x))) (IZR (Zpower_nat radix (Fdigit radix (Fabs x)))) *) apply Rlt_IZR. (* Goal: Z.lt (Z.abs (Fnum x)) (Zpower_nat radix (Fdigit radix (Fabs x))) *) unfold Fdigit in |- *; auto with arith. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold Fabs in |- *; simpl in |- *. pattern (Zabs (Fnum x)) at 1 in |- *; rewrite <- (Zabs_eq (Zabs (Fnum x))); (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) auto with zarith. Qed. Theorem LSB_le_abs : forall x : float, ~ is_Fzero x -> (Float 1%nat (LSB x) <= Fabs x)%R. (* Goal: forall (x : float) (_ : not (is_Fzero x)), Rle (FtoRradix (Float (Z.of_nat (S O)) (LSB x))) (FtoRradix (Fabs x)) *) intros x H'; apply Rle_trans with (FtoRradix (Float 1%nat (MSB x))). (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fmult x y)))) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (Z.add (MSB x) (MSB y))))) *) apply (oneExp_le radix); auto. (* Goal: Z.le (LSB x) (MSB x) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB x))) (FtoRradix (Fabs x)) *) apply LSB_le_MSB; auto. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB x))) (FtoRradix (Fabs x)) *) apply MSB_le_abs; auto. Qed. Theorem MSB_monotoneAux : forall x y : float, (Fabs x <= Fabs y)%R -> Fexp x = Fexp y -> (MSB x <= MSB y)%Z. (* Goal: forall (x y : float) (_ : Rle (FtoRradix (Fabs x)) (FtoRradix (Fabs y))) (_ : @eq Z (Fexp x) (Fexp y)), Z.le (MSB x) (MSB y) *) intros x y H' H'0; unfold MSB in |- *. (* Goal: Z.le (Z.pred (Z.add (Z.of_nat (Fdigit radix x)) (Fexp x))) (Z.pred (Z.add (Z.of_nat (Fdigit radix y)) (Fexp y))) *) rewrite <- H'0. cut (Fdigit radix x <= Fdigit radix y)%Z; [ unfold Zpred in |- *; auto with zarith | idtac ]. (* Goal: Z.le (Z.of_nat (Fdigit radix x)) (Z.of_nat (Fdigit radix y)) *) unfold Fdigit in |- *; apply inj_le. (* Goal: le (digit radix (Fnum x)) (digit radix (Fnum y)) *) apply digit_monotone; auto. (* Goal: Z.le (Z.abs (Fnum x)) (Z.abs (Fnum y)) *) apply le_IZR. apply Rmult_le_reg_l with (r := powerRZ radix (Fexp x)); auto with real zarith. (* Goal: Rle (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Z.abs (Fnum x)))) (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Z.abs (Fnum y)))) *) repeat rewrite (Rmult_comm (powerRZ radix (Fexp x))); auto. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Z.abs (Fnum y))) (powerRZ (IZR radix) (Fexp x))) *) pattern (Fexp x) at 2 in |- *; rewrite H'0; auto. Qed. Theorem MSB_monotone : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (Fabs x <= Fabs y)%R -> (MSB x <= MSB y)%Z. (* Goal: forall (x y : float) (_ : not (is_Fzero x)) (_ : not (is_Fzero y)) (_ : Rle (FtoRradix (Fabs x)) (FtoRradix (Fabs y))), Z.le (MSB x) (MSB y) *) intros x y H' H'0 H'1; rewrite (MSB_abs x); rewrite (MSB_abs y). (* Goal: Z.le (MSB (Fabs x)) (MSB (Fabs y)) *) case (Zle_or_lt (Fexp (Fabs x)) (Fexp (Fabs y))); simpl in |- *; intros Zle1. rewrite MSB_shift with (x := Fabs y) (n := Zabs_nat (Fexp (Fabs y) - Fexp (Fabs x))). (* Goal: Z.le (MSB (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (MSB (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) apply MSB_monotoneAux; auto. (* Goal: Rle (FtoRradix (Fabs (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x)))) (FtoRradix (Fabs (Fabs y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) unfold FtoRradix in |- *; repeat rewrite Fabs_correct; auto with real arith. (* Goal: Rle (Rabs (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x)))) (Rabs (Rabs (FtoR radix y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) rewrite FshiftCorrect; auto with real arith. (* Goal: Rle (Rabs (FtoR radix (Fabs x))) (Rabs (Rabs (FtoR radix y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) repeat rewrite Fabs_correct; auto with real arith. repeat rewrite Rabs_Rabsolu; repeat rewrite <- Fabs_correct; auto with real arith. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.sub (Fexp x) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Fexp y))))) (Fexp y) *) (* Goal: not (is_Fzero (Fabs x)) *) rewrite inj_abs; [ ring | auto with zarith ]. (* Goal: not (is_Fzero (Fabs x)) *) apply Fabs_Fzero; auto. rewrite MSB_shift with (x := Fabs x) (n := Zabs_nat (Fexp (Fabs x) - Fexp (Fabs y))). (* Goal: Z.le (MSB (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (MSB (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) apply MSB_monotoneAux; auto. (* Goal: Rle (FtoRradix (Fabs (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x)))) (FtoRradix (Fabs (Fabs y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) unfold FtoRradix in |- *; repeat rewrite Fabs_correct; auto with real arith. (* Goal: Rle (Rabs (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x)))) (Rabs (Rabs (FtoR radix y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) rewrite FshiftCorrect; auto with real arith. (* Goal: Rle (Rabs (FtoR radix (Fabs x))) (Rabs (Rabs (FtoR radix y))) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp (Fabs x)) (Fexp (Fabs y)))) (Fabs x))) (Fexp (Fabs y)) *) (* Goal: not (is_Fzero (Fabs x)) *) repeat rewrite Fabs_correct; auto with real arith. repeat rewrite Rabs_Rabsolu; repeat rewrite <- Fabs_correct; auto with real arith. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.sub (Fexp x) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Fexp y))))) (Fexp y) *) (* Goal: not (is_Fzero (Fabs x)) *) rewrite inj_abs; [ ring | auto with zarith ]. (* Goal: not (is_Fzero (Fabs x)) *) apply Fabs_Fzero; auto. Qed. Theorem MSB_le_multAux : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (MSB x + MSB y <= MSB (Fmult x y))%Z. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x y H' H'0; unfold MSB, Fmult, Fdigit in |- *; simpl in |- *. replace (Zpred (digit radix (Fnum x) + Fexp x) + Zpred (digit radix (Fnum y) + Fexp y))%Z with (Zpred (digit radix (Fnum x) + Zpred (digit radix (Fnum y)) + (Fexp x + Fexp y))); [ idtac | unfold Zpred in |- *; ring ]. cut (digit radix (Fnum x) + Zpred (digit radix (Fnum y)) <= digit radix (Fnum x * Fnum y))%Z; [ unfold Zpred in |- *; auto with zarith | idtac ]. (* Goal: Z.le (Z.add (Z.of_nat (digit radix (Fnum x))) (Z.pred (Z.of_nat (digit radix (Fnum y))))) (Z.of_nat (digit radix (Z.mul (Fnum x) (Fnum y)))) *) rewrite <- inj_pred; auto with float zarith; try rewrite <- inj_plus. (* Goal: Z.le (Z.of_nat (Init.Nat.add (digit radix (Fnum x)) (Init.Nat.pred (digit radix (Fnum y))))) (Z.of_nat (digit radix (Z.mul (Fnum x) (Fnum y)))) *) (* Goal: not (@eq nat (digit radix (Fnum y)) O) *) apply inj_le. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite <- digitAdd; auto with zarith. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) apply digit_monotone; auto with zarith. (* Goal: Z.le (Z.abs (Z.mul (Fnum x) (Fnum y))) (Z.abs (Z.mul (Fnum x) (Zpower_nat radix (digit radix (Fnum y))))) *) repeat rewrite Zabs_Zmult. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) apply Zle_Zmult_comp_l; auto with zarith. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith. (* Goal: not (@eq nat (digit radix (Fnum y)) O) *) apply not_eq_sym; apply lt_O_neq; apply digitNotZero; auto. Qed. Theorem MSB_le_mult : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (Fmult (Float 1%nat (MSB x)) (Float 1%nat (MSB y)) <= Float 1%nat (MSB (Fmult x y)))%R. (* Goal: forall (x y : float) (_ : not (is_Fzero y)) (_ : Z.le (LSB x) (LSB y)), @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) intros x y H' H'0. (* Goal: Rle (FtoRradix (Fmult (Float (Z.of_nat (S O)) (MSB x)) (Float (Z.of_nat (S O)) (MSB y)))) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fmult x y)))) *) rewrite <- oneZplus. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fmult x y)))) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (Z.add (MSB x) (MSB y))))) *) apply (oneExp_le radix); auto. (* Goal: Z.le (Z.add (MSB x) (MSB y)) (MSB (Fmult x y)) *) apply MSB_le_multAux; auto. Qed. Theorem mult_le_MSBAux : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (MSB (Fmult x y) <= Zsucc (MSB x + MSB y))%Z. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) intros x y H' H'0; unfold MSB, Fmult, Fdigit in |- *; simpl in |- *. replace (Zsucc (Zpred (digit radix (Fnum x) + Fexp x) + Zpred (digit radix (Fnum y) + Fexp y))) with (Zpred (digit radix (Fnum x) + digit radix (Fnum y) + (Fexp x + Fexp y))); [ idtac | unfold Zpred, Zsucc in |- *; ring ]. cut (digit radix (Fnum x * Fnum y) <= digit radix (Fnum x) + digit radix (Fnum y))%Z; [ unfold Zpred in |- *; auto with zarith | idtac ]. (* Goal: Z.le (Z.of_nat (digit radix (Z.mul (Fnum x) (Fnum y)))) (Z.add (Z.of_nat (digit radix (Fnum x))) (Z.of_nat (digit radix (Fnum y)))) *) rewrite <- inj_plus. (* Goal: Z.le (Z.of_nat (digit radix (Z.mul (Fnum x) (Fnum y)))) (Z.of_nat (Init.Nat.add (digit radix (Fnum x)) (digit radix (Fnum y)))) *) apply inj_le; auto. (* Goal: le (digit radix (Z.mul (Fnum x) (Fnum y))) (Init.Nat.add (digit radix (Fnum x)) (digit radix (Fnum y))) *) rewrite <- digitAdd; auto with arith. (* Goal: le (digit radix (Z.mul (Fnum x) (Fnum y))) (digit radix (Z.mul (Fnum x) (Zpower_nat radix (digit radix (Fnum y))))) *) apply digit_monotone; auto with arith. (* Goal: Z.le (Z.abs (Z.mul (Fnum x) (Fnum y))) (Z.abs (Z.mul (Fnum x) (Zpower_nat radix (digit radix (Fnum y))))) *) repeat rewrite Zabs_Zmult. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) apply Zle_Zmult_comp_l; auto with zarith. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith. Qed. Theorem mult_le_MSB : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (Float 1%nat (MSB (Fmult x y)) <= radix * Fmult (Float 1%nat (MSB x)) (Float 1%nat (MSB y)))%R. (* Goal: Rle (FtoRradix (Fmult (Float (Z.of_nat (S O)) (MSB x)) (Float (Z.of_nat (S O)) (MSB y)))) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fmult x y)))) *) intros x y H' H'0; rewrite <- oneZplus. replace (radix * Float 1%nat (MSB x + MSB y))%R with (FtoRradix (Float 1%nat (Zsucc (MSB x + MSB y)))). (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fmult x y)))) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (Z.add (MSB x) (MSB y))))) *) apply (oneExp_le radix); auto. (* Goal: Z.le (MSB (Fmult x y)) (Z.succ (Z.add (MSB x) (MSB y))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (Z.add (MSB x) (MSB y))))) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (Z.add (MSB x) (MSB y))))) *) apply mult_le_MSBAux; auto. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.succ (MSB (Fabs x))))) (Rmult (IZR radix) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (MSB (Fabs x))))) *) rewrite powerRZ_Zs; auto with real zarith; ring. Qed. Theorem MSB_mix : forall x y : float, ~ is_Fzero x -> ~ is_Fzero y -> (Fabs x * Float 1%nat (MSB y) < radix * (Fabs y * Float 1%nat (MSB x)))%R. (* Goal: forall (x y : float) (_ : not (is_Fzero x)) (_ : not (is_Fzero y)), Rlt (Rmult (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (MSB y)))) (Rmult (IZR radix) (Rmult (FtoRradix (Fabs y)) (FtoRradix (Float (Z.of_nat (S O)) (MSB x))))) *) intros x y H' H'0; rewrite (MSB_abs x); rewrite (MSB_abs y). (* Goal: Rlt (Rmult (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs y))))) (Rmult (IZR radix) (Rmult (FtoRradix (Fabs y)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x)))))) *) apply Rle_lt_trans with (Fabs x * Fabs y)%R; auto with real. (* Goal: Rle (Rmult (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs y))))) (Rmult (FtoRradix (Fabs x)) (FtoRradix (Fabs y))) *) (* Goal: Rlt (Rmult (FtoRradix (Fabs x)) (FtoRradix (Fabs y))) (Rmult (IZR radix) (Rmult (FtoRradix (Fabs y)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x)))))) *) apply Rmult_le_compat_l; auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fabs x)) *) (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs y)))) (FtoRradix (Fabs y)) *) (* Goal: Rlt (Rmult (FtoRradix (Fabs x)) (FtoRradix (Fabs y))) (Rmult (IZR radix) (Rmult (FtoRradix (Fabs y)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x)))))) *) unfold FtoRradix in |- *; rewrite Fabs_correct; auto with real arith. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (MSB x))) (FtoRradix (Fabs x)) *) rewrite <- MSB_abs; apply MSB_le_abs; auto. (* Goal: Rlt (Rmult (FtoRradix (Fabs x)) (FtoRradix (Fabs y))) (Rmult (IZR radix) (Rmult (FtoRradix (Fabs y)) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x)))))) *) rewrite (Rmult_comm (Fabs x)). replace (radix * (Fabs y * Float 1%nat (MSB (Fabs x))))%R with (Fabs y * (radix * Float 1%nat (MSB (Fabs x))))%R; [ idtac | ring ]. (* Goal: Rlt (Rmult (FtoRradix (Fabs y)) (FtoRradix (Fabs x))) (Rmult (FtoRradix (Fabs y)) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x)))))) *) apply Rmult_lt_compat_l; auto with real. (* Goal: Rlt (IZR Z0) (FtoRradix (Fabs y)) *) (* Goal: Rlt (FtoRradix (Fabs x)) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real arith. rewrite Rmult_comm; replace 0%R with (powerRZ radix (Fexp y) * 0)%R; [ idtac | ring ]. (* Goal: Rlt (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR Z0)) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Z.abs (Fnum y)))) *) (* Goal: Rlt (FtoRradix (Fabs x)) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x))))) *) apply Rmult_lt_compat_l; auto with real arith. (* Goal: Rlt (IZR Z0) (IZR (Z.abs (Fnum y))) *) (* Goal: Rlt (FtoRradix (Fabs x)) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x))))) *) rewrite Zabs_absolu. replace 0%R with (INR 0); [ idtac | simpl in |- *; auto ]; rewrite <- INR_IZR_INZ; apply INR_lt_nm. (* Goal: lt O (Z.abs_nat (Fnum y)) *) (* Goal: Rlt (FtoRradix (Fabs x)) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x))))) *) apply absolu_lt_nz; auto. replace (radix * Float 1%nat (MSB (Fabs x)))%R with (FtoRradix (Float 1%nat (Zsucc (MSB (Fabs x))))). (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB (Fabs x))))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Z.succ (MSB (Fabs x))))) (Rmult (IZR radix) (FtoRradix (Float (Z.of_nat (S O)) (MSB (Fabs x))))) *) rewrite <- MSB_abs; apply abs_lt_MSB; auto. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.succ (MSB (Fabs x))))) (Rmult (IZR radix) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (MSB (Fabs x))))) *) rewrite powerRZ_Zs; auto with real zarith; ring. Qed. Theorem LSB_rep : forall x y : float, ~ is_Fzero y -> (LSB x <= LSB y)%Z -> exists z : Z, y = Float z (Fexp x) :>R. (* Goal: forall (x y : float) (_ : not (is_Fzero y)) (_ : Z.le (LSB x) (LSB y)), @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) intros x y H' H'0. (* Goal: @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) case (Zle_or_lt (Fexp x) (Fexp y)); intros Zl1. (* Goal: @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) (* Goal: @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) exists (Fnum y * Zpower_nat radix (Zabs_nat (Fexp y - Fexp x)))%Z. pattern (Fexp x) at 2 in |- *; replace (Fexp x) with (Fexp y - Zabs_nat (Fexp y - Fexp x))%Z. unfold FtoRradix in |- *; rewrite <- (FshiftCorrect radix) with (n := Zabs_nat (Fexp y - Fexp x)) (x := y); auto. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite inj_abs; try ring; auto with zarith. (* Goal: @ex Z (fun z : Z => @eq R (FtoRradix y) (FtoRradix (Float z (Fexp x)))) *) exists (Zquotient (Fnum y) (Zpower_nat radix (Zabs_nat (Fexp x - Fexp y)))). unfold FtoRradix in |- *; rewrite <- (FshiftCorrect radix) with (n := Zabs_nat (Fexp x - Fexp y)) (x := Float (Zquotient (Fnum y) (Zpower_nat radix (Zabs_nat (Fexp x - Fexp y)))) (Fexp x)); auto. (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold Fshift in |- *; simpl in |- *. cut (0 <= Fexp x - Fexp y)%Z; [ intros Le1; repeat rewrite inj_abs | auto with zarith ]; auto. (* Goal: @eq nat p (maxDiv v (S (Init.Nat.add O p))) *) (* Goal: forall (n : nat) (_ : @eq nat p (maxDiv v (S (Init.Nat.add n p)))), @eq nat p (maxDiv v (S (Init.Nat.add (S n) p))) *) unfold FtoR in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y))) (Rmult (IZR (Z.mul (Zquotient (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Fexp y))))) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Fexp y)))))) (powerRZ (IZR radix) (Z.sub (Fexp x) (Z.sub (Fexp x) (Fexp y))))) *) replace (Fexp x - (Fexp x - Fexp y))%Z with (Fexp y); [ idtac | ring ]. replace (Zquotient (Fnum y) (Zpower_nat radix (Zabs_nat (Fexp x - Fexp y))) * Zpower_nat radix (Zabs_nat (Fexp x - Fexp y)))%Z with ( Fnum y); auto. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) apply ZdividesZquotient; auto with zarith. apply ZdividesTrans with (m := Zpower_nat radix (maxDiv (Fnum y) (Fdigit radix y))). (* Goal: Zdivides (Fnum p) (Zpower_nat radix (maxDiv (Fnum p) (Fdigit radix p))) *) (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) apply maxDivCorrect. (* Goal: Zdivides (Zpower_nat radix (maxDiv (Fnum y) (Fdigit radix y))) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Fexp y)))) *) apply ZdividesLessPow; auto. (* Goal: le (Z.abs_nat (Z.sub (Fexp x) (Fexp y))) (maxDiv (Fnum y) (Fdigit radix y)) *) apply ZleLe. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite inj_abs; auto with zarith. (* Goal: Z.le (Z.sub (Fexp x) (Fexp y)) (Z.of_nat (maxDiv (Fnum y) (Fdigit radix y))) *) apply Zplus_le_reg_l with (p := Fexp y). (* Goal: Z.le (Z.add (Fexp y) (Z.sub (Fexp x) (Fexp y))) (Z.add (Fexp y) (Z.of_nat (maxDiv (Fnum y) (Fdigit radix y)))) *) apply Zle_trans with (LSB x). (* Goal: Z.le (Z.add (Fexp y) (Z.sub (Fexp x) (Fexp y))) (LSB x) *) (* Goal: Z.le (LSB x) (Z.add (Fexp y) (Z.of_nat (maxDiv (Fnum y) (Fdigit radix y)))) *) replace (Fexp y + (Fexp x - Fexp y))%Z with (Fexp x); [ idtac | ring ]. (* Goal: Z.le (Fexp x) (LSB x) *) (* Goal: Z.le (LSB x) (Z.add (Fexp y) (Z.of_nat (maxDiv (Fnum y) (Fdigit radix y)))) *) apply Fexp_le_LSB. (* Goal: Z.le (LSB x) (Z.add (Fexp y) (Z.of_nat (maxDiv (Fnum y) (Fdigit radix y)))) *) rewrite Zplus_comm; auto. Qed. Theorem LSB_rep_min : forall p : float, exists z : Z, p = Float z (LSB p) :>R. intros p; exists (Zquotient (Fnum p) (Zpower_nat radix (Zabs_nat (LSB p - Fexp p)))). (* Goal: forall _ : @eq nat p (maxDiv v (S p)), False *) unfold FtoRradix, FtoR, LSB in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)))))) (powerRZ (IZR radix) (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)))) *) rewrite powerRZ_add; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)))))) (Rmult (powerRZ (IZR radix) (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p)))) (powerRZ (IZR radix) (Fexp p)))) *) rewrite <- Rmult_assoc. replace (maxDiv (Fnum p) (Fdigit radix p) + Fexp p - Fexp p)%Z with (Z_of_nat (maxDiv (Fnum p) (Fdigit radix p))); auto. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))))))) (powerRZ (IZR radix) (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) rewrite absolu_INR. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite <- Zpower_nat_Z_powerRZ; auto with zarith. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rmult (IZR (Zquotient (Fnum p) (Zpower_nat radix (maxDiv (Fnum p) (Fdigit radix p))))) (IZR (Zpower_nat radix (maxDiv (Fnum p) (Fdigit radix p))))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) rewrite <- Rmult_IZR. (* Goal: Z.le (Fexp x) (Z.add (Z.of_nat (maxDiv (Fnum x) (Fdigit radix x))) (Fexp x)) *) rewrite <- ZdividesZquotient; auto with zarith. (* Goal: Zdivides (Fnum p) (Zpower_nat radix (maxDiv (Fnum p) (Fdigit radix p))) *) (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) apply maxDivCorrect. (* Goal: @eq Z (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Z.sub (Z.add (Z.of_nat (maxDiv (Fnum p) (Fdigit radix p))) (Fexp p)) (Fexp p)) *) ring. Qed. End mf.
(**************************************************************************** IEEE754 : Fop Laurent Thery ******************************************************************************) Require Export Fcomp. Section operations. Variable radix : Z. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixNotZero : (0 < radix)%Z. Definition Fplus (x y : float) := Float (Fnum x * Zpower_nat radix (Zabs_nat (Fexp x - Zmin (Fexp x) (Fexp y))) + Fnum y * Zpower_nat radix (Zabs_nat (Fexp y - Zmin (Fexp x) (Fexp y)))) (Zmin (Fexp x) (Fexp y)). Theorem Fplus_correct : forall x y : float, Fplus x y = (x + y)%R :>R. (* Goal: forall x y : float, @eq R (FtoRradix (Fplus x y)) (Rplus (FtoRradix x) (FtoRradix y)) *) intros x y; unfold Fplus, Fshift, FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Fnum x) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))) (Z.mul (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))))) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rplus (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) rewrite plus_IZR. (* Goal: @eq R (Rmult (Rplus (IZR (Z.mul (Fnum x) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Z.mul (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))))) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rplus (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) rewrite Rmult_comm; rewrite Rmult_plus_distr_l; auto. (* Goal: @eq R (Rmult (IZR (Z.mul (Fnum x) (Fnum y))) (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y)))) (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) repeat rewrite Rmult_IZR. (* Goal: @eq R (Rplus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum x)) (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum y)) (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))))) (Rplus (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) repeat rewrite (Rmult_comm (Fnum x)); repeat rewrite (Rmult_comm (Fnum y)). (* Goal: @eq R (Rplus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))) (IZR (Fnum x)))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))) (IZR (Fnum y))))) (Rplus (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y)))) *) repeat rewrite Zpower_nat_Z_powerRZ; auto. (* Goal: @eq R (Rmult (IZR (Fnum x)) (Rmult (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y))) (IZR (Fnum y)))) (Rmult (IZR (Fnum x)) (Rmult (powerRZ (IZR radix) (Fexp x)) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y))))) *) repeat rewrite <- Rmult_assoc. (* Goal: @eq R (Rplus (Rmult (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum x))) (Rmult (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum y)))) (Rplus (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y)))) *) repeat rewrite <- powerRZ_add; auto with real zarith arith. (* Goal: @eq R (Rplus (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum y)))) (Rplus (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y)))) *) repeat rewrite inj_abs; auto with real zarith. (* Goal: @eq R (Rplus (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))) (IZR (Fnum y)))) (Rplus (Rmult (powerRZ (IZR radix) (Fexp x)) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y)))) *) repeat rewrite Zplus_minus; auto. Qed. Definition Fopp (x : float) := Float (- Fnum x) (Fexp x). Theorem Fopp_correct : forall x : float, Fopp x = (- x)%R :>R. (* Goal: forall x : float, @eq R (FtoRradix (Fopp x)) (Ropp (FtoRradix x)) *) unfold FtoRradix, FtoR, Fopp in |- *; simpl in |- *. (* Goal: forall x : float, @eq R (Rmult (IZR (Z.opp (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Ropp (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x)))) *) intros x. (* Goal: @eq R (Rmult (IZR (Z.opp (Fnum x))) (powerRZ (IZR radix) (Fexp x))) (Ropp (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x)))) *) rewrite Ropp_Ropp_IZR; auto with real. Qed. Theorem Fopp_Fopp : forall p : float, Fopp (Fopp p) = p. (* Goal: forall p : float, @eq float (Fopp (Fopp p)) p *) intros p; case p; unfold Fopp in |- *; simpl in |- *; auto. (* Goal: forall Fnum Fexp : Z, @eq float (Float (Z.opp (Z.opp Fnum)) Fexp) (Float Fnum Fexp) *) intros; rewrite Zopp_involutive; auto. Qed. Theorem Fzero_opp : forall f : float, ~ is_Fzero f -> ~ is_Fzero (Fopp f). intros f; case f; intros n e; case n; unfold is_Fzero in |- *; simpl in |- *; auto with zarith; intros; red in |- *; intros; discriminate. Qed. Theorem Fdigit_opp : forall x : float, Fdigit radix (Fopp x) = Fdigit radix x. (* Goal: forall x : float, @eq nat (Fdigit radix (Fopp x)) (Fdigit radix x) *) intros x; unfold Fopp, Fdigit in |- *; simpl in |- *. (* Goal: @eq nat (digit radix (Z.opp (Fnum x))) (digit radix (Fnum x)) *) rewrite <- (digit_abs radix (- Fnum x)). (* Goal: @eq nat (digit radix (Z.abs (Z.opp (Fnum x)))) (digit radix (Fnum x)) *) rewrite <- (digit_abs radix (Fnum x)). (* Goal: @eq nat (digit radix (Z.abs (Z.opp (Fnum x)))) (digit radix (Z.abs (Fnum x))) *) case (Fnum x); simpl in |- *; auto. Qed. Definition Fabs (x : float) := Float (Zabs (Fnum x)) (Fexp x). Theorem Fabs_correct1 : forall x : float, (0 <= FtoR radix x)%R -> Fabs x = x :>R. (* Goal: forall (x : float) (_ : Rle (FtoR radix x) (IZR Z0)), @eq R (FtoRradix (Fabs x)) (Ropp (FtoRradix x)) *) intros x; case x; unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: forall (Fnum Fexp : Z) (_ : Rle (Rmult (IZR Fnum) (powerRZ (IZR radix) Fexp)) (IZR Z0)), @eq R (Rmult (IZR (Z.abs Fnum)) (powerRZ (IZR radix) Fexp)) (Ropp (Rmult (IZR Fnum) (powerRZ (IZR radix) Fexp))) *) intros Fnum1 Fexp1 H'. repeat rewrite <- (Rmult_comm (powerRZ radix Fexp1)); apply Rmult_eq_compat_l; auto. (* Goal: @eq R (IZR (Z.abs Fnum1)) (IZR Fnum1) *) cut (0 <= Fnum1)%Z. (* Goal: forall _ : Z.le Fnum1 Z0, @eq R (IZR (Z.abs Fnum1)) (Ropp (IZR Fnum1)) *) (* Goal: Z.le Fnum1 Z0 *) unfold Zabs, Zle in |- *. (* Goal: forall _ : not (@eq comparison (Z.compare Z0 Fnum1) Gt), @eq R (IZR match Fnum1 with | Z0 => Z0 | Zpos p => Zpos p | Zneg p => Zpos p end) (IZR Fnum1) *) (* Goal: Z.le Z0 Fnum1 *) case Fnum1; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : not (@eq comparison (Z.compare (Zpos p) Z0) Gt)), @eq R (IPR p) (Ropp (IPR p)) *) (* Goal: Z.le Fnum1 Z0 *) intros p H'0; case H'0; auto. (* Goal: Z.le Z0 Fnum1 *) apply Znot_gt_le; auto. (* Goal: not (@eq nat (Z.abs_nat (Fnum p)) O) *) Contradict H'. (* Goal: not (Rle (Rmult (IZR Fnum1) (powerRZ (IZR radix) Fexp1)) (IZR Z0)) *) apply Rgt_not_le; auto. (* Goal: Rgt (Rmult (IZR Fnum1) (powerRZ (IZR radix) Fexp1)) (IZR Z0) *) rewrite Rmult_comm. (* Goal: Rgt (Rmult (powerRZ (IZR radix) Fexp1) (IZR Fnum1)) (IZR Z0) *) replace 0%R with (powerRZ radix Fexp1 * 0)%R; auto with real. (* Goal: Rgt (Rmult (powerRZ (IZR radix) Fexp1) (IZR Z0)) (Rmult (powerRZ (IZR radix) Fexp1) (IZR Fnum1)) *) red in |- *; apply Rmult_lt_compat_l; auto with real zarith. Qed. Theorem Fabs_correct2 : forall x : float, (FtoR radix x <= 0)%R -> Fabs x = (- x)%R :>R. (* Goal: forall (x : float) (_ : Rle (FtoR radix x) (IZR Z0)), @eq R (FtoRradix (Fabs x)) (Ropp (FtoRradix x)) *) intros x; case x; unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: forall (Fnum Fexp : Z) (_ : Rle (Rmult (IZR Fnum) (powerRZ (IZR radix) Fexp)) (IZR Z0)), @eq R (Rmult (IZR (Z.abs Fnum)) (powerRZ (IZR radix) Fexp)) (Ropp (Rmult (IZR Fnum) (powerRZ (IZR radix) Fexp))) *) intros Fnum1 Fexp1 H'. rewrite <- Ropp_mult_distr_l_reverse; repeat rewrite <- (Rmult_comm (powerRZ radix Fexp1)); apply Rmult_eq_compat_l; auto. (* Goal: @eq R (IZR (Z.abs Fnum1)) (Ropp (IZR Fnum1)) *) cut (Fnum1 <= 0)%Z. (* Goal: forall _ : Z.le Fnum1 Z0, @eq R (IZR (Z.abs Fnum1)) (Ropp (IZR Fnum1)) *) (* Goal: Z.le Fnum1 Z0 *) unfold Zabs, Zle in |- *. (* Goal: forall _ : not (@eq comparison (Z.compare Fnum1 Z0) Gt), @eq R (IZR match Fnum1 with | Z0 => Z0 | Zpos p => Zpos p | Zneg p => Zpos p end) (Ropp (IZR Fnum1)) *) (* Goal: Z.le Fnum1 Z0 *) case Fnum1; unfold IZR; auto with real. (* Goal: forall (p : positive) (_ : not (@eq comparison (Z.compare (Zpos p) Z0) Gt)), @eq R (IPR p) (Ropp (IPR p)) *) (* Goal: Z.le Fnum1 Z0 *) intros p H'0; case H'0; auto. (* Goal: Z.le Fnum1 Z0 *) apply Znot_gt_le. (* Goal: not (@eq nat (Z.abs_nat (Fnum p)) O) *) Contradict H'. (* Goal: not (Rle (Rmult (IZR Fnum1) (powerRZ (IZR radix) Fexp1)) (IZR Z0)) *) apply Rgt_not_le; auto. (* Goal: Rgt (Rmult (IZR Fnum1) (powerRZ (IZR radix) Fexp1)) (IZR Z0) *) rewrite Rmult_comm. (* Goal: Rgt (Rmult (powerRZ (IZR radix) Fexp1) (IZR Fnum1)) (IZR Z0) *) replace 0%R with (powerRZ radix Fexp1 * 0)%R; auto with real. (* Goal: Rgt (Rmult (powerRZ (IZR radix) Fexp1) (IZR Fnum1)) (Rmult (powerRZ (IZR radix) Fexp1) (IZR Z0)) *) red in |- *; apply Rmult_lt_compat_l; auto with real arith. (* Goal: Rlt (IZR Z0) (IZR Fnum1) *) replace 0%R with (IZR 0); auto with real zarith arith. Qed. Theorem Fabs_correct : forall x : float, Fabs x = Rabs x :>R. (* Goal: forall x : float, @eq R (FtoRradix (Fabs x)) (Rabs (FtoRradix x)) *) intros x; unfold Rabs in |- *. (* Goal: @eq R (FtoRradix (Fabs x)) (if Rcase_abs (FtoRradix x) then Ropp (FtoRradix x) else FtoRradix x) *) case (Rcase_abs x); intros H1. (* Goal: @eq R (FtoRradix (Fabs x)) (Ropp (FtoRradix x)) *) (* Goal: @eq R (FtoRradix (Fabs x)) (FtoRradix x) *) unfold FtoRradix in |- *; apply Fabs_correct2; auto with arith. (* Goal: Rle (FtoR radix x) (IZR Z0) *) (* Goal: @eq R (FtoRradix (Fabs x)) (FtoRradix x) *) apply Rlt_le; auto. (* Goal: @eq R (FtoRradix (Fabs x)) (FtoRradix x) *) unfold FtoRradix in |- *; apply Fabs_correct1; auto with arith. (* Goal: Rle (IZR Z0) (FtoR radix x) *) apply Rge_le; auto. Qed. Theorem RleFexpFabs : forall p : float, p <> 0%R :>R -> (Float 1%nat (Fexp p) <= Fabs p)%R. (* Goal: forall (p : float) (_ : not (@eq R (FtoRradix p) (IZR Z0))), Rle (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (FtoRradix (Fabs p)) *) intros p H'. (* Goal: Rle (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (FtoRradix (Fabs p)) *) unfold FtoRradix, FtoR, Fabs in |- *; simpl in |- *. (* Goal: Rle (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) *) apply Rmult_le_compat_r; auto with real arith. (* Goal: Rle (IZR (Zpos xH)) (IZR (Z.abs (Fnum p))) *) rewrite Zabs_absolu. (* Goal: Rle (IZR (Zpos xH)) (IZR (Z.of_nat (Z.abs_nat (Fnum p)))) *) replace 1%R with (INR 1); auto with real. (* Goal: Rle (INR (S O)) (IZR (Z.of_nat (Z.abs_nat (Fnum p)))) *) repeat rewrite <- INR_IZR_INZ; apply Rle_INR; auto. (* Goal: le (S O) (Z.abs_nat (Fnum p)) *) cut (Zabs_nat (Fnum p) <> 0); auto with zarith. (* Goal: not (@eq nat (Z.abs_nat (Fnum p)) O) *) Contradict H'. (* Goal: @eq R (FtoRradix p) (IZR Z0) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (IZR Z0) *) replace (Fnum p) with 0%Z; try (simpl;ring). generalize H'; case (Fnum p); simpl in |- *; auto with zarith arith; intros p0 H'3; Contradict H'3; auto with zarith arith. Qed. Theorem Fabs_Fzero : forall x : float, ~ is_Fzero x -> ~ is_Fzero (Fabs x). (* Goal: forall (x : float) (_ : not (is_Fzero x)), not (is_Fzero (Fabs x)) *) intros x; case x; unfold is_Fzero in |- *; simpl in |- *. intros n m; case n; simpl in |- *; auto with zarith; intros; red in |- *; discriminate. Qed. Hint Resolve Fabs_Fzero: float. Theorem Fdigit_abs : forall x : float, Fdigit radix (Fabs x) = Fdigit radix x. (* Goal: forall x : float, @eq nat (Fdigit radix (Fabs x)) (Fdigit radix x) *) intros x; unfold Fabs, Fdigit in |- *; simpl in |- *. (* Goal: @eq nat (digit radix (Z.abs (Fnum x))) (digit radix (Fnum x)) *) case (Fnum x); auto. Qed. Definition Fminus (x y : float) := Fplus x (Fopp y). Theorem Fminus_correct : forall x y : float, Fminus x y = (x - y)%R :>R. (* Goal: forall x y : float, @eq R (FtoRradix (Fminus x y)) (Rminus (FtoRradix x) (FtoRradix y)) *) intros x y; unfold Fminus in |- *. (* Goal: @eq R (FtoRradix (Fplus x (Fopp y))) (Rminus (FtoRradix x) (FtoRradix y)) *) rewrite Fplus_correct. (* Goal: @eq R (Rplus (FtoRradix x) (FtoRradix (Fopp y))) (Rminus (FtoRradix x) (FtoRradix y)) *) rewrite Fopp_correct; auto. Qed. Theorem Fopp_Fminus : forall p q : float, Fopp (Fminus p q) = Fminus q p. intros p q; case p; case q; unfold Fopp, Fminus, Fplus in |- *; simpl in |- *; auto. intros; apply floatEq; simpl in |- *; repeat rewrite (Zmin_sym Fexp0 Fexp); repeat rewrite Zopp_mult_distr_l_reverse; auto with zarith. Qed. Theorem Fopp_Fminus_dist : forall p q : float, Fopp (Fminus p q) = Fminus (Fopp p) (Fopp q). intros p q; case p; case q; unfold Fopp, Fminus, Fplus in |- *; simpl in |- *; auto. intros; apply floatEq; simpl in |- *; repeat rewrite (Zmin_sym Fexp0 Fexp); repeat rewrite Zopp_mult_distr_l_reverse; auto with zarith. Qed. Theorem minusSameExp : forall x y : float, Fexp x = Fexp y -> Fminus x y = Float (Fnum x - Fnum y) (Fexp x). (* Goal: forall (x y : float) (_ : @eq Z (Fexp x) (Fexp y)), @eq float (Fminus x y) (Float (Z.sub (Fnum x) (Fnum y)) (Fexp x)) *) intros x y; case x; case y; unfold Fminus, Fplus, Fopp in |- *; simpl in |- *. (* Goal: forall (Fnum Fexp Fnum0 Fexp0 : Z) (_ : @eq Z Fexp0 Fexp), @eq float (Float (Z.add (Z.mul Fnum0 (Zpower_nat radix (Z.abs_nat (Z.sub Fexp0 (Z.min Fexp0 Fexp))))) (Z.mul (Z.opp Fnum) (Zpower_nat radix (Z.abs_nat (Z.sub Fexp (Z.min Fexp0 Fexp)))))) (Z.min Fexp0 Fexp)) (Float (Z.sub Fnum0 Fnum) Fexp0) *) intros Fnum1 Fexp1 Fnum2 Fexp2 H'; rewrite <- H'. (* Goal: @eq float (Float (Z.add (Z.mul Fnum2 (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 (Z.min Fexp2 Fexp2))))) (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 (Z.min Fexp2 Fexp2)))))) (Z.min Fexp2 Fexp2)) (Float (Z.sub Fnum2 Fnum1) Fexp2) *) repeat rewrite Zmin_n_n. (* Goal: @eq float (Float (Z.add (Z.mul Fnum2 (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 Fexp2)))) (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 Fexp2))))) Fexp2) (Float (Z.sub Fnum2 Fnum1) Fexp2) *) apply floatEq; simpl in |- *; auto. (* Goal: @eq Z (Z.add (Z.mul Fnum2 (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 Fexp2)))) (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Z.abs_nat (Z.sub Fexp2 Fexp2))))) (Z.sub Fnum2 Fnum1) *) replace (Zabs_nat (Fexp2 - Fexp2)) with 0; auto with zarith arith. replace (Zpower_nat radix 0) with (Z_of_nat 1); simpl in |- *; auto with zarith arith. (* Goal: @eq nat O (Z.abs_nat (Z.sub Fexp2 Fexp2)) *) replace (Fexp2 - Fexp2)%Z with 0%Z; simpl in |- *; auto with zarith arith. Qed. Definition Fmult (x y : float) := Float (Fnum x * Fnum y) (Fexp x + Fexp y). Definition Fmult_correct : forall x y : float, Fmult x y = (x * y)%R :>R. (* Goal: forall x y : float, @eq R (FtoRradix (Fmult x y)) (Rmult (FtoRradix x) (FtoRradix y)) *) intros x y; unfold FtoRradix, FtoR, Fmult in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Z.mul (Fnum x) (Fnum y))) (powerRZ (IZR radix) (Z.add (Fexp x) (Fexp y)))) (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) rewrite powerRZ_add; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Z.mul (Fnum x) (Fnum y))) (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y)))) (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) repeat rewrite Rmult_IZR. (* Goal: @eq R (Rmult (Rmult (IZR (Fnum x)) (IZR (Fnum y))) (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y)))) (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y)))) *) repeat rewrite Rmult_assoc. (* Goal: @eq R (Rmult (IZR (Fnum x)) (Rmult (IZR (Fnum y)) (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y))))) (Rmult (IZR (Fnum x)) (Rmult (powerRZ (IZR radix) (Fexp x)) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp y))))) *) repeat rewrite (Rmult_comm (Fnum y)). (* Goal: @eq R (Rmult (IZR (Fnum x)) (Rmult (Rmult (powerRZ (IZR radix) (Fexp x)) (powerRZ (IZR radix) (Fexp y))) (IZR (Fnum y)))) (Rmult (IZR (Fnum x)) (Rmult (powerRZ (IZR radix) (Fexp x)) (Rmult (powerRZ (IZR radix) (Fexp y)) (IZR (Fnum y))))) *) repeat rewrite <- Rmult_assoc. (* Goal: @eq R (Rmult (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (powerRZ (IZR radix) (Fexp y))) (IZR (Fnum y))) (Rmult (Rmult (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (powerRZ (IZR radix) (Fexp y))) (IZR (Fnum y))) *) repeat rewrite Zmult_assoc_reverse; auto. Qed. Theorem oneZplus : forall x y : Z, Float 1%nat (x + y) = Fmult (Float 1%nat x) (Float 1%nat y). (* Goal: forall x y : Z, @eq float (Float (Z.of_nat (S O)) (Z.add x y)) (Fmult (Float (Z.of_nat (S O)) x) (Float (Z.of_nat (S O)) y)) *) intros x y; unfold Fmult in |- *; auto. Qed. End operations. Hint Resolve Fabs_Fzero: float. Hint Resolve Fzero_opp: float.
(**************************************************************************** IEEE754 : FSucc Laurent Thery ******************************************************************************) Require Export List. Require Export Fnorm. Section suc. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionNotZero : precision <> 0. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition FSucc (x : float) := match Z_eq_bool (Fnum x) (pPred (vNum b)) with | true => Float (nNormMin radix precision) (Zsucc (Fexp x)) | false => match Z_eq_bool (Fnum x) (- nNormMin radix precision) with | true => match Z_eq_bool (Fexp x) (- dExp b) with | true => Float (Zsucc (Fnum x)) (Fexp x) | false => Float (- pPred (vNum b)) (Zpred (Fexp x)) end | false => Float (Zsucc (Fnum x)) (Fexp x) end end. Theorem FSuccSimpl1 : forall x : float, Fnum x = pPred (vNum b) -> FSucc x = Float (nNormMin radix precision) (Zsucc (Fexp x)). (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (FSucc x) (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) intros x H'; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum x) (pPred (vNum b))); case (Z_eq_bool (Fnum x) (pPred (vNum b))); auto. (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)) (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) intros H'0; Contradict H'0; auto. Qed. Theorem FSuccSimpl2 : forall x : float, Fnum x = (- nNormMin radix precision)%Z -> Fexp x <> (- dExp b)%Z -> FSucc x = Float (- pPred (vNum b)) (Zpred (Fexp x)). (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))), @eq float (FSucc x) (Float (Z.succ (Fnum x)) (Fexp x)) *) intros x H' H'0; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum x) (pPred (vNum b))); case (Z_eq_bool (Fnum x) (pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)), @eq float (Float (nNormMin radix precision) (Z.succ (Z.opp (Z.of_N (dExp b))))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; absurd (0%nat <= pPred (vNum b))%Z; auto with zarith arith. (* Goal: not (Z.le (Z.of_nat O) (pPred (vNum b))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)) (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) rewrite <- H'1; rewrite H'. (* Goal: not (Z.le (Z.of_nat O) (Z.opp (nNormMin radix precision))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold nNormMin in |- *; simpl in |- *; auto with zarith. (* Goal: not (Z.le Z0 (Z.opp (Zpower_nat radix (Init.Nat.pred precision)))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) replace 0%Z with (- (0))%Z; auto with zarith. (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold pPred in |- *; apply Zle_Zpred; auto with zarith. intros H'1; generalize (Z_eq_bool_correct (Fnum x) (- nNormMin radix precision)); case (Z_eq_bool (Fnum x) (- nNormMin radix precision)). intros H'2; generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); auto. (* Goal: forall _ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))), @eq float (Float (Z.succ (Fnum x)) (Fexp x)) (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))), @eq float (Float (Z.succ (Fnum x)) (Fexp x)) (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) intros H'3; Contradict H'0; auto. (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))), @eq float (Float (Z.succ (Fnum x)) (Fexp x)) (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) intros H'2; Contradict H'2; auto. Qed. Theorem FSuccSimpl3 : FSucc (Float (- nNormMin radix precision) (- dExp b)) = Float (Zsucc (- nNormMin radix precision)) (- dExp b). (* Goal: @eq float (FSucc (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold FSucc in |- *; simpl in |- *. generalize (Z_eq_bool_correct (- nNormMin radix precision) (pPred (vNum b))); case (Z_eq_bool (- nNormMin radix precision) (pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)), @eq float (Float (nNormMin radix precision) (Z.succ (Z.opp (Z.of_N (dExp b))))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; absurd (0%nat <= pPred (vNum b))%Z; auto with zarith arith. (* Goal: not (Z.le (Z.of_nat O) (pPred (vNum b))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) rewrite <- H'1. (* Goal: not (Z.le (Z.of_nat O) (Z.opp (nNormMin radix precision))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold nNormMin in |- *; simpl in |- *; auto with zarith. (* Goal: not (Z.le Z0 (Z.opp (Zpower_nat radix (Init.Nat.pred precision)))) *) (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) replace 0%Z with (- (0))%Z; auto with zarith. (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold pPred in |- *; apply Zle_Zpred; auto with zarith. intros H'; generalize (Z_eq_bool_correct (- nNormMin radix precision) (- nNormMin radix precision)); case (Z_eq_bool (- nNormMin radix precision) (- nNormMin radix precision)). intros H'0; generalize (Z_eq_bool_correct (- dExp b) (- dExp b)); case (Z_eq_bool (- dExp b) (- dExp b)); auto. (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; Contradict H'1; auto. (* Goal: forall _ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; Contradict H'1; auto. Qed. Theorem FSuccSimpl4 : forall x : float, Fnum x <> pPred (vNum b) -> Fnum x <> (- nNormMin radix precision)%Z -> FSucc x = Float (Zsucc (Fnum x)) (Fexp x). (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))), @eq float (FSucc x) (Float (Z.succ (Fnum x)) (Fexp x)) *) intros x H' H'0; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum x) (pPred (vNum b))); case (Z_eq_bool (Fnum x) (pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Fnum x) (pPred (vNum b)), @eq float (Float (nNormMin radix precision) (Z.succ (Fexp x))) (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)) (Float (Z.succ (Fnum x)) (Fexp x)) *) intros H'1; Contradict H'; auto. intros H'1; generalize (Z_eq_bool_correct (Fnum x) (- nNormMin radix precision)); case (Z_eq_bool (Fnum x) (- nNormMin radix precision)); auto. (* Goal: forall _ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision)), @eq float (if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) (Float (Z.succ (Fnum x)) (Fexp x)) *) intros H'2; Contradict H'0; auto. Qed. Theorem FSuccDiff1 : forall x : float, Fnum x <> (- nNormMin radix precision)%Z -> Fminus radix (FSucc x) x = Float 1%nat (Fexp x) :>R. (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) intros x H'. generalize (Z_eq_bool_correct (Fnum x) (pPred (vNum b))); case (Z_eq_bool (Fnum x) (pPred (vNum b))); intros H'1. (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite FSuccSimpl1; auto. (* Goal: @eq R (FtoRradix (Fminus radix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) unfold FtoRradix, FtoR, Fminus, Fopp, Fplus in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (nNormMin radix precision) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.succ (Fexp x)) (Z.min (Z.succ (Fexp x)) (Fexp x)))))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Z.succ (Fexp x)) (Fexp x)))))))) (powerRZ (IZR radix) (Z.min (Z.succ (Fexp x)) (Fexp x)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) (* Goal: @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) repeat rewrite Zmin_le2; auto with zarith. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (nNormMin radix precision) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.succ (Fexp x)) (Fexp x))))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Fexp x))))))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) (* Goal: @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) rewrite <- Zminus_succ_l; repeat rewrite <- Zminus_diag_reverse. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.opp (pPred (vNum b))) (Zpower_nat radix (Z.abs_nat Z0))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.succ Z0)))))) (powerRZ (IZR radix) (Z.pred (Fexp x)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.pred (Fexp x)))) *) rewrite absolu_Zs; auto with zarith; simpl in |- *. rewrite H'1; unfold pPred in |- *; rewrite pGivesBound; unfold nNormMin in |- *. replace (Zpower_nat radix (pred precision) * (radix * 1))%Z with (* Goal: @eq R (Rmult (Rplus (Ropp (Rplus (IZR (Zpower_nat radix precision)) (IZR (Zneg xH)))) (IZR (Zpower_nat radix precision))) (powerRZ (IZR radix) (Z.add (Fexp x) (Zneg xH)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.add (Fexp x) (Zneg xH)))) *) (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) (Zpower_nat radix precision). f_equal. unfold Zpred. (* Goal: @eq R (IZR (Z.add (Zpower_nat radix precision) (Z.mul (Z.opp (Z.add (Zpower_nat radix precision) (Zneg xH))) (Zpos xH)))) (IZR (Zpos xH)) *) (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) (Z.mul radix (Zpos xH))) *) (* Goal: @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) rewrite Z.opp_add_distr. rewrite Z.mul_1_r. rewrite Z.add_assoc. now rewrite Z.add_opp_diag_r. (*rewrite plus_IZR; rewrite Rmult_IZR; simpl in |- *. unfold Zpred in |- *; unfold Zminus in |- *; simpl in |- *. (* Goal: @eq Z (Z.mul (nNormMin radix precision) (Z.mul radix (Zpos xH))) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) repeat ring_simplify. ring.*) rewrite Z.mul_1_r. (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) pattern precision at 1 in |- *; replace precision with (pred precision + 1). (* Goal: @eq Z (Zpower_nat radix (Init.Nat.add (Init.Nat.pred precision) (S O))) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.pred precision) (S O)) precision *) rewrite Zpower_nat_is_exp; rewrite Zpower_nat_1; auto. generalize precisionNotZero; case precision; simpl in |- *; auto with zarith arith. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: @eq R (FtoRradix (Fminus radix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) unfold FtoRradix, FtoR, Fminus, Fopp, Fplus in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.succ (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp x)))))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp x)))))))) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp x)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.succ (Fnum x)) (Zpos xH)) (Z.mul (Z.opp (Fnum x)) (Zpos xH)))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) repeat rewrite Zmult_1_r. (* Goal: @eq R (Rmult (IZR (Z.add (Z.succ (Fnum x)) (Z.opp (Fnum x)))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) replace (Zsucc (Fnum x) + - Fnum x)%Z with (Z_of_nat 1). (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) simpl in |- *; auto. (* Goal: @eq Z (Z.of_nat (S O)) (Z.add (Z.succ (Fnum x)) (Z.opp (Fnum x))) *) simpl in |- *; unfold Zsucc in |- *; ring. Qed. Theorem FSuccDiff2 : forall x : float, Fnum x = (- nNormMin radix precision)%Z -> Fexp x = (- dExp b)%Z -> Fminus radix (FSucc x) x = Float 1%nat (Fexp x) :>R. (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))), @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) intros x H' H'0; replace x with (Float (Fnum x) (Fexp x)). (* Goal: @eq R (FtoRradix (Fminus radix (FSucc (Float (Fnum x) (Fexp x))) (Float (Fnum x) (Fexp x)))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp (Float (Fnum x) (Fexp x))))) *) (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) rewrite H'; rewrite H'0; rewrite FSuccSimpl3; auto. (* Goal: @eq R (FtoRradix (Fminus radix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) unfold FtoRradix, FtoR, Fminus, Fopp, Fplus in |- *; simpl in |- *; auto. repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.succ (Fnum x)) (Zpos xH)) (Z.mul (Z.opp (Fnum x)) (Zpos xH)))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) simpl in |- *; repeat rewrite Zmult_1_r. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite Zplus_succ_l; rewrite Zplus_opp_r; simpl in |- *; auto. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case x; simpl in |- *; auto. Qed. Theorem FSuccDiff3 : forall x : float, Fnum x = (- nNormMin radix precision)%Z -> Fexp x <> (- dExp b)%Z -> Fminus radix (FSucc x) x = Float 1%nat (Zpred (Fexp x)) :>R. (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))), @eq R (FtoRradix (Fminus radix (FSucc x) x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) intros x H' H'1; rewrite FSuccSimpl2; auto. (* Goal: @eq R (FtoRradix (Fminus radix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x)) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) unfold FtoRradix, FtoR, Fminus, Fopp, Fplus in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.opp (pPred (vNum b))) (Zpower_nat radix (Z.abs_nat (Z.sub (Z.pred (Fexp x)) (Z.min (Z.pred (Fexp x)) (Fexp x)))))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Z.pred (Fexp x)) (Fexp x)))))))) (powerRZ (IZR radix) (Z.min (Z.pred (Fexp x)) (Fexp x)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.pred (Fexp x)))) *) repeat rewrite Zmin_le1; auto with zarith. rewrite <- Zminus_diag_reverse; rewrite <- Zminus_n_predm; repeat rewrite <- Zminus_diag_reverse. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.opp (pPred (vNum b))) (Zpower_nat radix (Z.abs_nat Z0))) (Z.mul (Z.opp (Fnum x)) (Zpower_nat radix (Z.abs_nat (Z.succ Z0)))))) (powerRZ (IZR radix) (Z.pred (Fexp x)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.pred (Fexp x)))) *) rewrite absolu_Zs; auto with zarith; simpl in |- *. rewrite H'; unfold pPred in |- *; rewrite pGivesBound; unfold nNormMin in |- *. (* Goal: @eq R (Rmult (IZR (Z.add (Z.mul (Z.succ (Fnum x)) (Zpos xH)) (Z.mul (Z.opp (Fnum x)) (Zpos xH)))) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp x))) *) rewrite Zopp_involutive; repeat rewrite Zmult_1_r. replace (Zpower_nat radix (pred precision) * radix)%Z with (Zpower_nat radix precision). unfold Zpred in |- *; simpl in |- *; (* Goal: @eq R (Rmult (Rplus (Ropp (Rplus (IZR (Zpower_nat radix precision)) (IZR (Zneg xH)))) (IZR (Zpower_nat radix precision))) (powerRZ (IZR radix) (Z.add (Fexp x) (Zneg xH)))) (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Z.add (Fexp x) (Zneg xH)))) *) (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) repeat rewrite plus_IZR || rewrite Ropp_Ropp_IZR. f_equal. (* Goal: @eq R (Rplus (Ropp (Rplus (IZR (Zpower_nat radix precision)) (IZR (Zneg xH)))) (IZR (Zpower_nat radix precision))) (IZR (Zpos xH)) *) (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) simpl in |- *; ring. (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) pattern precision at 1 in |- *; replace precision with (pred precision + 1). (* Goal: @eq Z (Zpower_nat radix (Init.Nat.add (Init.Nat.pred precision) (S O))) (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) radix) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.pred precision) (S O)) precision *) rewrite Zpower_nat_is_exp; rewrite Zpower_nat_1; auto. generalize precisionNotZero; case precision; simpl in |- *; auto with zarith arith. Qed. Theorem ZltNormMinVnum : (nNormMin radix precision < Zpos (vNum b))%Z. (* Goal: Z.lt (nNormMin radix precision) (Zpos (vNum b)) *) unfold nNormMin in |- *; rewrite pGivesBound; auto with zarith. Qed. Hint Resolve ZltNormMinVnum: float. Theorem FSuccNormPos : forall a : float, (0 <= a)%R -> Fnormal radix b a -> Fnormal radix b (FSucc a). intros a H' H'0; unfold FSucc in |- *. cut (Fbounded b a); [ intros B0 | apply FnormalBounded with (1 := H'0); auto ]. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'3; repeat split; simpl in |- *; auto. (* Goal: Z.lt (Z.abs (nNormMin radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_eq; auto with float zarith. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) unfold nNormMin in |- *; auto with zarith. apply Zle_trans with (m := Fexp a); auto with float zarith arith. rewrite pGivesBound; rewrite Zabs_eq; auto with zarith. pattern precision at 1 in |- *; replace precision with (1 + pred precision). rewrite Zpower_nat_is_exp; rewrite Zpower_nat_1; unfold nNormMin in |- *; (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. generalize precisionNotZero; case precision; auto with zarith. apply Zle_mult_gen; simpl in |- *; auto with zarith. apply Zle_trans with 1%Z; auto with zarith. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) unfold nNormMin in |- *; auto with zarith. intros H'3; generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)). intros H'4; absurd (0 <= Fnum a)%Z; auto. 2: apply LeR0Fnum with (radix := radix); auto with zarith. rewrite H'4; auto. apply Zlt_not_le. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) replace 0%Z with (- 0%nat)%Z; unfold nNormMin in |- *; auto with zarith. (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Fnormal radix b (Float (Z.succ (Fnum a)) (Fexp a)) *) intros H'4; repeat split; simpl in |- *; auto with float zarith arith. apply Zle_lt_trans with (Zsucc (Zabs (Fnum a))); auto with float zarith. case (Zlt_next (Zabs (Fnum a)) (Zpos (vNum b))); auto with float zarith arith. intros H1; Contradict H'3. unfold pPred in |- *; rewrite H1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. apply Zle_trans with (Zabs (radix * Fnum a)); auto with float zarith. case H'0; auto. repeat rewrite Zabs_Zmult. cut (0 <= Fnum a)%Z; [ intros Z1 | apply LeR0Fnum with (radix := radix) ]; auto. rewrite (Zabs_eq (Fnum a)); auto. rewrite (Zabs_eq (Zsucc (Fnum a))); auto with zarith. Qed. Theorem FSuccSubnormNotNearNormMin : forall a : float, Fsubnormal radix b a -> Fnum a <> Zpred (nNormMin radix precision) -> Fsubnormal radix b (FSucc a). (* Goal: forall (a : float) (_ : Fsubnormal radix b a) (_ : @eq Z (Fnum a) (Z.pred (nNormMin radix precision))), Fnormal radix b (FSucc a) *) intros a H' H'0. cut (Fbounded b a); [ intros B0 | apply FsubnormalFbounded with (1 := H'); auto ]. (* Goal: Fnormal radix b (FSucc a) *) unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. intros H'2; absurd (Fdigit radix a < precision); auto with float. 2: apply FsubnormalDigit with (b := b); auto. unfold Fdigit in |- *; rewrite H'2. unfold pPred in |- *; rewrite (digitPredVNumiSPrecision radix) with (b := b) (precision := precision); auto with arith. intros H'3; generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)). intros H'2; absurd (Fdigit radix a < precision); auto with float. unfold Fdigit in |- *; rewrite H'2. replace (digit radix (- nNormMin radix precision)) with (digit radix (nNormMin radix precision)). rewrite digitnNormMin; auto with arith. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case (nNormMin radix precision); simpl in |- *; auto. apply FsubnormalDigit with (b := b); auto. (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Fnormal radix b (Float (Z.succ (Fnum a)) (Fexp a)) *) intros H'4; repeat split; simpl in |- *; auto with float zarith arith. apply Zle_lt_trans with (m := Zsucc (Zabs (Fnum a))); auto with float zarith arith. apply Zlt_le_trans with (m := Zsucc (nNormMin radix precision)); auto with float zarith arith. apply Zsucc_lt_compat; apply pSubnormal_absolu_min with (3 := pGivesBound); auto with float zarith arith. case H'; intros H1 (H2, H3); auto with float. rewrite Zabs_Zmult. rewrite (Zabs_eq radix); auto with zarith. apply Zlt_le_trans with (m := (radix * nNormMin radix precision)%Z); auto with float zarith arith. apply Zmult_gt_0_lt_compat_l; try apply Zlt_gt; auto with zarith. (* Goal: Z.lt (Z.abs (Z.succ (Fnum f))) (Zpos (vNum b)) *) apply Zlt_Zabs_Zpred; auto with float zarith arith. apply pSubnormal_absolu_min with (3 := pGivesBound); auto. pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix); unfold nNormMin in |- *; rewrite <- Zpower_nat_is_exp. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision)))) *) rewrite pGivesBound. (* Goal: Z.le (Zpower_nat radix precision) (Z.abs (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision)))) *) generalize precisionNotZero; case precision; simpl in |- *; auto with zarith. Qed. Theorem FSuccSubnormNearNormMin : forall a : float, Fsubnormal radix b a -> Fnum a = Zpred (nNormMin radix precision) -> Fnormal radix b (FSucc a). (* Goal: forall (a : float) (_ : Fsubnormal radix b a) (_ : @eq Z (Fnum a) (Z.pred (nNormMin radix precision))), Fnormal radix b (FSucc a) *) intros a H' H'0. (* Goal: Fnormal radix b (FSucc a) *) cut (Fbounded b a); [ intros Fb0 | apply FsubnormalFbounded with (1 := H') ]. (* Goal: Fnormal radix b (FSucc a) *) unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. intros H'1; absurd (nNormMin radix precision < Zpos (vNum b))%Z; auto with float. (* Goal: not (Z.lt (Z.opp (nNormMin radix precision)) (Fnum y)) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zle_not_lt. apply Zle_n_Zpred; unfold pPred in H'1; rewrite <- H'1; rewrite H'0; (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. intros H'3; generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)). intros H'1; absurd (- nNormMin radix precision < Zpred (nNormMin radix precision))%Z. (* Goal: not (Z.lt (Z.opp (nNormMin radix precision)) (Z.pred (nNormMin radix precision))) *) (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (Z.pred (nNormMin radix precision)) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Fnormal radix b (Float (Z.succ (Fnum a)) (Fexp a)) *) rewrite <- H'1; rewrite <- H'0; auto with zarith. unfold nNormMin in |- *; apply Zlt_le_trans with (m := (- (0))%Z); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Fnormal radix b (Float (Z.succ (Fnum a)) (Fexp a)) *) intros H'4; repeat split; simpl in |- *; auto with float zarith arith. (* Goal: @eq Z (Z.mul (nNormMin radix precision) radix) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'0. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Z.succ (Z.pred (nNormMin radix precision))))) *) rewrite <- Zsucc_pred. (* Goal: Z.lt (Z.abs (nNormMin radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_eq; auto with float zarith. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) unfold nNormMin in |- *; auto with zarith. (* Goal: @eq Z (Z.mul (nNormMin radix precision) radix) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'0. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Z.succ (Z.pred (nNormMin radix precision))))) *) rewrite <- Zsucc_pred. pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix); unfold nNormMin in |- *; rewrite <- Zpower_nat_is_exp. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision)))) *) rewrite pGivesBound. (* Goal: Z.le (Zpower_nat radix precision) (Z.abs (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision)))) *) generalize precisionNotZero; case precision; simpl in |- *; auto with zarith. Qed. Theorem FBoundedSuc : forall f : float, Fbounded b f -> Fbounded b (FSucc f). (* Goal: Fnormal radix b (FSucc a) *) intros f H'; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum f) (pPred (vNum b))); case (Z_eq_bool (Fnum f) (pPred (vNum b))); intros H'1. (* Goal: Fbounded b (Float (nNormMin radix precision) (Z.succ (Fexp f))) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) repeat split; simpl in |- *; auto with zarith arith. (* Goal: Z.lt (Z.abs (nNormMin radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_eq; auto with float zarith. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) unfold nNormMin in |- *; auto with zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) apply Zle_trans with (Fexp f); auto with float zarith. generalize (Z_eq_bool_correct (Fnum f) (- nNormMin radix precision)); case (Z_eq_bool (Fnum f) (- nNormMin radix precision)); intros H'2. generalize (Z_eq_bool_correct (Fexp f) (- dExp b)); case (Z_eq_bool (Fexp f) (- dExp b)); intros H'3. (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) repeat split; simpl in |- *; auto with float zarith arith. (* Goal: Z.lt (Z.abs (Z.succ (Fnum f))) (Zpos (vNum b)) *) apply Zlt_Zabs_Zpred; auto with float zarith arith. (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) repeat split; simpl in |- *; auto with float zarith arith. (* Goal: Z.lt (Z.abs (Z.opp (pPred (vNum b)))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_Zopp. (* Goal: Z.lt (Z.abs (pPred (vNum b))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_eq; unfold pPred in |- *; auto with zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) case (Zle_next (- dExp b) (Fexp f)); auto with float zarith arith. (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) repeat split; simpl in |- *; auto with float zarith arith. (* Goal: Z.lt (Z.abs (Z.succ (Fnum f))) (Zpos (vNum b)) *) apply Zlt_Zabs_Zpred; auto with float zarith arith. Qed. Theorem FSuccSubnormal : forall a : float, Fsubnormal radix b a -> Fcanonic radix b (FSucc a). (* Goal: forall (a : float) (_ : Fcanonic radix b a), Fcanonic radix b (FSucc a) *) intros a H'. generalize (Z_eq_bool_correct (Fnum a) (Zpred (nNormMin radix precision))); case (Z_eq_bool (Fnum a) (Zpred (nNormMin radix precision))); intros H'1. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) left; apply FSuccSubnormNearNormMin; auto. (* Goal: Fcanonic radix b (FSucc a) *) right; apply FSuccSubnormNotNearNormMin; auto. Qed. Theorem FSuccPosNotMax : forall a : float, (0 <= a)%R -> Fcanonic radix b a -> Fcanonic radix b (FSucc a). (* Goal: forall (a : float) (_ : Rle (IZR Z0) (FtoRradix a)) (_ : Fcanonic radix b a), Fcanonic radix b (FSucc a) *) intros a H' H'0; case H'0; intros H'2. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) left; apply FSuccNormPos; auto. (* Goal: Fcanonic radix b (FSucc a) *) apply FSuccSubnormal; auto. Qed. Theorem FSuccNormNegNotNormMin : forall a : float, (a <= 0)%R -> Fnormal radix b a -> a <> Float (- nNormMin radix precision) (- dExp b) -> Fnormal radix b (FSucc a). intros a H' H'0 H'1; cut (Fbounded b a); [ intros Fb0 | apply FnormalBounded with (1 := H'0) ]. cut (Fnum a <= 0)%Z; [ intros Z0 | apply R0LeFnum with (radix := radix) ]; (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. case (Zle_lt_or_eq _ _ Z0); intros Z1. 2: absurd (is_Fzero a); auto with float. 2: apply FnormalNotZero with (1 := H'0); auto. (* Goal: Fnormal radix b (FSucc a) *) unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. intros H'2; absurd (0 < Fnum a)%Z; auto with zarith arith. rewrite H'2; unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *; apply (vNumbMoreThanOne radix) with (precision := precision); auto with zarith arith. intros H'3; generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)); auto. intros H'2; generalize (Z_eq_bool_correct (Fexp a) (- dExp b)); case (Z_eq_bool (Fexp a) (- dExp b)). intros H'4; Contradict H'1; auto. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. intros H'4; repeat split; simpl in |- *; auto with zarith. (* Goal: Z.lt (Z.abs (Z.opp (pPred (vNum b)))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite Zabs_Zopp. unfold pPred in |- *; rewrite Zabs_eq; auto with zarith. case (Zle_next (- dExp b) (Fexp a)); auto with float zarith. (* Goal: Z.lt (Z.abs (Z.opp (pPred (vNum b)))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite <- Zopp_mult_distr_r; rewrite Zabs_Zopp. rewrite Zabs_Zmult. (* Goal: Z.lt (Z.abs (nNormMin radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Fexp f)) *) (* Goal: Fbounded b (if Z_eq_bool (Fnum f) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp f) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum f)) (Fexp f) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp f)) else Float (Z.succ (Fnum f)) (Fexp f)) *) repeat rewrite Zabs_eq; auto with float zarith. pattern (Zpos (vNum b)) at 1 in |- *; rewrite (PosNormMin radix) with (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. apply Zle_Zmult_comp_l; auto with zarith. unfold pPred in |- *; apply Zle_Zpred; auto with float zarith. unfold pPred in |- *; apply Zle_Zpred; auto with float zarith. (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) intros H'2; repeat split; simpl in |- *; auto with float zarith arith. apply Zlt_trans with (Zabs (Fnum a)); auto with float zarith. repeat rewrite Zabs_eq_opp; auto with float zarith. rewrite Zabs_Zmult. rewrite (Zabs_eq radix); [ idtac | apply Zle_trans with 1%Z; auto with zarith ]. repeat rewrite Zabs_eq_opp; auto with float zarith. pattern (Zpos (vNum b)) at 1 in |- *; rewrite (PosNormMin radix) with (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. apply Zle_Zmult_comp_l; auto with zarith. replace (- Zsucc (Fnum a))%Z with (Zpred (- Fnum a)). auto with float zarith. unfold pPred in |- *; apply Zle_Zpred. case (Zle_lt_or_eq (nNormMin radix precision) (- Fnum a)); auto. rewrite <- Zabs_eq_opp; auto with float zarith. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum y)) *) (* Goal: Z.le Z0 (Fnum y) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply pNormal_absolu_min with (b := b); auto. intros H'4; Contradict H'2; rewrite H'4; ring. apply Zpred_Zopp_Zs; auto. Qed. Theorem FSuccNormNegNormMin : Fsubnormal radix b (FSucc (Float (- nNormMin radix precision) (- dExp b))). (* Goal: @eq float (FSucc (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))) *) unfold FSucc in |- *; simpl in |- *. generalize (Z_eq_bool_correct (- nNormMin radix precision) (pPred (vNum b))); case (Z_eq_bool (- nNormMin radix precision) (pPred (vNum b))); intros H'; auto. absurd (0%nat < pPred (vNum b))%Z; auto. rewrite <- H'; auto with float zarith. replace (Z_of_nat 0) with (- (0))%Z; [ idtac | simpl in |- *; auto ]. apply Zle_not_lt; apply Zle_Zopp; auto with float zarith. apply Zlt_le_weak; auto with float zarith. apply nNormPos; auto with float zarith. unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *; auto with float zarith. apply (vNumbMoreThanOne radix) with (precision := precision); auto with float zarith. generalize (Z_eq_bool_correct (- nNormMin radix precision) (- nNormMin radix precision)); case (Z_eq_bool (- nNormMin radix precision) (- nNormMin radix precision)); (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) intros H'0. 2: Contradict H'0; auto. generalize (Z_eq_bool_correct (- dExp b) (- dExp b)); case (Z_eq_bool (- dExp b) (- dExp b)); intros H'1. 2: Contradict H'1; auto. repeat split; simpl in |- *; auto with zarith. apply Zle_lt_trans with (m := nNormMin radix precision); auto with float zarith. rewrite <- Zopp_Zpred_Zs; rewrite Zabs_Zopp; rewrite Zabs_eq; auto with float zarith. apply Zle_Zpred; simpl in |- *; auto with float zarith. apply nNormPos; auto with float zarith. rewrite Zabs_Zmult; rewrite (Zabs_eq radix); auto with zarith. rewrite (PosNormMin radix) with (precision := precision); auto with zarith. apply Zmult_gt_0_lt_compat_l; auto with float zarith. (* Goal: Z.lt (Z.abs (Z.opp (pPred (vNum b)))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp f)) *) (* Goal: Fbounded b (Float (Z.succ (Fnum f)) (Fexp f)) *) rewrite <- Zopp_Zpred_Zs; rewrite Zabs_Zopp. rewrite Zabs_eq; auto with zarith. apply Zle_Zpred; simpl in |- *; auto with float zarith. apply nNormPos; auto with float zarith. Qed. Theorem FSuccNegCanonic : forall a : float, (a <= 0)%R -> Fcanonic radix b a -> Fcanonic radix b (FSucc a). (* Goal: forall (a : float) (_ : Rle (FtoRradix a) (IZR Z0)) (_ : Fcanonic radix b a), Fcanonic radix b (FSucc a) *) intros a H' H'0; case H'0; intros H'1. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) case (floatDec a (Float (- nNormMin radix precision) (- dExp b))); intros H'2. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) rewrite H'2; right; apply FSuccNormNegNormMin; auto. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) left; apply FSuccNormNegNotNormMin; auto. (* Goal: Fcanonic radix b (FSucc a) *) apply FSuccSubnormal; auto. Qed. Theorem FSuccCanonic : forall a : float, Fcanonic radix b a -> Fcanonic radix b (FSucc a). (* Goal: forall (a : float) (_ : Fcanonic radix b a), Fcanonic radix b (FSucc a) *) intros a H'. (* Goal: Fcanonic radix b (FSucc a) *) case (Rle_or_lt 0 a); intros H'3. (* Goal: Fcanonic radix b (FSucc a) *) (* Goal: Fcanonic radix b (FSucc a) *) apply FSuccPosNotMax; auto. (* Goal: Fcanonic radix b (FSucc a) *) apply FSuccNegCanonic; auto with real. Qed. Theorem FSuccLt : forall a : float, (a < FSucc a)%R. (* Goal: Fnormal radix b (FSucc a) *) intros a; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Fnum a) (pPred (vNum b)), Rlt (FtoRradix a) (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp a)))) *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rlt (FtoRradix a) (FtoRradix (if Z_eq_bool (Fnum a) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp a) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum a)) (Fexp a) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)) else Float (Z.succ (Fnum a)) (Fexp a))) *) intros H'; unfold FtoRradix, FtoR in |- *; simpl in |- *; rewrite H'. unfold pPred in |- *; rewrite (PosNormMin radix) with (precision := precision); auto with zarith; unfold nNormMin in |- *. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Z.succ (Z.pred (Fexp a))))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite powerRZ_Zs; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred (Fexp a))))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) repeat rewrite <- Rmult_assoc. (* Goal: Rlt (Rmult (IZR (Z.pred (Z.mul radix (Zpower_nat radix (Init.Nat.pred precision))))) (powerRZ (IZR radix) (Fexp a))) (Rmult (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (IZR radix)) (powerRZ (IZR radix) (Fexp a))) *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rlt (FtoRradix a) (FtoRradix (if Z_eq_bool (Fnum a) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp a) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum a)) (Fexp a) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)) else Float (Z.succ (Fnum a)) (Fexp a))) *) apply Rlt_monotony_exp; auto with zarith. (* Goal: Z.lt (pPred (vNum b)) (Z.mul (nNormMin radix precision) radix) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite Zmult_comm. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (IZR radix)) (IZR (Z.opp (pPred (vNum b)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite <- Rmult_IZR. (* Goal: Rlt (IZR (Z.mul (Z.opp (nNormMin radix precision)) radix)) (IZR (Z.opp (pPred (vNum b)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) apply Rlt_IZR; auto with zarith. intros H'; generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)). intros H'0; generalize (Z_eq_bool_correct (Fexp a) (- dExp b)); case (Z_eq_bool (Fexp a) (- dExp b)). (* Goal: forall _ : @eq Z (Fexp a) (Z.opp (Z.of_N (dExp b))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) (* Goal: forall _ : not (@eq Z (Fexp a) (Z.opp (Z.of_N (dExp b)))), Rlt (FtoRradix a) (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)))) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) intros H'1; unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Rlt (Rmult (Rmult (IZR (Z.opp (nNormMin radix precision))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp a)))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) apply Rlt_monotony_exp; auto with real zarith. (* Goal: @eq Z (Z.mul (nNormMin radix precision) radix) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros H'1; unfold FtoRradix, FtoR in |- *; simpl in |- *; rewrite H'0. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Fexp a))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) pattern (Fexp a) at 1 in |- *; replace (Fexp a) with (Zsucc (Zpred (Fexp a))). (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (powerRZ (IZR radix) (Z.succ (Z.pred (Fexp a))))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite powerRZ_Zs; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred (Fexp a))))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) repeat rewrite <- Rmult_assoc. (* Goal: Rlt (Rmult (Rmult (IZR (Z.opp (nNormMin radix precision))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp a)))) (Rmult (IZR (Z.opp (pPred (vNum b)))) (powerRZ (IZR radix) (Z.pred (Fexp a)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) apply Rlt_monotony_exp; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.opp (nNormMin radix precision))) (IZR radix)) (IZR (Z.opp (pPred (vNum b)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite <- Rmult_IZR. (* Goal: Rlt (IZR (Z.mul (Z.opp (nNormMin radix precision)) radix)) (IZR (Z.opp (pPred (vNum b)))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) apply Rlt_IZR; auto with zarith. (* Goal: Z.lt (Z.mul (Z.opp (nNormMin radix precision)) radix) (Z.opp (pPred (vNum b))) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite <- Zopp_mult_distr_l. (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_nat O)) *) (* Goal: Z.le Z0 (Fnum x) *) apply Zlt_Zopp. (* Goal: Z.lt (pPred (vNum b)) (Z.mul (nNormMin radix precision) radix) *) (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) rewrite Zmult_comm. unfold pPred in |- *; rewrite (PosNormMin radix) with (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: @eq Z (Z.succ (Z.pred (Fexp a))) (Fexp a) *) (* Goal: forall _ : not (@eq Z (Fnum a) (Z.opp (nNormMin radix precision))), Rlt (FtoRradix a) (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) *) apply sym_equal; apply Zsucc_pred. intros H'1; unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real zarith. Qed. Theorem FSuccPropPos : forall x y : float, (0 <= x)%R -> Fcanonic radix b x -> Fcanonic radix b y -> (x < y)%R -> (FSucc x <= y)%R. (* Goal: forall (x y : float) (_ : Rlt (FtoRradix x) (IZR Z0)) (_ : Fcanonic radix b x) (_ : Fcanonic radix b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros x y H' H'0 H'1 H'2. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) cut (Fbounded b x); [ intros Fb0 | apply FcanonicBound with (1 := H'0) ]. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) cut (Fbounded b y); [ intros Fb1 | apply FcanonicBound with (1 := H'1) ]. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) case FcanonicLtPos with (p := x) (q := y) (3 := pGivesBound); auto. (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) case (Z_eq_dec (Fnum x) (pPred (vNum b))); intros H'4. (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite FSuccSimpl1; auto. (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros H'5; case (Zlt_next _ _ H'5); intros H'6. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace y with (Float (Fnum y) (Fexp y)). (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite H'6. generalize Fle_Zle; unfold Fle, FtoRradix in |- *; intros H'7; apply H'7; clear H'7; auto with arith. rewrite <- (Zabs_eq (Fnum y)); auto with float zarith. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum y)) *) (* Goal: Z.le Z0 (Fnum y) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply pNormal_absolu_min with (b := b); auto. (* Goal: Fnormal radix b y *) (* Goal: Z.le Z0 (Fnum y) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) case H'1; auto with float. (* Goal: not (Z.lt (Z.opp (nNormMin radix precision)) (Fnum y)) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'7; Contradict H'5; apply Zle_not_lt. (* Goal: Z.le (Fexp y) (Fexp x) *) (* Goal: Z.le Z0 (Fnum y) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) replace (Fexp y) with (- dExp b)%Z; auto with float. (* Goal: @eq Z (Z.opp (Z.of_N (dExp b))) (Fexp y) *) (* Goal: Z.le Z0 (Fnum y) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) (FtoRradix y) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) case H'7; intros H'8 (H'9, H'10); auto. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: Z.lt (Fexp (FSucc x)) (Fexp y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_trans with (r2 := FtoR radix x); auto with real. (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case y; auto. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto. unfold FtoRradix in |- *; apply FcanonicPosFexpRlt with (3 := pGivesBound); auto. (* Goal: Rle (IZR Z0) (FtoR radix (Float (nNormMin radix precision) (Z.succ (Fexp x)))) *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply LeFnumZERO with (radix := radix); auto with zarith. (* Goal: not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) simpl in |- *; auto with zarith. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_le_weak; apply nNormPos. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: Z.lt (Fexp (FSucc x)) (Fexp y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_trans with (r2 := FtoR radix x); auto with real. (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite <- FSuccSimpl1; auto. (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply FSuccCanonic; auto. (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros H'5; apply Rlt_le. unfold FtoRradix in |- *; apply FcanonicPosFexpRlt with (3 := pGivesBound); auto. (* Goal: Rle (IZR Z0) (FtoR radix (FSucc x)) *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: Z.lt (Fexp (FSucc x)) (Fexp y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_trans with (r2 := FtoR radix x); auto. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto. (* Goal: Rlt (FtoR radix (Fnormalize radix b precision a)) (FtoR radix (FSucc (Fnormalize radix b precision a))) *) apply FSuccLt; auto. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: Z.lt (Fexp (FSucc x)) (Fexp y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_trans with (r2 := FtoR radix x); auto with real. (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply FSuccCanonic; auto. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply sym_not_equal; apply Zlt_not_eq. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_le_trans with (m := 0%Z); auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) replace 0%Z with (- 0%nat)%Z; auto with zarith. (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_nat O)) *) (* Goal: Z.le Z0 (Fnum x) *) apply Zlt_Zopp. (* Goal: Z.lt (Z.of_nat O) (nNormMin radix precision) *) (* Goal: Z.le Z0 (Fnum x) *) apply nNormPos; auto. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros H'4; elim H'4; intros H'5 H'6; clear H'4. generalize (Z_eq_bool_correct (Fnum x) (Zpos (vNum b))); case (Z_eq_bool (Fnum x) (Zpos (vNum b))); intros H'4. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) Contradict H'6; auto. (* Goal: not (Z.lt (Z.succ (Fnum x)) (Fnum y)) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Zle_not_lt; apply Zlt_le_weak. rewrite H'4; auto with float zarith. rewrite <- (Zabs_eq (Fnum y)); auto with float zarith. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Rle_trans with (FtoRradix x); auto with real. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case (Zlt_next _ _ H'6); intros H'7. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. rewrite <- H'7; rewrite H'5; unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real. (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zlt_not_eq. (* Goal: Z.lt (Fnum x) (pPred (vNum b)) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) unfold pPred in |- *; apply Zlt_succ_pred; rewrite <- H'7; auto with float. rewrite <- (Zabs_eq (Fnum y)); auto with float zarith. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Rle_trans with (FtoRradix x); auto with real. (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Zlt_not_eq_rev. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_le_trans with (m := 0%Z); auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) replace 0%Z with (- 0%nat)%Z; auto with zarith. (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_nat O)) *) (* Goal: Z.le Z0 (Fnum x) *) apply Zlt_Zopp. (* Goal: Z.lt (Z.of_nat O) (nNormMin radix precision) *) (* Goal: Z.le Z0 (Fnum x) *) apply nNormPos; auto. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace y with (Float (Fnum y) (Fexp y)). (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) rewrite H'5. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp y))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto with real float. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case y; simpl in |- *; auto. (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) Contradict H'7; auto. (* Goal: not (Z.lt (Z.succ (Fnum x)) (Fnum y)) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Zle_not_lt; apply Zlt_le_weak. rewrite H'7; auto with float zarith. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Z.succ (Z.pred (nNormMin radix precision))))) *) unfold pPred in |- *; rewrite <- Zsucc_pred. rewrite <- (Zabs_eq (Fnum y)); auto with float zarith. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Rle_trans with (FtoRradix x); auto with real. (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) apply Zlt_not_eq_rev. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_le_trans with (m := 0%Z); auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) replace 0%Z with (- 0%nat)%Z; auto with zarith. (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_nat O)) *) (* Goal: Z.le Z0 (Fnum x) *) apply Zlt_Zopp. (* Goal: Z.lt (Z.of_nat O) (nNormMin radix precision) *) (* Goal: Z.le Z0 (Fnum x) *) apply nNormPos; auto. (* Goal: Z.le Z0 (Fnum x) *) apply LeR0Fnum with (radix := radix); auto with zarith. Qed. Theorem R0RltRleSucc : forall x : float, (x < 0)%R -> (FSucc x <= 0)%R. (* Goal: Fnormal radix b (FSucc a) *) intros a H'; unfold FSucc in |- *. generalize (Z_eq_bool_correct (Fnum a) (pPred (vNum b))); case (Z_eq_bool (Fnum a) (pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Fnum a) (pPred (vNum b)), Rle (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp a)))) (IZR Z0) *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (if Z_eq_bool (Fnum a) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp a) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum a)) (Fexp a) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)) else Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) intros H'0; absurd (Fnum a < 0)%Z; auto. (* Goal: not (Z.lt (Fnum a) Z0) *) (* Goal: Z.lt (Fnum a) Z0 *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (if Z_eq_bool (Fnum a) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp a) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum a)) (Fexp a) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)) else Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) rewrite H'0; auto with zarith arith. (* Goal: not (Z.lt (pPred (vNum b)) Z0) *) (* Goal: Z.lt (Fnum a) Z0 *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (if Z_eq_bool (Fnum a) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp a) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum a)) (Fexp a) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp a)) else Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) apply Zle_not_lt; unfold pPred in |- *; apply Zle_Zpred; auto with float. apply Zlt_trans with 1%Z; auto with zarith; apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply R0LtFnum with (radix := radix); auto with zarith. generalize (Z_eq_bool_correct (Fnum a) (- nNormMin radix precision)); case (Z_eq_bool (Fnum a) (- nNormMin radix precision)); intros H'1. generalize (Z_eq_bool_correct (Fexp a) (- dExp b)); case (Z_eq_bool (Fexp a) (- dExp b)); intros H'2. (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) intros H'0. (* Goal: not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply LeZEROFnum with (radix := radix); simpl in |- *; auto with zarith. (* Goal: Z.le (Z.succ (Fnum a)) Z0 *) apply Zlt_le_succ. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply R0LtFnum with (radix := radix); auto with zarith. (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) intros H'0. (* Goal: not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply LeZEROFnum with (radix := radix); simpl in |- *; auto with zarith. (* Goal: Z.le (Z.opp (pPred (vNum b))) Z0 *) (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) replace 0%Z with (- (0))%Z; [ apply Zle_Zopp | simpl in |- *; auto ]. unfold pPred in |- *; apply Zle_Zpred; apply Zlt_trans with 1%Z; auto with zarith; apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) intros H'0. (* Goal: not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply LeZEROFnum with (radix := radix); simpl in |- *; auto with zarith. (* Goal: Z.le (Z.succ (Fnum a)) Z0 *) apply Zlt_le_succ. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply R0LtFnum with (radix := radix); auto with zarith. Qed. Theorem FSuccPropNeg : forall x y : float, (x < 0)%R -> Fcanonic radix b x -> Fcanonic radix b y -> (x < y)%R -> (FSucc x <= y)%R. (* Goal: forall (x y : float) (_ : Rlt (FtoRradix x) (IZR Z0)) (_ : Fcanonic radix b x) (_ : Fcanonic radix b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros x y H' H'0 H'1 H'2. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) cut (Fbounded b x); [ intros Fb0 | apply FcanonicBound with (1 := H'0) ]. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) cut (Fbounded b y); [ intros Fb1 | apply FcanonicBound with (1 := H'1) ]. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) case (Rle_or_lt 0 y); intros Rle0. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_trans with (r2 := 0%R); auto. (* Goal: Rle (FtoR radix (FSucc x)) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply R0RltRleSucc; auto. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) cut (Fnum x <> pPred (vNum b)); [ intros N0 | idtac ]; auto with zarith. generalize (Z_eq_bool_correct (Fnum x) (- nNormMin radix precision)); case (Z_eq_bool (Fnum x) (- nNormMin radix precision)); intros H'4. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); intros H'5. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace x with (Float (Fnum x) (Fexp x)). (* Goal: Rle (FtoRradix (FSucc (Float (Fnum x) (Fexp x)))) (FtoRradix y) *) (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite H'4; rewrite H'5; rewrite FSuccSimpl3; auto. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case FcanonicLtNeg with (p := x) (q := y) (3 := pGivesBound); auto with real. (* Goal: forall _ : Z.lt (Fexp y) (Fexp x), Rle (FtoRradix (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (FtoRradix y) *) (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'6; Contradict H'6; rewrite H'5; apply Zle_not_lt; auto with float. intros H'6; elim H'6; intros H'7 H'8; clear H'6; (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace y with (Float (Fnum y) (Fexp y)). (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) (* Goal: not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision))) *) rewrite <- H'7; rewrite H'5. generalize Fle_Zle; unfold Fle, FtoRradix in |- *; intros H'9; apply H'9; clear H'9; auto with arith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite <- H'4; auto with zarith. (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case y; auto. (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case x; auto. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite FSuccSimpl2; auto. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case FcanonicLtNeg with (p := x) (q := y) (3 := pGivesBound); auto with real. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'6; replace y with (Float (Fnum y) (Fexp y)). (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case (Zlt_next _ _ H'6); intros H'7. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite H'7. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp y))))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- Zpred_succ. (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Fexp y))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Rle_monotone_exp; auto with zarith. (* Goal: Rle (IZR (Z.opp (pPred (vNum b)))) (IZR (Fnum y)) *) (* Goal: Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- (Zopp_involutive (Fnum y)); apply Rle_IZR; apply Zle_Zopp. unfold pPred in |- *; apply Zle_Zpred; rewrite <- Zabs_eq_opp; auto with float zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_le_weak; apply R0LtFnum with (radix := radix); auto with zarith. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: forall _ : Z.lt (Fexp y) (Fexp x), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto with real. unfold FtoRradix in |- *; apply FcanonicNegFexpRlt with (3 := pGivesBound); auto. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto. (* Goal: Fcanonic radix b (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- FSuccSimpl2; auto. (* Goal: Rle (FtoR radix (FSucc x)) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply R0RltRleSucc; auto. (* Goal: Fcanonic radix b (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) *) (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- FSuccSimpl2; auto. (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply FSuccCanonic; auto. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) simpl in |- *; auto. (* Goal: Z.lt (Fexp y) (Z.pred (Fexp x)) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zsucc_lt_reg; auto. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite <- Zsucc_pred; auto with zarith. (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case y; auto. (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'6; elim H'6; intros H'7 H'8; clear H'6; apply Rlt_le. (* Goal: Rlt (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) Contradict H'8; rewrite H'4. (* Goal: not (Z.lt (Z.opp (nNormMin radix precision)) (Fnum y)) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zle_not_lt. (* Goal: Z.le (Fnum y) (Z.opp (nNormMin radix precision)) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace (Fnum y) with (- Zabs (Fnum y))%Z. (* Goal: Z.le (Z.opp (Z.abs (Fnum y))) (Z.opp (nNormMin radix precision)) *) (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zle_Zopp. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum y)) *) (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply pNormal_absolu_min with (3 := pGivesBound); auto. (* Goal: Fnormal radix b y *) (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case H'1; auto. (* Goal: forall _ : Fsubnormal radix b y, Fnormal radix b y *) (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'6; Contradict H'5; rewrite H'7; auto with float. (* Goal: @eq Z (Fexp y) (Z.opp (Z.of_N (dExp b))) *) (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply FsubnormalFexp with (1 := H'6). (* Goal: @eq Z (Z.opp (Z.abs (Fnum y))) (Fnum y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite Zabs_eq_opp. (* Goal: @eq Z (Z.opp (Z.opp (Fnum y))) (Fnum y) *) (* Goal: Z.le (Fnum y) Z0 *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) ring. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply R0LeFnum with (radix := radix); auto with zarith. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case FcanonicLtNeg with (p := x) (q := y) (3 := pGivesBound); auto. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: forall _ : Z.lt (Fexp y) (Fexp x), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto with real. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'5; apply Rlt_le; auto. unfold FtoRradix in |- *; apply FcanonicNegFexpRlt with (3 := pGivesBound); auto. (* Goal: Rle (FtoR radix y) (IZR Z0) *) (* Goal: Rle (FtoR radix (Float (Z.succ (Fnum x)) (Fexp x))) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Rlt_le; auto. (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- FSuccSimpl4; auto. (* Goal: Rle (FtoR radix (FSucc x)) (IZR Z0) *) (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply R0RltRleSucc; auto. (* Goal: Fcanonic radix b (Float (Z.succ (Fnum x)) (Fexp x)) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- FSuccSimpl4; auto. (* Goal: Fcanonic radix b (FSucc x) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply FSuccCanonic; auto. (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) intros H'5; elim H'5; intros H'6 H'7; clear H'5. (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) replace y with (Float (Fnum y) (Fexp y)). (* Goal: Rle (FtoRradix (Float (Z.succ (Fnum x)) (Fexp x))) (FtoRradix (Float (Fnum y) (Fexp y))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite H'6. generalize Fle_Zle; unfold Fle, FtoRradix in |- *; intros H'8; apply H'8; clear H'8; auto with zarith arith. (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case y; auto. (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) apply Zlt_not_eq. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_trans with 0%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply R0LtFnum with (radix := radix); auto with zarith. (* Goal: Z.lt Z0 (pPred (vNum b)) *) unfold pPred in |- *; apply Zlt_succ_pred. replace (Zsucc 0) with (Z_of_nat 1); [ apply (vNumbMoreThanOne radix) with (precision := precision) (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) | simpl in |- * ]; auto with zarith. Qed. Theorem FSuccProp : forall x y : float, Fcanonic radix b x -> Fcanonic radix b y -> (x < y)%R -> (FSucc x <= y)%R. (* Goal: forall (x y : float) (_ : Fcanonic radix b x) (_ : Fcanonic radix b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) intros x y H' H'0 H'1; case (Rle_or_lt 0 x); intros H'2. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply FSuccPropPos; auto. (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply FSuccPropNeg; auto. Qed. Theorem FSuccZleEq : forall p q : float, (p <= q)%R -> (q < FSucc p)%R -> (Fexp p <= Fexp q)%Z -> p = q :>R. (* Goal: forall (p q : float) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros p q H'. generalize (Z_eq_bool_correct (Fnum p) (pPred (vNum b))); (* Goal: forall _ : not (@eq Z (Fnum a) (pPred (vNum b))), Rle (FtoRradix (Float (Z.succ (Fnum a)) (Fexp a))) (IZR Z0) *) case (Z_eq_bool (Fnum p) (pPred (vNum b))); intros H'0. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl1; simpl in |- *; auto with arith. (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (Float (nNormMin radix precision) (Z.succ (Fexp p))))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros H'1 H'2. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) replace p with (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q). (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (FtoRradix q) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q) p *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto with real. cut (Fexp (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q) = Fexp p); [ intros Eq0 | idtac ]. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. (* Goal: @eq Z (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum p) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply sym_equal; apply Zeq_Zs; auto. (* Goal: Z.le (Fnum p) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FshiftCorrect; auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) replace (Zsucc (Fnum p)) with (Fnum (Fshift radix 1 (FSucc p))); auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum (Float (Z.succ (Fnum p)) (Fexp p))) *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) repeat rewrite FshiftCorrect; auto. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl1; simpl in |- *; auto with arith. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl1; simpl in |- *; auto with arith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite inj_abs; auto with zarith. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl1; simpl in |- *; auto with arith. (* Goal: @eq Z (Z.mul (nNormMin radix precision) (Z.mul radix (Zpos xH))) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite Z.mul_1_r. (* Goal: @eq Z (Z.mul (nNormMin radix precision) radix) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'0. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Z.succ (Z.pred (nNormMin radix precision))))) *) unfold pPred in |- *; rewrite <- Zsucc_pred. rewrite (PosNormMin radix) with (precision := precision); auto with zarith; apply Zmult_comm. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite inj_abs; auto with zarith. generalize (Z_eq_bool_correct (Fnum p) (- nNormMin radix precision)); case (Z_eq_bool (Fnum p) (- nNormMin radix precision)); intros H'1. generalize (Z_eq_bool_correct (Fexp p) (- dExp b)); case (Z_eq_bool (Fexp p) (- dExp b)); intros H'2. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) pattern p at 1 in |- *; replace p with (Float (Fnum p) (Fexp p)). (* Goal: @eq Z (Fnum (FSucc (Float (Fnum p) (Fexp p)))) (Z.succ (Fnum p)) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'1; rewrite H'2. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl3; auto with arith. (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p))))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros H'3 H'4. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) replace p with (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q). (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (FtoRradix q) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q) p *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto with real. cut (Fexp (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q) = Fexp p); [ intros Eq0 | idtac ]. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. (* Goal: @eq Z (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum p) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply sym_equal; apply Zeq_Zs; auto. (* Goal: Z.le (Fnum p) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FshiftCorrect; auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) replace (Zsucc (Fnum p)) with (Fnum (FSucc p)); auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum (FSucc p)) *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) pattern p at 2 in |- *; replace p with (Float (Fnum p) (Fexp p)). (* Goal: @eq Z (Fnum (FSucc (Float (Fnum p) (Fexp p)))) (Z.succ (Fnum p)) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'1; rewrite H'2. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl3; auto with arith. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Z.opp (Z.of_N (dExp b))))) q)) (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite <- H'2. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum (Float (Z.succ (Fnum p)) (Fexp p))) *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FshiftCorrect; auto. (* Goal: Rlt (FtoR radix q) (FtoR radix (Float (Z.succ (Z.opp (nNormMin radix precision))) (Fexp p))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'2; auto. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case p; simpl in |- *; auto. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) pattern p at 1 in |- *; replace p with (Float (Fnum p) (Fexp p)). (* Goal: @eq Z (Fnum (FSucc (Float (Fnum p) (Fexp p)))) (Z.succ (Fnum p)) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite H'1; rewrite H'2. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl3; auto with arith. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case p; simpl in |- *; auto. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite inj_abs; auto with zarith. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) case p; simpl in |- *; auto. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Z.pred (Fexp p)))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl2; auto with arith. (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p))))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros H'3 H'4. unfold FtoRradix in |- *; rewrite <- FshiftCorrect with (n := 1) (x := p); auto. replace (Fshift radix 1 p) with (Fshift radix (S (Zabs_nat (Fexp q - Fexp p))) q). (* Goal: @eq R (FtoR radix (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (FtoR radix q) *) (* Goal: @eq float (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q) (Fshift radix (S O) p) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) repeat rewrite FshiftCorrect; auto with real. cut (Fexp (Fshift radix (S (Zabs_nat (Fexp q - Fexp p))) q) = Fexp (Fshift radix 1 p)); [ intros Eq0 | idtac ]. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. (* Goal: @eq Z (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum p) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply sym_equal; apply Zeq_Zs; auto. (* Goal: Z.le (Fnum p) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) repeat rewrite FshiftCorrect; auto. (* Goal: Z.lt (Fnum (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Z.succ (Fnum (Fshift radix (S O) p))) *) (* Goal: @eq Z (Fexp (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Fexp (Fshift radix (S O) p)) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) replace (Zsucc (Fnum (Fshift radix 1 p))) with (Fnum (FSucc p)); auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum (Float (Z.succ (Fnum p)) (Fexp p))) *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) repeat rewrite FshiftCorrect; auto. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Z.pred (Fexp p)))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl2; auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Z.pred (Fexp p)))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl2; auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Z.pred (Fexp p)))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl2; auto with arith. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: @eq Z (Z.opp (pPred (vNum b))) (Z.succ (Z.mul (Fnum p) (Z.mul radix (Zpos xH)))) *) (* Goal: @eq Z (Fexp (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Fexp (Fshift radix (S O) p)) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite Z.mul_1_r; auto. unfold pPred in |- *; rewrite (PosNormMin radix) with (precision := precision); auto with zarith; rewrite H'1. (* Goal: @eq Z (Z.opp (Z.pred (Z.mul radix (nNormMin radix precision)))) (Z.succ (Z.mul (Z.opp (nNormMin radix precision)) radix)) *) (* Goal: @eq Z (Fexp (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Fexp (Fshift radix (S O) p)) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite Zopp_mult_distr_l_reverse. (* Goal: @eq Z (Z.opp (Z.pred (Z.mul radix (nNormMin radix precision)))) (Z.succ (Z.opp (Z.mul (nNormMin radix precision) radix))) *) (* Goal: @eq Z (Fexp (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Fexp (Fshift radix (S O) p)) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) rewrite (Zmult_comm radix). (* Goal: @eq Z (Z.opp (Z.pred (Z.mul (nNormMin radix precision) radix))) (Z.succ (Z.opp (Z.mul (nNormMin radix precision) radix))) *) (* Goal: @eq Z (Fexp (Fshift radix (S (Z.abs_nat (Z.sub (Fexp q) (Fexp p)))) q)) (Fexp (Fshift radix (S O) p)) *) (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (FSucc p))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) apply Zopp_Zpred_Zs. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. replace (Zpos (P_of_succ_nat (Zabs_nat (Fexp q - Fexp p)))) with (Zsucc (Fexp q - Fexp p)). (* Goal: @eq Z (Z.opp (Z.opp (Fnum y))) (Fnum y) *) (* Goal: Z.le (Fnum y) Z0 *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) unfold Zsucc, Zpred in |- *; ring. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite <- (inj_abs (Fexp q - Fexp p)); auto with zarith. (* Goal: Z.lt (Fexp (Float (Fnum y) (Fexp y))) (Fexp (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) *) (* Goal: @eq float (Float (Fnum y) (Fexp y)) y *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)))) (FtoRradix y) *) (* Goal: Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: not (@eq Z (Fnum x) (pPred (vNum b))) *) rewrite <- inj_S; simpl in |- *; auto. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite inj_abs; auto with zarith. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: forall (_ : Rlt (FtoRradix q) (FtoRradix (Float (Z.succ (Fnum p)) (Fexp p)))) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros H'2 H'3. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) replace p with (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q). (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (FtoRradix q) *) (* Goal: @eq float (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q) p *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto with real. cut (Fexp (Fshift radix (Zabs_nat (Fexp q - Fexp p)) q) = Fexp p); [ intros Eq0 | idtac ]. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. (* Goal: @eq Z (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum p) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply sym_equal; apply Zeq_Zs; auto. (* Goal: Z.le (Fnum p) (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FshiftCorrect; auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) replace (Zsucc (Fnum p)) with (Fnum (FSucc p)); auto. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fnum (Float (Z.succ (Fnum p)) (Fexp p))) *) (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix p) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) *) (* Goal: Z.lt (Fnum (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) repeat rewrite FshiftCorrect; auto. (* Goal: @eq Z (Fnum (FSucc p)) (Z.succ (Fnum p)) *) (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) rewrite FSuccSimpl4; auto. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp q) (Fexp p))) q)) (Fexp p) *) unfold Fshift in |- *; simpl in |- *. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) rewrite inj_abs; auto with zarith. Qed. Definition FNSucc x := FSucc (Fnormalize radix b precision x). Theorem FNSuccCanonic : forall a : float, Fbounded b a -> Fcanonic radix b (FNSucc a). (* Goal: forall (a : float) (_ : Fbounded b a), Fcanonic radix b (FNSucc a) *) intros a H'; unfold FNSucc in |- *. (* Goal: Fcanonic radix b (FSucc (Fnormalize radix b precision a)) *) apply FSuccCanonic; auto with float. Qed. Theorem FNSuccLt : forall a : float, (a < FNSucc a)%R. (* Goal: forall a : float, Rlt (FtoRradix a) (FtoRradix (FNSucc a)) *) intros a; unfold FNSucc in |- *. unfold FtoRradix in |- *; rewrite <- (FnormalizeCorrect _ radixMoreThanOne b precision a). (* Goal: Rlt (FtoR radix (Fnormalize radix b precision a)) (FtoR radix (FSucc (Fnormalize radix b precision a))) *) apply FSuccLt; auto. Qed. Theorem FNSuccProp : forall x y : float, Fbounded b x -> Fbounded b y -> (x < y)%R -> (FNSucc x <= y)%R. (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix (FNSucc x)) (FtoRradix y) *) intros x y H' H'0 H'1; unfold FNSucc in |- *. (* Goal: Rle (FtoRradix (FSucc (Fnormalize radix b precision x))) (FtoRradix y) *) replace (FtoRradix y) with (FtoRradix (Fnormalize radix b precision y)). (* Goal: Rle (FtoRradix (FSucc (Fnormalize radix b precision x))) (FtoRradix (Fnormalize radix b precision y)) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision y)) (FtoRradix y) *) apply FSuccProp; auto with float. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision y)) (FtoRradix y) *) unfold FtoRradix in |- *; repeat rewrite FnormalizeCorrect; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision y)) (FtoRradix y) *) unfold FtoRradix in |- *; repeat rewrite FnormalizeCorrect; auto. Qed. Theorem FNSuccEq : forall p q : float, Fbounded b p -> Fbounded b q -> p = q :>R -> FNSucc p = FNSucc q. (* Goal: forall (p q : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float (FNSucc p) (FNSucc q) *) intros p q H' H'0 H'1; unfold FNSucc in |- *. replace (Fnormalize radix b precision p) with (Fnormalize radix b precision q); auto. apply FcanonicUnique with (radix := radix) (b := b) (precision := precision); auto with float. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision q)) (FtoR radix (Fnormalize radix b precision p)) *) repeat rewrite FnormalizeCorrect; auto. Qed. End suc. Hint Resolve FSuccNormPos FBoundedSuc FSuccSubnormal FSuccNegCanonic FSuccCanonic FSuccLt FSuccPropPos R0RltRleSucc FSuccPropNeg FSuccProp FNSuccCanonic FNSuccLt: float. Section suc1. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Hypothesis precisionNotZero : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem nNormMimLtvNum : (nNormMin radix precision < pPred (vNum b))%Z. unfold pPred in |- *; rewrite PosNormMin with (radix := radix) (precision := precision); (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) auto with zarith. (* Goal: Z.lt (nNormMin radix precision) (Z.pred (Z.mul radix (nNormMin radix precision))) *) apply Zlt_le_trans with (Zpred (2 * nNormMin radix precision)). replace (Zpred (2 * nNormMin radix precision)) with (Zpred (nNormMin radix precision) + nNormMin radix precision)%Z; [ idtac | unfold Zpred in |- *; ring ]. pattern (nNormMin radix precision) at 1 in |- *; replace (nNormMin radix precision) with (0 + nNormMin radix precision)%Z; [ idtac | ring ]. (* Goal: Z.lt (Z.add Z0 (nNormMin radix precision)) (Z.add (Z.pred (nNormMin radix precision)) (nNormMin radix precision)) *) (* Goal: Z.le (Z.pred (Z.mul (Zpos (xO xH)) (nNormMin radix precision))) (Z.pred (Z.mul radix (nNormMin radix precision))) *) apply Zplus_lt_compat_r; auto. (* Goal: Z.lt Z0 (Z.pred (nNormMin radix precision)) *) (* Goal: Z.le (Z.pred (Z.mul (Zpos (xO xH)) (nNormMin radix precision))) (Z.pred (Z.mul radix (nNormMin radix precision))) *) apply Zlt_succ_pred. (* Goal: Z.lt (Z.succ Z0) (nNormMin radix precision) *) (* Goal: Z.le (Z.pred (Z.mul (Zpos (xO xH)) (nNormMin radix precision))) (Z.pred (Z.mul radix (nNormMin radix precision))) *) replace (Zsucc 0) with (Z_of_nat 1); [ idtac | simpl in |- *; auto ]. (* Goal: Z.lt (Z.of_nat (S O)) (nNormMin radix precision) *) (* Goal: Z.le (Z.pred (Z.mul (Zpos (xO xH)) (nNormMin radix precision))) (Z.pred (Z.mul radix (nNormMin radix precision))) *) rewrite <- (Zpower_nat_O radix); unfold nNormMin in |- *. (* Goal: Z.lt (Zpower_nat radix O) (Zpower_nat radix (Init.Nat.pred precision)) *) (* Goal: Z.le (Z.pred (Z.mul (Zpos (xO xH)) (nNormMin radix precision))) (Z.pred (Z.mul radix (nNormMin radix precision))) *) apply Zpower_nat_monotone_lt. assumption. now apply lt_pred. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zle_Zpred_Zpred. apply Zle_Zmult_comp_r; auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Z.lt_le_incl; apply nNormPos; auto with zarith. Qed. Theorem FSucFSucMid : forall p : float, Fnum (FSucc b radix precision p) <> nNormMin radix precision -> Fnum (FSucc b radix precision p) <> (- nNormMin radix precision)%Z -> Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p) = Fminus radix (FSucc b radix precision p) p :>R. (* Goal: forall (p : float) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) intros p. generalize (Z_eq_bool_correct (Fnum p) (- nNormMin radix precision)); case (Z_eq_bool (Fnum p) (- nNormMin radix precision)); intros H'1. generalize (Z_eq_bool_correct (Fexp p) (- dExp b)); case (Z_eq_bool (Fexp p) (- dExp b)); intros H'2. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccDiff2 with (2 := H'1); auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) replace p with (Float (Fnum p) (Fexp p)). (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Fnum p) (Fexp p)))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Fnum p) (Fexp p)))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Float (Fnum p) (Fexp p)))) (FSucc b radix precision (Float (Fnum p) (Fexp p))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Fnum p) (Fexp p))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) repeat (rewrite H'1; rewrite H'2). (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))))) (FSucc b radix precision (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl3; auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b)))))) (FtoR radix (Float (Z.of_nat (S O)) (Fexp (Float (Z.opp (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))))))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccDiff1 with (2 := pGivesBound); auto with arith. (* Goal: not (@eq Z (Fnum (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.opp (Z.of_N (dExp b))))) (Z.opp (nNormMin radix precision))) *) (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) simpl in |- *; auto with zarith. (* Goal: @eq float (Float (Fnum p) (Fexp p)) p *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply floatEq; auto. unfold FtoRradix in |- *; rewrite FSuccDiff3 with (x := p) (3 := pGivesBound); auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Z.of_nat (S O)) (Z.pred (Fexp p)))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) rewrite FSuccSimpl2; auto with arith. (* Goal: @eq R (FtoR radix (Fminus radix (FSucc b radix precision (Float (Z.succ (Fnum p)) (Fexp p))) (Float (Z.succ (Fnum p)) (Fexp p)))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccDiff1; simpl in |- *; auto with arith. (* Goal: not (@eq Z (Z.opp (pPred (vNum b))) (Z.opp (nNormMin radix precision))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply Zlt_not_eq; auto. (* Goal: Z.lt (Z.opp (pPred (vNum b))) (Z.opp (nNormMin radix precision)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply Zlt_Zopp; auto. (* Goal: Z.lt (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoRradix (Fminus radix (FSucc b radix precision p) p)) *) apply nNormMimLtvNum; auto. unfold FtoRradix in |- *; rewrite FSuccDiff1 with (x := p); simpl in |- *; auto with arith. generalize (Z_eq_bool_correct (Fnum p) (pPred (vNum b))); case (Z_eq_bool (Fnum p) (pPred (vNum b))); intros H'2. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl1; simpl in |- *; auto with arith. (* Goal: forall (_ : not (@eq Z (nNormMin radix precision) (nNormMin radix precision))) (_ : not (@eq Z (nNormMin radix precision) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (Float (nNormMin radix precision) (Z.succ (Fexp p)))) (Float (nNormMin radix precision) (Z.succ (Fexp p))))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) intros H'; case H'; auto. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoR radix (Fminus radix (FSucc b radix precision (FSucc b radix precision p)) (FSucc b radix precision p))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccSimpl4; simpl in |- *; auto with arith. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Fnormalize radix b precision p))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Fnormalize radix b precision p))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision (FSucc b radix precision (Fnormalize radix b precision p)))) (FSucc b radix precision (Fnormalize radix b precision p)))) (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision p)) p)) *) intros H' H'0. (* Goal: @eq R (FtoR radix (Fminus radix (FSucc b radix precision (Float (Z.succ (Fnum p)) (Fexp p))) (Float (Z.succ (Fnum p)) (Fexp p)))) (FtoR radix (Float (Zpos xH) (Fexp p))) *) rewrite FSuccDiff1; simpl in |- *; auto with arith. Qed. Theorem FNSuccFNSuccMid : forall p : float, Fbounded b p -> Fnum (FNSucc b radix precision p) <> nNormMin radix precision -> Fnum (FNSucc b radix precision p) <> (- nNormMin radix precision)%Z -> Fminus radix (FNSucc b radix precision (FNSucc b radix precision p)) (FNSucc b radix precision p) = Fminus radix (FNSucc b radix precision p) p :>R. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : not (@eq Z (Fnum (FNSucc b radix precision p)) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FNSucc b radix precision p)) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FNSucc b radix precision (FNSucc b radix precision p)) (FNSucc b radix precision p))) (FtoRradix (Fminus radix (FNSucc b radix precision p) p)) *) intros p Fb; unfold FNSucc in |- *. (* Goal: forall (_ : not (@eq Z (Fnum (FSucc b radix precision (Fnormalize radix b precision p))) (nNormMin radix precision))) (_ : not (@eq Z (Fnum (FSucc b radix precision (Fnormalize radix b precision p))) (Z.opp (nNormMin radix precision)))), @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision (FSucc b radix precision (Fnormalize radix b precision p)))) (FSucc b radix precision (Fnormalize radix b precision p)))) (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision p)) p)) *) intros H' H'0. rewrite FcanonicFnormalizeEq with (p := FSucc b radix precision (Fnormalize radix b precision p)); auto with float arith. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FSucc b radix precision (Fnormalize radix b precision p))) (FSucc b radix precision (Fnormalize radix b precision p)))) (FtoRradix (Fminus radix (FSucc b radix precision (Fnormalize radix b precision p)) p)) *) rewrite FSucFSucMid; auto. unfold FtoRradix in |- *; repeat rewrite Fminus_correct; auto with float arith. (* Goal: @eq R (Rminus (FtoR radix (FSucc b radix precision (Fnormalize radix b precision p))) (FtoR radix (Fnormalize radix b precision p))) (Rminus (FtoR radix (FSucc b radix precision (Fnormalize radix b precision p))) (FtoR radix p)) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) rewrite FnormalizeCorrect; auto. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_trans with 1%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) radix *) (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Fcanonic radix b (Float (nNormMin radix precision) (Z.succ (Fexp x))) *) (* Goal: forall _ : Z.lt (Fexp x) (Fexp y), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) (* Goal: forall _ : and (@eq Z (Fexp x) (Fexp y)) (Z.lt (Fnum x) (Fnum y)), Rle (FtoRradix (FSucc x)) (FtoRradix y) *) apply Zlt_trans with 1%Z; auto with zarith. Qed. End suc1. Hint Resolve nNormMimLtvNum: float.
(**************************************************************************** IEEE754 : NDiv Laurent Thery ***************************************************************************** Definition of the quotient and divisibility for natural and relative numbers*) Require Export Omega. Require Export Paux. Definition oZ1 (x : Option positive) := match x with | None => 0%Z | Some z => Zpos z end. (* We use the function Pdiv function to build our Zquotient*) Definition Zquotient (n m : Z) := match n, m with | Z0, _ => 0%Z | _, Z0 => 0%Z | Zpos x, Zpos y => match Pdiv x y with | (x, _) => oZ1 x end | Zneg x, Zneg y => match Pdiv x y with | (x, _) => oZ1 x end | Zpos x, Zneg y => match Pdiv x y with | (x, _) => (- oZ1 x)%Z end | Zneg x, Zpos y => match Pdiv x y with | (x, _) => (- oZ1 x)%Z end end. Theorem inj_oZ1 : forall z, oZ1 z = Z_of_nat (oZ z). intros z; case z; simpl in |- *; try (intros; apply sym_equal; apply inject_nat_convert; auto); auto. Qed. Theorem Zero_le_oZ : forall z, 0 <= oZ z. (* Goal: forall z : Option positive, le O (oZ z) *) intros z; case z; simpl in |- *; auto with arith. Qed. Hint Resolve Zero_le_oZ: arith. (* It has the required property *) Theorem ZquotientProp : forall m n : Z, n <> 0%Z -> ex (fun r : Z => m = (Zquotient m n * n + r)%Z /\ (Zabs (Zquotient m n * n) <= Zabs m)%Z /\ (Zabs r < Zabs n)%Z). (* Goal: forall (m n : Z) (_ : not (@eq Z n Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul (Zquotient m n) n) r)) (and (Z.le (Z.abs (Z.mul (Zquotient m n) n)) (Z.abs m)) (Z.lt (Z.abs r) (Z.abs n)))) *) intros m n; unfold Zquotient in |- *; case n; simpl in |- *. (* Goal: forall _ : not (@eq Z Z0 Z0), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => Z0 | Zneg x => Z0 end Z0) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => Z0 | Zneg x => Z0 end Z0)) (Z.abs m)) (Z.lt (Z.abs r) Z0))) *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in oZ1 x0 | Zneg x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) end (Zpos p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in oZ1 x0 | Zneg x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) end (Zpos p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) intros H; case H; auto. (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) intros n' Hn'; case m; simpl in |- *; auto. (* Goal: @ex Z (fun r : Z => and (@eq Z Z0 r) (and (Z.le Z0 Z0) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zpos p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) exists 0%Z; repeat split; simpl in |- *; auto with zarith. intros m'; generalize (Pdiv_correct m' n'); case (Pdiv m' n'); simpl in |- *; auto. (* Goal: forall (o o0 : Option positive) (_ : and (@eq nat (Pos.to_nat m') (Init.Nat.add (Init.Nat.mul (oZ o) (Pos.to_nat n')) (oZ o0))) (lt (oZ o0) (Pos.to_nat n'))), @ex Z (fun r : Z => and (@eq Z (Zpos m') (Z.add (Z.mul (Z.opp (oZ1 o)) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (Z.opp (oZ1 o)) (Zneg n'))) (Zpos m')) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) intros q r (H1, H2); exists (oZ1 r); repeat (split; auto with zarith). (* Goal: @eq Z (Z.opp (Zpos m')) (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto. (* Goal: @eq Z (Z.opp (Z.of_nat (Pos.to_nat m'))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite H1. (* Goal: @eq Z (Z.opp (Z.of_nat (Init.Nat.add (Init.Nat.mul (oZ q) (Pos.to_nat n')) (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite inj_plus; rewrite inj_mult. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto. (* Goal: @eq Z (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r))) (Z.add (Z.mul (oZ1 q) (Z.of_nat (Pos.to_nat n'))) (oZ1 r)) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zpos n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zpos n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zpos n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) repeat rewrite inj_oZ1; auto. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (oZ q)) (Zpos n')) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. intros m'; generalize (Pdiv_correct m' n'); case (Pdiv m' n'); simpl in |- *; auto. (* Goal: forall (o o0 : Option positive) (_ : and (@eq nat (Pos.to_nat m') (Init.Nat.add (Init.Nat.mul (oZ o) (Pos.to_nat n')) (oZ o0))) (lt (oZ o0) (Pos.to_nat n'))), @ex Z (fun r : Z => and (@eq Z (Zneg m') (Z.add (Z.mul (oZ1 o) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (oZ1 o) (Zneg n'))) (Zpos m')) (Z.lt (Z.abs r) (Zpos n')))) *) intros q r (H1, H2); exists (- oZ1 r)%Z; repeat (split; auto with zarith). (* Goal: @eq Z (Zneg m') (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg m') with (- Zpos m')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: @eq Z (Z.opp (Zpos m')) (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto. (* Goal: @eq Z (Z.opp (Z.of_nat (Pos.to_nat m'))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite H1. (* Goal: @eq Z (Z.opp (Z.of_nat (Init.Nat.add (Init.Nat.mul (oZ q) (Pos.to_nat n')) (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite inj_plus; rewrite inj_mult. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) repeat rewrite inj_oZ1; auto with zarith. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) ring. (* Goal: Z.le (Z.abs (Z.mul (Z.opp (oZ1 q)) (Zpos n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) rewrite <- Zopp_mult_distr_l; rewrite Zabs_Zopp. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (oZ q)) (Zpos n')) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite Zabs_Zopp. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), @ex Z (fun r : Z => and (@eq Z m (Z.add (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p)) r)) (and (Z.le (Z.abs (Z.mul match m with | Z0 => Z0 | Zpos x => let (x0, _) := Pdiv x p in Z.opp (oZ1 x0) | Zneg x => let (x0, _) := Pdiv x p in oZ1 x0 end (Zneg p))) (Z.abs m)) (Z.lt (Z.abs r) (Zpos p)))) *) intros n' Hn'; case m; simpl in |- *; auto. (* Goal: @ex Z (fun r : Z => and (@eq Z Z0 r) (and (Z.le Z0 Z0) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zpos p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in Z.opp (oZ1 x)) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) exists 0%Z; repeat split; simpl in |- *; auto with zarith. intros m'; generalize (Pdiv_correct m' n'); case (Pdiv m' n'); simpl in |- *; auto. (* Goal: forall (o o0 : Option positive) (_ : and (@eq nat (Pos.to_nat m') (Init.Nat.add (Init.Nat.mul (oZ o) (Pos.to_nat n')) (oZ o0))) (lt (oZ o0) (Pos.to_nat n'))), @ex Z (fun r : Z => and (@eq Z (Zpos m') (Z.add (Z.mul (Z.opp (oZ1 o)) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (Z.opp (oZ1 o)) (Zneg n'))) (Zpos m')) (Z.lt (Z.abs r) (Zpos n')))) *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) intros q r (H1, H2); exists (oZ1 r); repeat (split; auto with zarith). (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg n') with (- Zpos n')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: @eq Z (Z.opp (Zpos m')) (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto. (* Goal: @eq Z (Z.opp (Z.of_nat (Pos.to_nat m'))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite H1. (* Goal: @eq Z (Z.opp (Z.of_nat (Init.Nat.add (Init.Nat.mul (oZ q) (Pos.to_nat n')) (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite inj_plus; rewrite inj_mult. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) repeat rewrite inj_oZ1; auto with zarith. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) ring. (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg n') with (- Zpos n')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: Z.le (Z.abs (Z.mul (Z.opp (oZ1 q)) (Z.opp (Zpos n')))) (Zpos m') *) (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) (* Goal: forall p : positive, @ex Z (fun r : Z => and (@eq Z (Zneg p) (Z.add (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (let (x, _) := Pdiv p n' in oZ1 x) (Zneg n'))) (Zpos p)) (Z.lt (Z.abs r) (Zpos n')))) *) rewrite Zmult_opp_opp. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (oZ q)) (Zpos n')) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto with zarith. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. intros m'; generalize (Pdiv_correct m' n'); case (Pdiv m' n'); simpl in |- *; auto. (* Goal: forall (o o0 : Option positive) (_ : and (@eq nat (Pos.to_nat m') (Init.Nat.add (Init.Nat.mul (oZ o) (Pos.to_nat n')) (oZ o0))) (lt (oZ o0) (Pos.to_nat n'))), @ex Z (fun r : Z => and (@eq Z (Zneg m') (Z.add (Z.mul (oZ1 o) (Zneg n')) r)) (and (Z.le (Z.abs (Z.mul (oZ1 o) (Zneg n'))) (Zpos m')) (Z.lt (Z.abs r) (Zpos n')))) *) intros q r (H1, H2); exists (- oZ1 r)%Z; repeat (split; auto with zarith). (* Goal: @eq Z (Zneg m') (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg m') with (- Zpos m')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: @eq Z (Z.opp (Zpos m')) (Z.add (Z.mul (oZ1 q) (Zneg n')) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto. (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg n') with (- Zpos n')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: @eq Z (Z.opp (Z.of_nat (Pos.to_nat m'))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite H1. (* Goal: @eq Z (Z.opp (Z.of_nat (Init.Nat.add (Init.Nat.mul (oZ q) (Pos.to_nat n')) (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite inj_plus; rewrite inj_mult. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Zpos n'))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (oZ1 q) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (oZ1 r))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) repeat rewrite inj_oZ1; auto with zarith. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) ring. (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) replace (Zneg n') with (- Zpos n')%Z; [ idtac | simpl in |- *; auto ]. (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- Zopp_mult_distr_r; rewrite Zabs_Zopp. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (oZ q)) (Zpos n')) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos m') m'); auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite Zabs_Zopp. (* Goal: Z.lt (Z.abs (oZ1 r)) (Zpos n') *) rewrite inj_oZ1; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.of_nat (oZ r)) (Zpos n') *) rewrite <- (inject_nat_convert (Zpos n') n'); auto with zarith. Qed. Theorem ZquotientPos : forall z1 z2 : Z, (0 <= z1)%Z -> (0 <= z2)%Z -> (0 <= Zquotient z1 z2)%Z. (* Goal: forall (z1 z2 : Z) (_ : Z.le Z0 z1) (_ : Z.le Z0 z2), Z.le Z0 (Zquotient z1 z2) *) intros z1 z2 H H0; case (Z_eq_dec z2 0); intros Z1. rewrite Z1; red in |- *; case z1; simpl in |- *; auto; intros; red in |- *; intros; discriminate. (* Goal: Z.le Z0 (Zquotient z1 z2) *) case (ZquotientProp z1 z2); auto; intros r (H1, (H2, H3)). (* Goal: Z.le Z0 (Zquotient z1 z2) *) case (Zle_or_lt 0 (Zquotient z1 z2)); auto; intros Z2. (* Goal: Z.le Z0 (Zquotient z1 z2) *) Contradict H3; apply Zle_not_lt. replace r with (z1 - Zquotient z1 z2 * z2)%Z; [ idtac | pattern z1 at 1 in |- *; rewrite H1; ring ]. (* Goal: Z.le (Z.abs z2) (Z.abs (Z.sub z1 (Z.mul (Zquotient z1 z2) z2))) *) repeat rewrite Zabs_eq; auto. (* Goal: Z.le z2 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) pattern z2 at 1 in |- *; replace z2 with (0 + 1 * z2)%Z; [ idtac | ring ]. (* Goal: Z.le (Z.add Z0 (Z.mul (Zpos xH) z2)) (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) unfold Zminus in |- *; apply Zle_trans with (z1 + 1 * z2)%Z; auto with zarith. (* Goal: Z.le (Z.add z1 (Z.mul (Zpos xH) z2)) (Z.add z1 (Z.opp (Z.mul (Zquotient z1 z2) z2))) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) apply Zplus_le_compat_l. (* Goal: Z.le (Z.mul (Zpos xH) z2) (Z.opp (Z.mul (Zquotient z1 z2) z2)) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) rewrite Zopp_mult_distr_l. (* Goal: Z.le (Z.mul (Zpos xH) z2) (Z.mul (Z.opp (Zquotient z1 z2)) z2) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) apply Zle_Zmult_comp_r; auto with zarith. (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) unfold Zminus in |- *; rewrite Zopp_mult_distr_l; auto with zarith. Qed. (* The property of a number to divide another one (Ndivides n m) shoud be read as m divides n *) Definition Zdivides (n m : Z) := exists q : Z, n = (m * q)%Z. Theorem ZdividesZquotient : forall n m : Z, m <> 0%Z -> Zdivides n m -> n = (Zquotient n m * m)%Z. (* Goal: forall (n m : Z) (_ : not (@eq Z m Z0)) (_ : Zdivides n m), @eq Z n (Z.mul (Zquotient n m) m) *) intros n m H' H'0. (* Goal: @eq Z n (Z.mul (Zquotient n m) m) *) case H'0; intros z1 Hz1. (* Goal: @eq Z n (Z.mul (Zquotient n m) m) *) case (ZquotientProp n m); auto; intros z2 (Hz2, (Hz3, Hz4)). cut (z2 = 0%Z); [ intros H1; pattern n at 1 in |- *; rewrite Hz2; rewrite H1; ring | idtac ]. (* Goal: @eq Z z2 Z0 *) cut (z2 = ((z1 - Zquotient n m) * m)%Z); [ intros H2 | idtac ]. (* Goal: @eq Z z2 Z0 *) (* Goal: @eq Z z2 (Z.mul (Z.sub z1 (Zquotient n m)) m) *) case (Z_eq_dec (z1 - Zquotient n m) 0); intros H3. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite H2; rewrite H3; ring. (* Goal: @eq Z z2 Z0 *) (* Goal: @eq Z z2 (Z.mul (Z.sub z1 (Zquotient n m)) m) *) Contradict Hz4. (* Goal: not (Z.lt (Z.abs z2) (Z.abs m)) *) (* Goal: @eq Z z2 (Z.mul (Z.sub z1 (Zquotient n m)) m) *) replace (Zabs m) with (1 * Zabs m)%Z; [ idtac | ring ]. (* Goal: not (Z.lt (Z.abs z2) (Z.mul (Zpos xH) (Z.abs m))) *) (* Goal: @eq Z z2 (Z.mul (Z.sub z1 (Zquotient n m)) m) *) apply Zle_not_lt; rewrite H2. (* Goal: Z.le (Z.mul (Zpos xH) z2) (Z.mul (Z.opp (Zquotient z1 z2)) z2) *) (* Goal: Z.le Z0 (Z.sub z1 (Z.mul (Zquotient z1 z2) z2)) *) rewrite Zabs_Zmult; apply Zle_Zmult_comp_r; auto with zarith. generalize H3; case (z1 - Zquotient n m)%Z; try (intros H1; case H1; auto; fail); simpl in |- *; intros p; case p; simpl in |- *; auto; intros; red in |- *; (* Goal: not (@eq Z (Zpos xH) Z0) *) (* Goal: forall (x : Z) (_ : and (@eq Z m (Z.add (Z.mul (Zquotient m (Zpos xH)) (Zpos xH)) x)) (and (Z.le (Z.abs (Z.mul (Zquotient m (Zpos xH)) (Zpos xH))) (Z.abs m)) (Z.lt (Z.abs x) (Z.abs (Zpos xH))))), @eq Z (Zquotient m (Zpos xH)) m *) simpl in |- *; auto; red in |- *; intros; discriminate. rewrite Zmult_minus_distr_r; rewrite (Zmult_comm z1); rewrite <- Hz1; (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) (pattern n at 1 in |- *; rewrite Hz2); ring. Qed. Theorem ZdividesZquotientInv : forall n m : Z, n = (Zquotient n m * m)%Z -> Zdivides n m. (* Goal: forall (n m : Z) (_ : @eq Z n (Z.mul (Zquotient n m) m)), Zdivides n m *) intros n m H'; red in |- *. (* Goal: @ex Z (fun q : Z => @eq Z n (Z.mul m q)) *) exists (Zquotient n m); auto. (* Goal: @eq Z n (Z.mul m (Zquotient n m)) *) pattern n at 1 in |- *; rewrite H'; auto with zarith. Qed. Theorem ZdividesMult : forall n m p : Z, Zdivides n m -> Zdivides (p * n) (p * m). (* Goal: forall (n m p : Z) (_ : Zdivides n m), Zdivides (Z.mul p n) (Z.mul p m) *) intros n m p H'; red in H'. (* Goal: Zdivides (Z.mul p n) (Z.mul p m) *) elim H'; intros q E. (* Goal: Zdivides (Z.mul p n) (Z.mul p m) *) red in |- *. (* Goal: Zdivides n m *) exists q. (* Goal: @eq Z (Z.mul p n) (Z.mul (Z.mul p m) q) *) rewrite E. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith. Qed. Theorem Zeq_mult_simpl : forall a b c : Z, c <> 0%Z -> (a * c)%Z = (b * c)%Z -> a = b. (* Goal: forall (a b c : Z) (_ : not (@eq Z c Z0)) (_ : @eq Z (Z.mul a c) (Z.mul b c)), @eq Z a b *) intros a b c H H0. (* Goal: @eq Z a b *) case (Zle_or_lt c 0); intros Zl1. apply Zle_antisym; apply Zmult_le_reg_r with (p := (- c)%Z); try apply Zlt_gt; auto with zarith; repeat rewrite <- Zopp_mult_distr_r; (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) rewrite H0; auto with zarith. apply Zle_antisym; apply Zmult_le_reg_r with (p := c); try apply Zlt_gt; (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith; rewrite H0; auto with zarith. Qed. Theorem ZdividesDiv : forall n m p : Z, p <> 0%Z -> Zdivides (p * n) (p * m) -> Zdivides n m. (* Goal: forall (n m p : Z) (_ : Zdivides n m) (_ : Zdivides m p), Zdivides n p *) intros n m p H' H'0. (* Goal: Zdivides n m *) case H'0; intros q E. (* Goal: Zdivides n m *) exists q. (* Goal: @eq Z n (Z.mul m q) *) apply Zeq_mult_simpl with (c := p); auto. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) rewrite (Zmult_comm n); rewrite E; ring. Qed. Definition ZdividesP : forall n m : Z, {Zdivides n m} + {~ Zdivides n m}. (* Goal: forall n m : Z, sumbool (Zdivides n m) (not (Zdivides n m)) *) intros n m; case m. (* Goal: sumbool (Zdivides n Z0) (not (Zdivides n Z0)) *) (* Goal: forall p : positive, sumbool (Zdivides n (Zpos p)) (not (Zdivides n (Zpos p))) *) (* Goal: forall p : positive, sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) case n. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) left; red in |- *; exists 0%Z; auto with zarith. intros p; right; red in |- *; intros H; case H; simpl in |- *; intros f H1; discriminate. intros p; right; red in |- *; intros H; case H; simpl in |- *; intros f H1; discriminate. intros p; generalize (Z_eq_bool_correct (Zquotient n (Zpos p) * Zpos p) n); case (Z_eq_bool (Zquotient n (Zpos p) * Zpos p) n); intros H1. (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) left; apply ZdividesZquotientInv; auto. (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) right; Contradict H1; apply sym_equal; apply ZdividesZquotient; auto. (* Goal: not (@eq Z (Zpos xH) Z0) *) (* Goal: forall (x : Z) (_ : and (@eq Z m (Z.add (Z.mul (Zquotient m (Zpos xH)) (Zpos xH)) x)) (and (Z.le (Z.abs (Z.mul (Zquotient m (Zpos xH)) (Zpos xH))) (Z.abs m)) (Z.lt (Z.abs x) (Z.abs (Zpos xH))))), @eq Z (Zquotient m (Zpos xH)) m *) red in |- *; intros; discriminate. intros p; generalize (Z_eq_bool_correct (Zquotient n (Zneg p) * Zneg p) n); case (Z_eq_bool (Zquotient n (Zneg p) * Zneg p) n); intros H1. (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) left; apply ZdividesZquotientInv; auto. (* Goal: sumbool (Zdivides n (Zneg p)) (not (Zdivides n (Zneg p))) *) right; Contradict H1; apply sym_equal; apply ZdividesZquotient; auto. (* Goal: not (@eq Z (Zpos xH) Z0) *) (* Goal: forall (x : Z) (_ : and (@eq Z m (Z.add (Z.mul (Zquotient m (Zpos xH)) (Zpos xH)) x)) (and (Z.le (Z.abs (Z.mul (Zquotient m (Zpos xH)) (Zpos xH))) (Z.abs m)) (Z.lt (Z.abs x) (Z.abs (Zpos xH))))), @eq Z (Zquotient m (Zpos xH)) m *) red in |- *; intros; discriminate. Defined. (* Eval Compute in (ZdividesP (POS (xO (xO xH))) (POS (xO xH))). *) Theorem Zquotient1 : forall m : Z, Zquotient m 1 = m. (* Goal: forall m : Z, @eq Z (Zquotient m (Zpos xH)) m *) intros m. (* Goal: @eq Z (Zquotient m (Zpos xH)) m *) case (ZquotientProp m 1); auto. (* Goal: not (@eq Z (Zpos xH) Z0) *) (* Goal: forall (x : Z) (_ : and (@eq Z m (Z.add (Z.mul (Zquotient m (Zpos xH)) (Zpos xH)) x)) (and (Z.le (Z.abs (Z.mul (Zquotient m (Zpos xH)) (Zpos xH))) (Z.abs m)) (Z.lt (Z.abs x) (Z.abs (Zpos xH))))), @eq Z (Zquotient m (Zpos xH)) m *) red in |- *; intros; discriminate. (* Goal: forall (x : Z) (_ : and (@eq Z m (Z.add (Z.mul (Zquotient m (Zpos xH)) (Zpos xH)) x)) (and (Z.le (Z.abs (Z.mul (Zquotient m (Zpos xH)) (Zpos xH))) (Z.abs m)) (Z.lt (Z.abs x) (Z.abs (Zpos xH))))), @eq Z (Zquotient m (Zpos xH)) m *) intros z (H1, (H2, H3)). (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) pattern m at 2 in |- *; rewrite H1; replace z with 0%Z; try ring. generalize H3; case z; simpl in |- *; auto; intros p; case p; unfold Zlt in |- *; simpl in |- *; intros; discriminate. Qed. Theorem Zdivides1 : forall m : Z, Zdivides m 1. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) intros m; exists m; auto with zarith. Qed. Theorem Zabs_eq_case : forall z1 z2 : Z, Zabs z1 = Zabs z2 -> z1 = z2 \/ z1 = (- z2)%Z. intros z1 z2; case z1; case z2; simpl in |- *; auto; try (intros; discriminate); intros p1 p2 H1; injection H1; (intros H2; rewrite H2); auto. Qed. Theorem Zabs_tri : forall z1 z2 : Z, (Zabs (z1 + z2) <= Zabs z1 + Zabs z2)%Z. (* Goal: forall z1 z2 : Z, Z.le (Z.abs (Z.add z1 z2)) (Z.add (Z.abs z1) (Z.abs z2)) *) intros z1 z2; case z1; case z2; try (simpl in |- *; auto with zarith; fail). intros p1 p2; apply Zabs_intro with (P := fun x => (x <= Zabs (Zpos p2) + Zabs (Zneg p1))%Z); (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) try rewrite Zopp_plus_distr; auto with zarith. intros p1 p2; apply Zabs_intro with (P := fun x => (x <= Zabs (Zpos p2) + Zabs (Zneg p1))%Z); (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) try rewrite Zopp_plus_distr; auto with zarith. Qed. Hint Resolve Zabs_tri: zarith. Theorem ZquotientUnique : forall m n q r : Z, n <> 0%Z -> m = (q * n + r)%Z -> (Zabs (q * n) <= Zabs m)%Z -> (Zabs r < Zabs n)%Z -> q = Zquotient m n. (* Goal: forall (m n q r : Z) (_ : not (@eq Z n Z0)) (_ : @eq Z m (Z.add (Z.mul q n) r)) (_ : Z.le (Z.abs (Z.mul q n)) (Z.abs m)) (_ : Z.lt (Z.abs r) (Z.abs n)), @eq Z q (Zquotient m n) *) intros m n q r H' H'0 H'1 H'2. (* Goal: @eq Z q (Zquotient m n) *) case (ZquotientProp m n); auto; intros z (H0, (H1, H2)). (* Goal: @eq Z q (Zquotient m n) *) case (Zle_or_lt (Zabs q) (Zabs (Zquotient m n))); intros Zl1; auto with arith. (* Goal: @eq Z q (Zquotient m n) *) (* Goal: @eq Z q (Zquotient m n) *) case (Zle_lt_or_eq _ _ Zl1); clear Zl1; intros Zl1; auto with arith. (* Goal: @eq Z q (Zquotient m n) *) (* Goal: @eq Z q (Zquotient m n) *) (* Goal: @eq Z q (Zquotient m n) *) Contradict H1; apply Zlt_not_le. (* Goal: Z.lt (Z.abs m) (Z.abs (Z.mul (Zquotient m n) n)) *) (* Goal: @eq Z q (Zquotient m n) *) (* Goal: @eq Z q (Zquotient m n) *) pattern m at 1 in |- *; rewrite H'0. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_lt_trans with (Zabs (q * n) + Zabs r)%Z; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zlt_le_trans with (Zabs (q * n) + Zabs n)%Z; auto with zarith. (* Goal: Z.le (Z.add (Z.abs (Z.mul (Zquotient m q) q)) (Z.abs q)) (Z.abs (Z.mul (Zquotient n q) q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) repeat rewrite Zabs_Zmult. replace (Zabs q * Zabs n + Zabs n)%Z with (Zsucc (Zabs q) * Zabs n)%Z; [ auto with zarith | unfold Zsucc in |- *; ring ]. (* Goal: @eq Z q (Zquotient m n) *) (* Goal: @eq Z q (Zquotient m n) *) case (Zabs_eq_case _ _ Zl1); auto. intros H; (cut (Zquotient m n = 0%Z); [ intros H3; rewrite H; repeat rewrite H3; simpl in |- *; auto | idtac ]). (* Goal: @eq Z (Zquotient m n) Z0 *) (* Goal: @eq Z q (Zquotient m n) *) cut (Zabs (Zquotient m n) < 1)%Z. case (Zquotient m n); simpl in |- *; auto; intros p; case p; unfold Zlt in |- *; simpl in |- *; intros; discriminate. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zlt_mult_simpl_l with (c := Zabs n); auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (Zle_lt_or_eq 0 (Zabs n)); auto with zarith. (* Goal: forall _ : @eq Z Z0 (Z.abs n), Z.lt Z0 (Z.abs n) *) (* Goal: Z.lt (Z.mul (Z.abs n) (Z.abs (Zquotient m n))) (Z.mul (Z.abs n) (Zpos xH)) *) (* Goal: @eq Z q (Zquotient m n) *) intros H3; case H'; auto. (* Goal: @eq Z n Z0 *) (* Goal: Z.lt (Z.mul (Z.abs n) (Z.abs (Zquotient m n))) (Z.mul (Z.abs n) (Zpos xH)) *) (* Goal: @eq Z q (Zquotient m n) *) generalize H3; case n; simpl in |- *; auto; intros; discriminate. (* Goal: Z.lt (Z.mul (Z.abs n) (Z.abs (Zquotient m n))) (Z.mul (Z.abs n) (Zpos xH)) *) (* Goal: @eq Z q (Zquotient m n) *) rewrite <- Zabs_Zmult; rewrite (Zmult_comm n). (* Goal: Z.lt (Z.abs (Z.mul (Zquotient m n) n)) (Z.mul (Z.abs n) (Zpos xH)) *) (* Goal: @eq Z q (Zquotient m n) *) replace (Zabs n * 1)%Z with (Zabs n); [ idtac | ring ]. (* Goal: Z.lt (Z.abs (Z.mul (Zquotient m n) n)) (Z.abs n) *) (* Goal: @eq Z q (Zquotient m n) *) apply Zle_lt_trans with (1 := H1). (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zlt_mult_simpl_l with (c := (1 + 1)%Z); auto with zarith. (* Goal: Z.lt (Z.mul (Z.add (Zpos xH) (Zpos xH)) (Z.abs m)) (Z.mul (Z.add (Zpos xH) (Zpos xH)) (Z.abs n)) *) (* Goal: @eq Z q (Zquotient m n) *) replace ((1 + 1) * Zabs m)%Z with (Zabs (m + m)). (* Goal: Z.lt (Z.abs (Z.add m m)) (Z.mul (Z.add (Zpos xH) (Zpos xH)) (Z.abs n)) *) (* Goal: @eq Z (Z.abs (Z.add m m)) (Z.mul (Z.add (Zpos xH) (Zpos xH)) (Z.abs m)) *) (* Goal: @eq Z q (Zquotient m n) *) replace ((1 + 1) * Zabs n)%Z with (Zabs n + Zabs n)%Z; [ idtac | ring ]. (* Goal: Z.lt (Z.abs (Z.add m m)) (Z.add (Z.abs n) (Z.abs n)) *) (* Goal: @eq Z (Z.abs (Z.add m m)) (Z.mul (Z.add (Zpos xH) (Zpos xH)) (Z.abs m)) *) (* Goal: @eq Z q (Zquotient m n) *) pattern m at 1 in |- *; rewrite H'0; rewrite H0; rewrite H. replace (- Zquotient m n * n + r + (Zquotient m n * n + z))%Z with (r + z)%Z; [ idtac | ring ]. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_lt_trans with (Zabs r + Zabs z)%Z; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) rewrite <- (Zabs_eq (1 + 1)); auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) rewrite <- Zabs_Zmult; apply f_equal with (f := Zabs); auto with zarith. (* Goal: @eq Z q (Zquotient m n) *) Contradict H'1; apply Zlt_not_le. (* Goal: Z.lt (Z.abs m) (Z.abs (Z.mul q n)) *) pattern m at 1 in |- *; rewrite H0. apply Zle_lt_trans with (Zabs (Zquotient m n * n) + Zabs z)%Z; (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith. apply Zlt_le_trans with (Zabs (Zquotient m n * n) + Zabs n)%Z; (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith. (* Goal: Z.le (Z.add (Z.abs (Z.mul (Zquotient m q) q)) (Z.abs q)) (Z.abs (Z.mul (Zquotient n q) q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) repeat rewrite Zabs_Zmult. replace (Zabs (Zquotient m n) * Zabs n + Zabs n)%Z with (Zsucc (Zabs (Zquotient m n)) * Zabs n)%Z; [ auto with zarith | unfold Zsucc in |- *; ring ]. Qed. Theorem ZquotientZopp : forall m n : Z, Zquotient (- m) n = (- Zquotient m n)%Z. (* Goal: forall m n : Z, @eq Z (Zquotient (Z.opp m) n) (Z.opp (Zquotient m n)) *) intros m n; case (Z_eq_dec n 0); intros Z1. (* Goal: @eq Z (Zquotient (Z.opp m) n) (Z.opp (Zquotient m n)) *) (* Goal: @eq Z (Zquotient (Z.opp m) n) (Z.opp (Zquotient m n)) *) rewrite Z1; unfold Zquotient in |- *; case n; case m; simpl in |- *; auto. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (ZquotientProp m n); auto; intros r1 (H'2, (H'3, H'4)); auto with zarith. apply sym_equal; apply ZquotientUnique with (q := (- Zquotient m n)%Z) (r := (- r1)%Z); auto. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) pattern m at 1 in |- *; rewrite H'2; ring. (* Goal: Z.le (Z.abs (Z.mul (Z.opp (Zquotient m n)) n)) (Z.abs (Z.opp m)) *) (* Goal: Z.lt (Z.abs (Z.opp r1)) (Z.abs n) *) rewrite <- Zopp_mult_distr_l; repeat rewrite Zabs_Zopp; auto. (* Goal: Z.lt (Z.abs (Z.opp r1)) (Z.abs n) *) rewrite Zabs_Zopp; auto. Qed. Theorem ZquotientMonotone : forall n m q : Z, (Zabs n <= Zabs m)%Z -> (Zabs (Zquotient n q) <= Zabs (Zquotient m q))%Z. (* Goal: forall (n m q : Z) (_ : Z.le (Z.abs n) (Z.abs m)), Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) intros n m q H; case (Zle_lt_or_eq _ _ H); intros Z0. (* Goal: Z.le (Zpower_nat r (digit r v)) (Z.abs v) *) case (Z_eq_dec q 0); intros Z1. rewrite Z1; unfold Zquotient in |- *; case n; case m; simpl in |- *; (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith. case (Zle_or_lt (Zabs (Zquotient n q)) (Zabs (Zquotient m q))); auto; intros H'1. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (ZquotientProp m q); auto; intros r1 (H'2, (H'3, H'4)); auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (ZquotientProp n q); auto; intros r2 (H'5, (H'6, H'7)); auto with zarith. (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) Contradict H'6. (* Goal: not (Z.le (Z.abs (Z.mul (Zquotient n q) q)) (Z.abs n)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) apply Zlt_not_le. (* Goal: Z.lt (Z.abs n) (Z.abs (Z.mul (Zquotient n q) q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) apply Zlt_le_trans with (1 := Z0). (* Goal: Z.le (Z.abs m) (Z.abs (Z.mul (Zquotient n q) q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) rewrite H'2. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_trans with (Zabs (Zquotient m q * q) + Zabs r1)%Z; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_trans with (Zabs (Zquotient m q * q) + Zabs q)%Z; auto with zarith. (* Goal: Z.le (Z.add (Z.abs (Z.mul (Zquotient m q) q)) (Z.abs q)) (Z.abs (Z.mul (Zquotient n q) q)) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) repeat rewrite Zabs_Zmult. replace (Zabs (Zquotient m q) * Zabs q + Zabs q)%Z with (Zsucc (Zabs (Zquotient m q)) * Zabs q)%Z; [ idtac | unfold Zsucc in |- *; ring ]. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) cut (0 < Zabs q)%Z; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (Zle_lt_or_eq 0 (Zabs q)); auto with zarith. (* Goal: forall _ : @eq Z BinNums.Z0 (Z.abs q), Z.lt BinNums.Z0 (Z.abs q) *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) intros H'6; case Z1; auto. (* Goal: @eq Z q BinNums.Z0 *) (* Goal: Z.le (Z.abs (Zquotient n q)) (Z.abs (Zquotient m q)) *) generalize H'6; case q; simpl in |- *; auto; intros; discriminate. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) case (Zabs_eq_case _ _ Z0); intros Z1; rewrite Z1; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) rewrite ZquotientZopp; rewrite Zabs_Zopp; auto with zarith. Qed. Theorem NotDividesDigit : forall r v : Z, (1 < r)%Z -> v <> 0%Z -> ~ Zdivides v (Zpower_nat r (digit r v)). (* Goal: Zdivides n m *) intros r v H H'; red in |- *; intros H'0; case H'0; intros q E. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) absurd (Zabs v < Zpower_nat r (digit r v))%Z; auto with zarith. (* Goal: not (Z.lt (Z.abs v) (Zpower_nat r (digit r v))) *) apply Zle_not_lt. (* Goal: Z.le (Zpower_nat r (digit r v)) (Z.abs v) *) case (Z_eq_dec q 0); intros Z1. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) case H'; rewrite E; rewrite Z1; ring. (* Goal: @eq Z (Z.mul p n) (Z.mul (Z.mul p m) q) *) pattern v at 2 in |- *; rewrite E. (* Goal: Z.le (Z.abs m) (Z.abs (Z.mul m q)) *) rewrite Zabs_Zmult. pattern (Zpower_nat r (digit r v)) at 1 in |- *; replace (Zpower_nat r (digit r v)) with (Zpower_nat r (digit r v) * 1)%Z; [ idtac | ring ]. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) rewrite (fun x y => Zabs_eq (Zpower_nat x y)); auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_Zmult_comp_l; auto with zarith. generalize Z1; case q; simpl in |- *; try (intros H1; case H1; auto; fail); intros p; (case p; unfold Zle in |- *; simpl in |- *; intros; red in |- *; intros; discriminate). Qed. Theorem ZDividesLe : forall n m : Z, n <> 0%Z -> Zdivides n m -> (Zabs m <= Zabs n)%Z. (* Goal: @eq Z (Z.mul p n) (Z.mul (Z.mul p m) q) *) intros n m H' H'0; case H'0; intros q E; rewrite E. (* Goal: Z.le (Z.abs m) (Z.abs (Z.mul m q)) *) rewrite Zabs_Zmult. pattern (Zabs m) at 1 in |- *; replace (Zabs m) with (Zabs m * 1)%Z; [ idtac | ring ]. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zle_Zmult_comp_l; auto with zarith. generalize E H'; case q; simpl in |- *; auto; try (intros H1 H2; case H2; rewrite H1; ring; fail); intros p; case p; unfold Zle in |- *; simpl in |- *; intros; red in |- *; discriminate. Qed. Theorem Zquotient_mult_comp : forall m n p : Z, p <> 0%Z -> Zquotient (m * p) (n * p) = Zquotient m n. (* Goal: forall (m n p : Z) (_ : not (@eq Z p Z0)), @eq Z (Zquotient (Z.mul m p) (Z.mul n p)) (Zquotient m n) *) intros m n p Z1; case (Z_eq_dec n 0); intros Z2. rewrite Z2; unfold Zquotient in |- *; case (m * p)%Z; case m; simpl in |- *; auto. (* Goal: @eq Z (Zquotient (Z.mul m p) (Z.mul n p)) (Zquotient m n) *) case (ZquotientProp m n); auto; intros r (H1, (H2, H3)). apply sym_equal; apply ZquotientUnique with (r := (r * p)%Z); (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) auto with zarith. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) pattern m at 1 in |- *; rewrite H1; ring. (* Goal: Z.le (Z.abs (Z.mul (Zquotient m n) (Z.mul n p))) (Z.abs (Z.mul m p)) *) (* Goal: Z.lt (Z.abs (Z.mul r p)) (Z.abs (Z.mul n p)) *) rewrite Zmult_assoc. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) repeat rewrite (fun x => Zabs_Zmult x p); auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) repeat rewrite Zabs_Zmult; auto with zarith. (* Goal: @eq Z (Z.mul p (Z.mul m q)) (Z.mul (Z.mul p m) q) *) apply Zmult_gt_0_lt_compat_r; auto with zarith. apply Zlt_gt; generalize Z1; case p; simpl in |- *; try (intros H4; case H4; auto; fail); unfold Zlt in |- *; simpl in |- *; auto; intros; red in |- *; intros; discriminate. Qed. Theorem ZDivides_add : forall n m p : Z, Zdivides n p -> Zdivides m p -> Zdivides (n + m) p. (* Goal: forall (n m p : Z) (_ : Zdivides n m) (_ : Zdivides m p), Zdivides n p *) intros n m p H' H'0. (* Goal: Zdivides n p *) case H'; intros z1 Hz1. (* Goal: Zdivides n p *) case H'0; intros z2 Hz2. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) exists (z1 + z2)%Z; rewrite Hz1; rewrite Hz2; ring. Qed. Theorem NDivides_minus : forall n m p : Z, Zdivides n p -> Zdivides m p -> Zdivides (n - m) p. (* Goal: forall (n m p : Z) (_ : Zdivides n m) (_ : Zdivides m p), Zdivides n p *) intros n m p H' H'0. (* Goal: Zdivides n p *) case H'; intros z1 Hz1. (* Goal: Zdivides n p *) case H'0; intros z2 Hz2. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) exists (z1 - z2)%Z; rewrite Hz1; rewrite Hz2; ring. Qed. Theorem ZDivides_mult : forall n m p q : Z, Zdivides n p -> Zdivides m q -> Zdivides (n * m) (p * q). (* Goal: forall (n m p q : Z) (_ : Zdivides n p) (_ : Zdivides m q), Zdivides (Z.mul n m) (Z.mul p q) *) intros n m p q H' H'0. (* Goal: Zdivides n p *) case H'; intros z1 Hz1. (* Goal: Zdivides n p *) case H'0; intros z2 Hz2. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) exists (z1 * z2)%Z; rewrite Hz1; rewrite Hz2; ring. Qed. Theorem ZdividesTrans : forall n m p : Z, Zdivides n m -> Zdivides m p -> Zdivides n p. (* Goal: forall (n m p : Z) (_ : Zdivides n m) (_ : Zdivides m p), Zdivides n p *) intros n m p H' H'0. (* Goal: Zdivides n p *) case H'; intros z1 Hz1. (* Goal: Zdivides n p *) case H'0; intros z2 Hz2. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.of_nat (Pos.to_nat n'))) (Z.of_nat (oZ r)))) (Z.add (Z.mul (Z.of_nat (oZ q)) (Z.opp (Z.of_nat (Pos.to_nat n')))) (Z.opp (Z.of_nat (oZ r)))) *) (* Goal: Z.le (Z.abs (Z.mul (oZ1 q) (Zneg n'))) (Zpos m') *) (* Goal: Z.lt (Z.abs (Z.opp (oZ1 r))) (Zpos n') *) exists (z1 * z2)%Z; rewrite Hz1; rewrite Hz2; ring. Qed. Theorem ZdividesLessPow : forall (n : Z) (m p : nat), m <= p -> Zdivides (Zpower_nat n p) (Zpower_nat n m). (* Goal: forall (n : Z) (m p : nat) (_ : le m p), Zdivides (Zpower_nat n p) (Zpower_nat n m) *) intros n m p H'; exists (Zpower_nat n (p - m)). (* Goal: @eq Z (Zpower_nat n p) (Z.mul (Zpower_nat n m) (Zpower_nat n (Init.Nat.sub p m))) *) rewrite <- Zpower_nat_is_exp. (* Goal: @eq Z (Zpower_nat n p) (Zpower_nat n (Init.Nat.add m (Init.Nat.sub p m))) *) rewrite <- le_plus_minus; auto. Qed.
(**************************************************************************** IEEE754 : Finduct Laurent Thery ***************************************************************************** Define an induction principle on float*) Require Export FPred. Section finduct. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionNotZero : precision <> 0. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition Fweight (p : float) := (Fnum p + Fexp p * Zpower_nat radix precision)%Z. Theorem FweightLt : forall p q : float, Fcanonic radix b p -> Fcanonic radix b q -> (0 <= p)%R -> (p < q)%R -> (Fweight p < Fweight q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic radix b p) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rlt (FtoRradix p) (FtoRradix q)), Z.lt (Fweight p) (Fweight q) *) intros p q H' H'0 H'1 H'2. (* Goal: Z.lt (Fweight p) (Fweight q) *) cut (Fbounded b p); [ intros Fb1 | apply FcanonicBound with (1 := H') ]; auto. cut (Fbounded b q); [ intros Fb2 | apply FcanonicBound with (1 := H'0) ]; auto. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith; intros Zl1. (* Goal: Z.lt (Fweight p) (Fweight q) *) unfold Fweight in |- *; simpl in |- *. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.mul (Fexp q) (Zpower_nat radix precision))) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) replace (Fexp q) with (Fexp q - Fexp p + Fexp p)%Z; [ idtac | ring ]. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.mul (Z.add (Z.sub (Fexp q) (Fexp p)) (Fexp p)) (Zpower_nat radix precision))) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) rewrite Zmult_plus_distr_l. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Z.mul (Fexp p) (Zpower_nat radix precision)))) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) rewrite Zplus_assoc. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.mul (Fexp p) (Zpower_nat radix precision))) *) repeat rewrite (fun x y z : Z => Zplus_comm x (y * z)). (* Goal: Z.lt (Z.add (Z.mul (Fexp p) (Zpower_nat radix precision)) (Fnum p)) (Z.add (Z.mul (Fexp p) (Zpower_nat radix precision)) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q))) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Zplus_lt_compat_l. (* Goal: Z.lt (Fnum p) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Zlt_le_trans with (Zpower_nat radix precision); auto with zarith. apply Zle_lt_trans with (Zpred (Zpower_nat radix precision)); auto with zarith. (* Goal: Z.le (Fnum p) (Z.pred (Zpower_nat radix precision)) *) (* Goal: Z.le (Zpower_nat radix precision) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Zle_Zabs_inv2; auto with float zarith. (* Goal: Z.le (Z.abs (Fnum p)) (Z.pred (Zpower_nat radix precision)) *) (* Goal: Z.le (Zpower_nat radix precision) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Zle_Zpred; auto with float zarith. (* Goal: Z.lt (Z.abs (Fnum p)) (Zpower_nat radix precision) *) (* Goal: Z.le (Zpower_nat radix precision) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) rewrite <- pGivesBound; auto with float. apply Zle_trans with ((Fexp q - Fexp p) * Zpower_nat radix precision)%Z; auto with zarith. pattern (Zpower_nat radix precision) at 1 in |- *; replace (Zpower_nat radix precision) with (Zsucc 0 * Zpower_nat radix precision)%Z; auto. (* Goal: Z.le (Z.mul (Z.succ Z0) (Zpower_nat radix precision)) (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) *) (* Goal: @eq Z (Z.mul (Z.succ Z0) (Zpower_nat radix precision)) (Zpower_nat radix precision) *) (* Goal: Z.le (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Zle_Zmult_comp_r; auto with zarith. (* Goal: @eq Z (Z.mul (Z.succ Z0) (Zpower_nat radix precision)) (Zpower_nat radix precision) *) (* Goal: Z.le (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) unfold Zsucc in |- *; ring. (* Goal: Z.le (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Z.add (Z.mul (Z.sub (Fexp q) (Fexp p)) (Zpower_nat radix precision)) (Fnum q)) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) cut (0 <= Fnum q)%Z; auto with zarith. (* Goal: Z.le Z0 (Fnum q) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply (LeR0Fnum radix); auto. (* Goal: Rle (IZR Z0) (FtoR radix q) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Rle_trans with (FtoRradix p); auto; apply Rlt_le; auto. (* Goal: Z.lt (Fweight p) (Fweight q) *) elim Zl1; intros H'3 H'4; clear Zl1. (* Goal: Z.lt (Fweight p) (Fweight q) *) unfold Fweight in |- *; simpl in |- *. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.mul (Fexp q) (Zpower_nat radix precision))) *) rewrite <- H'3. (* Goal: Z.lt (Z.add (Fnum p) (Z.mul (Fexp p) (Zpower_nat radix precision))) (Z.add (Fnum q) (Z.mul (Fexp p) (Zpower_nat radix precision))) *) repeat rewrite (fun x y z : Z => Zplus_comm x (y * z)). (* Goal: Z.lt (Z.add (Z.mul (Fexp p) (Zpower_nat radix precision)) (Fnum p)) (Z.add (Z.mul (Fexp p) (Zpower_nat radix precision)) (Fnum q)) *) apply Zplus_lt_compat_l; auto. Qed. Theorem FweightEq : forall p q : float, Fcanonic radix b p -> Fcanonic radix b q -> p = q :>R -> Fweight p = Fweight q. (* Goal: forall (p q : float) (_ : Fcanonic radix b p) (_ : Fcanonic radix b q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq Z (Fweight p) (Fweight q) *) intros p q H' H'0 H'1. rewrite (FcanonicUnique _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith. Qed. Theorem FweightZle : forall p q : float, Fcanonic radix b p -> Fcanonic radix b q -> (0 <= p)%R -> (p <= q)%R -> (Fweight p <= Fweight q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic radix b p) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix q)), Z.le (Fweight p) (Fweight q) *) intros p q H' H'0 H'1 H'2; Casec H'2; intros H'2. (* Goal: Z.le (Fweight p) (Fweight q) *) (* Goal: Z.le (Fweight p) (Fweight q) *) apply Zlt_le_weak. (* Goal: Z.lt (Fweight p) (Fweight q) *) (* Goal: Z.le (Fweight p) (Fweight q) *) apply FweightLt; auto. (* Goal: Z.le (Fweight p) (Fweight q) *) rewrite (FweightEq p q); auto with zarith. Qed. Theorem FinductPosAux : forall (P : float -> Prop) (p : float), (0 <= p)%R -> Fcanonic radix b p -> P p -> (forall q : float, Fcanonic radix b q -> (p <= q)%R -> P q -> P (FSucc b radix precision q)) -> forall x : Z, (0 <= x)%Z -> forall q : float, x = (Fweight q - Fweight p)%Z -> Fcanonic radix b q -> (p <= q)%R -> P q. (* Goal: forall (P : forall _ : float, Prop) (p : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fcanonic radix b p) (_ : P p) (_ : forall (q : float) (_ : Fcanonic radix b q) (_ : Rlt (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)) (_ : P q), P (FPred b radix precision q)) (x : Z) (_ : Z.le Z0 x) (q : float) (_ : @eq Z x (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q *) intros P p H' H'0 H'1 H'2 x H'3; pattern x in |- *. (* Goal: (fun z : Z => forall (q : float) (_ : @eq Z z (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q) x *) apply Z_lt_induction; auto. (* Goal: forall (x : Z) (_ : forall (y : Z) (_ : and (Z.le Z0 y) (Z.lt y x)) (q : float) (_ : @eq Z y (Z.sub (Fweight q) (Fweight p))) (_ : Fcanonic radix b q) (_ : Rle (FtoRradix p) (FtoRradix q)), P q) (q : float) (_ : @eq Z x (Z.sub (Fweight q) (Fweight p))) (_ : Fcanonic radix b q) (_ : Rle (FtoRradix p) (FtoRradix q)), P q *) intros x0 H'4 q H'5 H'6 H'7. (* Goal: P q *) Casec H'7; intros H'7. (* Goal: P q *) (* Goal: P q *) cut (p <= FPred b radix precision q)%R; [ intros Rl1 | idtac ]. (* Goal: P q *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) cut (P (FPred b radix precision q)); [ intros P1 | idtac ]. (* Goal: P q *) (* Goal: P (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) rewrite <- (FSucPred b radix precision) with (x := q); auto with arith. (* Goal: P (FPred b radix precision (FSucc b radix precision q)) *) (* Goal: P (FSucc b radix precision q) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply H'2; auto with float arith. apply H'4 with (y := (Fweight (FPred b radix precision q) - Fweight p)%Z); auto. (* Goal: and (Z.le Z0 (Z.sub (Fweight p) (Fweight (FSucc b radix precision q)))) (Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0) *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) split. (* Goal: Z.le Z0 (Z.sub (Fweight (FPred b radix precision q)) (Fweight p)) *) (* Goal: Z.lt (Z.sub (Fweight (FPred b radix precision q)) (Fweight p)) x0 *) (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) cut (Fweight p <= Fweight (FPred b radix precision q))%Z; auto with zarith. (* Goal: Z.le (Fweight (FSucc b radix precision q)) (Fweight p) *) (* Goal: Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0 *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FweightZle; auto. (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Z.lt (Z.sub (Fweight (FPred b radix precision q)) (Fweight p)) x0 *) (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply FPredCanonic; auto with arith. (* Goal: Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0 *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) rewrite H'5. cut (Fweight (FPred b radix precision q) < Fweight q)%Z; [ auto with zarith | idtac ]. (* Goal: Z.lt (Fweight q) (Fweight (FSucc b radix precision q)) *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FweightLt; auto with float. (* Goal: Rle (IZR Z0) (FtoRradix (FPred b radix precision q)) *) (* Goal: Rlt (FtoRradix (FPred b radix precision q)) (FtoRradix q) *) (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply (R0RltRlePred b radix precision); auto. (* Goal: Rlt (IZR Z0) (FtoR radix q) *) (* Goal: Rlt (FtoRradix (FPred b radix precision q)) (FtoRradix q) *) (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply Rle_lt_trans with (FtoRradix p); auto. (* Goal: Rlt (FtoRradix (FPred b radix precision q)) (FtoRradix q) *) (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply (FPredLt b radix precision); auto. (* Goal: Fcanonic radix b (FPred b radix precision q) *) (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply (FPredCanonic b radix precision); auto with arith. (* Goal: Rle (FtoRradix p) (FtoRradix (FPred b radix precision q)) *) (* Goal: P q *) apply (FPredProp b radix precision); auto with arith. rewrite <- (FcanonicUnique _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith. Qed. Theorem FinductPos : forall (P : float -> Prop) (p : float), (0 <= p)%R -> Fcanonic radix b p -> P p -> (forall q : float, Fcanonic radix b q -> (p <= q)%R -> P q -> P (FSucc b radix precision q)) -> forall q : float, Fcanonic radix b q -> (p <= q)%R -> P q. (* Goal: forall (P : forall _ : float, Prop) (p : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fcanonic radix b p) (_ : P p) (_ : forall (q : float) (_ : Fcanonic radix b q) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : P q), P (FSucc b radix precision q)) (q : float) (_ : Fcanonic radix b q) (_ : Rle (FtoRradix p) (FtoRradix q)), P q *) intros P p H' H'0 H'1 H'2 q H'3 H'4. (* Goal: P q *) apply FinductPosAux with (p := p) (x := (Fweight q - Fweight p)%Z); auto. (* Goal: Z.le Z0 (Z.sub (Fweight q) (Fweight p)) *) cut (Fweight p <= Fweight q)%Z; [ auto with zarith | idtac ]. (* Goal: Z.le (Fweight q) (Fweight p) *) apply FweightZle; auto with float. Qed. Theorem FinductNegAux : forall (P : float -> Prop) (p : float), (0 <= p)%R -> Fcanonic radix b p -> P p -> (forall q : float, Fcanonic radix b q -> (0 < q)%R -> (q <= p)%R -> P q -> P (FPred b radix precision q)) -> forall x : Z, (0 <= x)%Z -> forall q : float, x = (Fweight p - Fweight q)%Z -> Fcanonic radix b q -> (0 <= q)%R -> (q <= p)%R -> P q. (* Goal: forall (P : forall _ : float, Prop) (p : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fcanonic radix b p) (_ : P p) (_ : forall (q : float) (_ : Fcanonic radix b q) (_ : Rlt (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)) (_ : P q), P (FPred b radix precision q)) (x : Z) (_ : Z.le Z0 x) (q : float) (_ : @eq Z x (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q *) intros P p H' H'0 H'1 H'2 x H'3; pattern x in |- *. (* Goal: (fun z : Z => forall (q : float) (_ : @eq Z z (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q) x *) apply Z_lt_induction; auto. (* Goal: forall (x : Z) (_ : forall (y : Z) (_ : and (Z.le Z0 y) (Z.lt y x)) (q : float) (_ : @eq Z y (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q) (q : float) (_ : @eq Z x (Z.sub (Fweight p) (Fweight q))) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q *) intros x0 H'4 q H'5 H'6 H'7 H'8. (* Goal: P q *) Casec H'8; intros H'8. (* Goal: P q *) (* Goal: P q *) cut (FSucc b radix precision q <= p)%R; [ intros Rle1 | idtac ]. (* Goal: P q *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) cut (P (FSucc b radix precision q)); [ intros P1 | idtac ]. (* Goal: P q *) (* Goal: P (FSucc b radix precision q) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) rewrite <- (FPredSuc b radix precision) with (x := q); auto with arith. (* Goal: P (FPred b radix precision (FSucc b radix precision q)) *) (* Goal: P (FSucc b radix precision q) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply H'2; auto with float arith. (* Goal: Rlt (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: P (FSucc b radix precision q) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply Rle_lt_trans with (FtoRradix q); auto. (* Goal: Rlt (FtoRradix q) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply (FSuccLt b radix); auto with arith. apply H'4 with (y := (Fweight p - Fweight (FSucc b radix precision q))%Z); auto. (* Goal: and (Z.le Z0 (Z.sub (Fweight p) (Fweight (FSucc b radix precision q)))) (Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0) *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) split. (* Goal: Z.le Z0 (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) *) (* Goal: Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0 *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) cut (Fweight (FSucc b radix precision q) <= Fweight p)%Z; auto with zarith. (* Goal: Z.le (Fweight (FSucc b radix precision q)) (Fweight p) *) (* Goal: Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0 *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FweightZle; auto. (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FSuccCanonic; auto with arith. (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply Rle_trans with (FtoRradix q); auto; apply Rlt_le. (* Goal: Rlt (FtoRradix q) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply (FSuccLt b radix); auto with arith. (* Goal: Z.lt (Z.sub (Fweight p) (Fweight (FSucc b radix precision q))) x0 *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) rewrite H'5. cut (Fweight q < Fweight (FSucc b radix precision q))%Z; [ auto with zarith | idtac ]. (* Goal: Z.lt (Fweight q) (Fweight (FSucc b radix precision q)) *) (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FweightLt; auto with float. (* Goal: Rlt (FtoRradix q) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply (FSuccLt b radix); auto with arith. (* Goal: Fcanonic radix b (FSucc b radix precision q) *) (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply FSuccCanonic; auto with arith. (* Goal: Rle (IZR Z0) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply Rle_trans with (FtoRradix q); auto; apply Rlt_le. (* Goal: Rlt (FtoRradix q) (FtoRradix (FSucc b radix precision q)) *) (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply (FSuccLt b radix); auto with arith. (* Goal: Rle (FtoRradix (FSucc b radix precision q)) (FtoRradix p) *) (* Goal: P q *) apply (FSuccProp b radix); auto with arith. rewrite <- (FcanonicUnique _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith. Qed. Theorem FinductNeg : forall (P : float -> Prop) (p : float), (0 <= p)%R -> Fcanonic radix b p -> P p -> (forall q : float, Fcanonic radix b q -> (0 < q)%R -> (q <= p)%R -> P q -> P (FPred b radix precision q)) -> forall q : float, Fcanonic radix b q -> (0 <= q)%R -> (q <= p)%R -> P q. (* Goal: forall (P : forall _ : float, Prop) (p : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fcanonic radix b p) (_ : P p) (_ : forall (q : float) (_ : Fcanonic radix b q) (_ : Rlt (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)) (_ : P q), P (FPred b radix precision q)) (q : float) (_ : Fcanonic radix b q) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)), P q *) intros P p H' H'0 H'1 H'2 q H'3 H'4 H'5. (* Goal: P q *) apply FinductNegAux with (p := p) (x := (Fweight p - Fweight q)%Z); auto. (* Goal: Z.le Z0 (Z.sub (Fweight p) (Fweight q)) *) cut (Fweight q <= Fweight p)%Z; [ auto with zarith | idtac ]. (* Goal: Z.le (Fweight q) (Fweight p) *) apply FweightZle; auto with float. Qed. Theorem radixRangeBoundExp : forall p q : float, Fcanonic radix b p -> Fcanonic radix b q -> (0 <= p)%R -> (p < q)%R -> (q < radix * p)%R -> Fexp p = Fexp q \/ Zsucc (Fexp p) = Fexp q. intros p q H' H'0 H'1 H'2 H'3. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith. 2: intros H'4; elim H'4; intros H'5 H'6; clear H'4; auto. intros H'4; right. Casec H'; intros H'. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := q) (q := Float (Fnum p) (Zsucc (Fexp p))); auto with arith. left. case H'; intros H1 H2; red in H1. repeat split; simpl in |- *; auto with float. apply Zle_trans with (Fexp p); auto with float zarith. (* Goal: Rle (IZR Z0) (FtoR radix q) *) (* Goal: Z.lt (Fweight p) (Fweight q) *) apply Rle_trans with (FtoRradix p); auto; apply Rlt_le; auto. unfold FtoR in |- *; simpl in |- *. rewrite powerRZ_Zs; auto with real zarith; auto. rewrite <- Rmult_assoc; rewrite (fun (x : R) (y : Z) => Rmult_comm x y); rewrite Rmult_assoc; auto. simpl in |- *; intros; apply Zle_antisym; auto with zarith. simpl in |- *; auto. intros H'5; elim H'5; intros H'6 H'7; auto. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := q) (q := Float (nNormMin radix precision) (Zsucc (Fexp p))); auto with arith. left; repeat split; simpl in |- *. rewrite Zabs_eq; auto with zarith. apply ZltNormMinVnum; auto with zarith. unfold nNormMin in |- *; auto with zarith. apply Zle_trans with (Fexp p); auto with float zarith. case H'; auto with float. rewrite <- (PosNormMin radix b precision); auto with zarith. apply Rle_trans with (1 := H'1); auto with real. apply Rlt_trans with (1 := H'3). unfold FtoR in |- *; simpl in |- *. rewrite powerRZ_Zs; auto with real zarith; auto. rewrite <- Rmult_assoc; rewrite (fun (x : R) (y : Z) => Rmult_comm x y); rewrite Rmult_assoc; auto. apply Rmult_lt_compat_l; auto with real arith. case H'. intros H'5 H'6; elim H'6; intros H'7 H'8; rewrite H'7; clear H'6. change (p < firstNormalPos radix b precision)%R in |- *. apply (FsubnormalLtFirstNormalPos radix); auto with arith. simpl in |- *; intros; apply Zle_antisym; auto with zarith. intros H'5; elim H'5; intros H'6 H'7; rewrite H'6; clear H'5; auto. Qed. End finduct.
(**************************************************************************** IEEE754 : Zenum Laurent Thery ***************************************************************************** Simple functions to enumerate relative numbers *) Require Export Faux. Require Export Omega. Require Export List. (* Returns the list of relative numbers from z to z+n *) Fixpoint mZlist_aux (p : Z) (n : nat) {struct n} : list Z := match n with | O => p :: nil | S n1 => p :: mZlist_aux (Zsucc p) n1 end. Theorem mZlist_aux_correct : forall (n : nat) (p q : Z), (p <= q)%Z -> (q <= p + Z_of_nat n)%Z -> In q (mZlist_aux p n). (* Goal: forall (n : nat) (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n)) *) intros n; elim n; clear n; auto. (* Goal: forall (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat O))), @In Z q (mZlist_aux p O) *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat n))), @In Z q (mZlist_aux p n)) (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat (S n)))), @In Z q (mZlist_aux p (S n)) *) intros p q; try rewrite <- Zplus_0_r_reverse. (* Goal: forall (_ : Z.le p q) (_ : Z.le q p), @In Z q (mZlist_aux p O) *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat n))), @In Z q (mZlist_aux p n)) (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat (S n)))), @In Z q (mZlist_aux p (S n)) *) intros H' H'0; simpl in |- *; left. (* Goal: @eq Z p q *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat n))), @In Z q (mZlist_aux p n)) (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat (S n)))), @In Z q (mZlist_aux p (S n)) *) apply Zle_antisym; auto. (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat n))), @In Z q (mZlist_aux p n)) (p q : Z) (_ : Z.le p q) (_ : Z.le q (Z.add p (Z.of_nat (S n)))), @In Z q (mZlist_aux p (S n)) *) intros n H' p q H'0 H'1; case (Zle_lt_or_eq _ _ H'0); intros H'2. (* Goal: @In Z q (mZlist_aux p (S n)) *) (* Goal: @In Z q (mZlist_aux p (S n)) *) simpl in |- *; right. (* Goal: @In Z q (mZlist_aux (Z.succ p) n) *) (* Goal: @In Z q (mZlist_aux p (S n)) *) apply H'; auto with zarith. (* Goal: Z.le q (Z.add (Z.succ p) (Z.of_nat n)) *) (* Goal: @In Z q (mZlist_aux p (S n)) *) rewrite Zplus_succ_comm. (* Goal: Z.le q (Z.add p (Z.succ (Z.of_nat n))) *) (* Goal: @In Z q (mZlist_aux p (S n)) *) rewrite <- inj_S; auto. (* Goal: @In Z q (mZlist_aux p (S n)) *) simpl in |- *; auto. Qed. Theorem mZlist_aux_correct_rev1 : forall (n : nat) (p q : Z), In q (mZlist_aux p n) -> (p <= q)%Z. (* Goal: @In Z q (mZlist_aux p (S n)) *) intros n; elim n; clear n; simpl in |- *; auto. (* Goal: forall (p q : Z) (_ : @In Z q (mZlist_aux p O)), Z.le q (Z.add p (Z.of_nat O)) *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n))) (p q : Z) (_ : @In Z q (mZlist_aux p (S n))), Z.le q (Z.add p (Z.of_nat (S n))) *) intros p q H'; elim H'; auto with zarith. (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n))) (p q : Z) (_ : @In Z q (mZlist_aux p (S n))), Z.le q (Z.add p (Z.of_nat (S n))) *) intros n H' p q H'0; elim H'0; auto with zarith. (* Goal: forall _ : @In Z q (mZlist_aux (Z.succ p) n), Z.le p q *) intros H'1; apply Zle_succ_le; auto with zarith. Qed. Theorem mZlist_aux_correct_rev2 : forall (n : nat) (p q : Z), In q (mZlist_aux p n) -> (q <= p + Z_of_nat n)%Z. (* Goal: forall (n : nat) (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n)) *) intros n; elim n; clear n; auto. (* Goal: forall (p q : Z) (_ : @In Z q (mZlist_aux p O)), Z.le q (Z.add p (Z.of_nat O)) *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n))) (p q : Z) (_ : @In Z q (mZlist_aux p (S n))), Z.le q (Z.add p (Z.of_nat (S n))) *) intros p q H'; elim H'; auto with zarith. (* Goal: forall _ : @In Z q (@Datatypes.nil Z), Z.le q (Z.add p (Z.of_nat O)) *) (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n))) (p q : Z) (_ : @In Z q (mZlist_aux p (S n))), Z.le q (Z.add p (Z.of_nat (S n))) *) intros H'0; elim H'0. (* Goal: forall (n : nat) (_ : forall (p q : Z) (_ : @In Z q (mZlist_aux p n)), Z.le q (Z.add p (Z.of_nat n))) (p q : Z) (_ : @In Z q (mZlist_aux p (S n))), Z.le q (Z.add p (Z.of_nat (S n))) *) intros n H' p q H'0; elim H'0; auto with zarith. (* Goal: forall _ : @In Z q (mZlist_aux (Z.succ p) n), Z.le q (Z.add p (Z.of_nat (S n))) *) intros H'1; rewrite inj_S; rewrite <- Zplus_succ_comm; auto. Qed. (* Return the list of of relative numbres from p to p+q if p=<q, otherwise the empty list *) Definition mZlist (p q : Z) : list Z := match (q - p)%Z with | Z0 => p :: nil | Zpos d => mZlist_aux p (nat_of_P d) | Zneg _ => nil (A:=Z) end. Theorem mZlist_correct : forall p q r : Z, (p <= r)%Z -> (r <= q)%Z -> In r (mZlist p q). intros p q r H' H'0; unfold mZlist in |- *; CaseEq (q - p)%Z; (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) auto with zarith. (* Goal: forall _ : @eq Z (Z.sub q p) Z0, @In Z r (@Datatypes.cons Z p (@Datatypes.nil Z)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) intros H'1; rewrite (Zle_antisym r p); auto with datatypes. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) auto with zarith. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) intros p0 H'1; apply mZlist_aux_correct; auto. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) rewrite inject_nat_convert with (1 := H'1); auto with zarith. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) intros p0 H'1; absurd (p <= q)%Z; auto. (* Goal: not (Z.le p q) *) (* Goal: Z.le p q *) apply Zlt_not_le; auto. (* Goal: Z.lt q p *) (* Goal: Z.le p q *) apply Zlt_O_minus_lt; auto. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) replace (p - q)%Z with (- (q - p))%Z; auto with zarith. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) rewrite H'1; simpl in |- *; auto with zarith. (* Goal: @In Z q (mZlist_aux p (S n)) *) unfold Zlt in |- *; simpl in |- *; auto. (* Goal: Z.le p q *) apply Zle_trans with (m := r); auto. Qed. Theorem mZlist_correct_rev1 : forall p q r : Z, In r (mZlist p q) -> (p <= r)%Z. (* Goal: forall (p q r : Z) (_ : @In Z r (mZlist p q)), Z.le r q *) intros p q r; unfold mZlist in |- *; CaseEq (q - p)%Z. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) intros H' H'0; elim H'0; auto with zarith. (* Goal: forall _ : @In Z r (@Datatypes.nil Z), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)) (_ : @In Z r (mZlist_aux p (Pos.to_nat p0))), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros H'1; elim H'1. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)) (_ : @In Z r (mZlist_aux p (Pos.to_nat p0))), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros p0 H' H'0. (* Goal: Z.le p r *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le p r *) apply mZlist_aux_correct_rev1 with (n := nat_of_P p0); auto. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros p0 H' H'0; elim H'0. Qed. Theorem mZlist_correct_rev2 : forall p q r : Z, In r (mZlist p q) -> (r <= q)%Z. (* Goal: forall (p q r : Z) (_ : @In Z r (mZlist p q)), Z.le r q *) intros p q r; unfold mZlist in |- *; CaseEq (q - p)%Z. (* Goal: Z.le r p *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)), @In Z r (mZlist_aux p (Pos.to_nat p0)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)), @In Z r (@Datatypes.nil Z) *) intros H' H'0; elim H'0; auto with zarith. (* Goal: forall _ : @In Z r (@Datatypes.nil Z), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)) (_ : @In Z r (mZlist_aux p (Pos.to_nat p0))), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros H'1; elim H'1. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zpos p0)) (_ : @In Z r (mZlist_aux p (Pos.to_nat p0))), Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros p0 H' H'0. (* Goal: Z.le r q *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) rewrite <- (Zplus_minus p q). (* Goal: Z.le r (Z.add p (Z.sub q p)) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) rewrite <- inject_nat_convert with (1 := H'). (* Goal: Z.le r (Z.add p (Z.of_nat (Pos.to_nat p0))) *) (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) apply mZlist_aux_correct_rev2; auto. (* Goal: forall (p0 : positive) (_ : @eq Z (Z.sub q p) (Zneg p0)) (_ : @In Z r (@Datatypes.nil Z)), Z.le r q *) intros p0 H' H'0; elim H'0. Qed. (* Given two list returns the list of possible product of an element of the first list with an element of the second list *) Fixpoint mProd (A B C : Set) (l1 : list A) (l2 : list B) {struct l2} : list (A * B) := match l2 with | nil => nil | b :: l2' => map (fun a : A => (a, b)) l1 ++ mProd A B C l1 l2' end. Theorem mProd_correct : forall (A B C : Set) (l1 : list A) (l2 : list B) (a : A) (b : B), In a l1 -> In b l2 -> In (a, b) (mProd A B C l1 l2). (* Goal: @In Z q (mZlist_aux p (S n)) *) intros A B C l1 l2; elim l2; simpl in |- *; auto. intros a l H' a0 b H'0 H'1; elim H'1; [ intros H'2; rewrite <- H'2; clear H'1 | intros H'2; clear H'1 ]; auto with datatypes. (* Goal: @In (prod A B) (@pair A B a0 a) (@app (prod A B) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l1) (mProd A B C l1 l)) *) apply in_or_app; left; auto with datatypes. (* Goal: @In (prod A B) (@pair A B a0 a) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l1) *) generalize H'0; elim l1; simpl in |- *; auto with datatypes. intros a1 l0 H'1 H'3; elim H'3; clear H'3; intros H'4; [ rewrite <- H'4 | idtac ]; auto with datatypes. Qed. Theorem mProd_correct_rev1 : forall (A B C : Set) (l1 : list A) (l2 : list B) (a : A) (b : B), In (a, b) (mProd A B C l1 l2) -> In a l1. (* Goal: @In Z q (mZlist_aux p (S n)) *) intros A B C l1 l2; elim l2; simpl in |- *; auto. (* Goal: forall (a : A) (_ : B) (_ : False), @In A a l1 *) (* Goal: forall (a : B) (l : list B) (_ : forall (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l)), @In A a0 l1) (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (@app (prod A B) (@map A (prod A B) (fun a1 : A => @pair A B a1 a) l1) (mProd A B C l1 l))), @In A a0 l1 *) intros a H' H'0; elim H'0. (* Goal: forall (a : B) (l : list B) (_ : forall (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l)), @In B b l) (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (@app (prod A B) (@map A (prod A B) (fun a1 : A => @pair A B a1 a) l1) (mProd A B C l1 l))), or (@eq B a b) (@In B b l) *) intros a l H' a0 b H'0. (* Goal: or (@eq B a b) (@In B b l) *) case (in_app_or _ _ _ H'0); auto with datatypes. (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l1), or (@eq B a b) (@In B b l) *) (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l), or (@eq B a b) (@In B b l) *) elim l1; simpl in |- *; auto with datatypes. intros a1 l0 H'1 H'2; elim H'2; clear H'2; intros H'3; [ inversion H'3 | idtac ]; auto with datatypes. (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l), @In A a0 l1 *) intros H'1; apply H' with (b := b); auto. Qed. Theorem mProd_correct_rev2 : forall (A B C : Set) (l1 : list A) (l2 : list B) (a : A) (b : B), In (a, b) (mProd A B C l1 l2) -> In b l2. (* Goal: @In Z q (mZlist_aux p (S n)) *) intros A B C l1 l2; elim l2; simpl in |- *; auto. (* Goal: forall (a : B) (l : list B) (_ : forall (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l)), @In B b l) (a0 : A) (b : B) (_ : @In (prod A B) (@pair A B a0 b) (@app (prod A B) (@map A (prod A B) (fun a1 : A => @pair A B a1 a) l1) (mProd A B C l1 l))), or (@eq B a b) (@In B b l) *) intros a l H' a0 b H'0. (* Goal: or (@eq B a b) (@In B b l) *) case (in_app_or _ _ _ H'0); auto with datatypes. (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l1), or (@eq B a b) (@In B b l) *) (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l), or (@eq B a b) (@In B b l) *) elim l1; simpl in |- *; auto with datatypes. (* Goal: forall _ : False, or (@eq B a b) (@In B b l) *) (* Goal: forall (a1 : A) (l0 : list A) (_ : forall _ : @In (prod A B) (@pair A B a0 b) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l0), or (@eq B a b) (@In B b l)) (_ : or (@eq (prod A B) (@pair A B a1 a) (@pair A B a0 b)) (@In (prod A B) (@pair A B a0 b) (@map A (prod A B) (fun a0 : A => @pair A B a0 a) l0))), or (@eq B a b) (@In B b l) *) (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l), or (@eq B a b) (@In B b l) *) intros H'1; elim H'1; auto. intros a1 l0 H'1 H'2; elim H'2; clear H'2; intros H'3; [ inversion H'3 | idtac ]; auto with datatypes. (* Goal: forall _ : @In (prod A B) (@pair A B a0 b) (mProd A B C l1 l), or (@eq B a b) (@In B b l) *) intros H'1; right; apply H' with (a := a0); auto. Qed. Theorem in_map_inv : forall (A B : Set) (f : A -> B) (l : list A) (x : A), (forall a b : A, f a = f b -> a = b) -> In (f x) (map f l) -> In x l. (* Goal: @In Z q (mZlist_aux p (S n)) *) intros A B f l; elim l; simpl in |- *; auto. (* Goal: forall (a : A) (l : list A) (_ : forall (x : A) (_ : forall (a0 b : A) (_ : @eq B (f a0) (f b)), @eq A a0 b) (_ : @In B (f x) (@map A B f l)), @In A x l) (x : A) (_ : forall (a0 b : A) (_ : @eq B (f a0) (f b)), @eq A a0 b) (_ : or (@eq B (f a) (f x)) (@In B (f x) (@map A B f l))), or (@eq A a x) (@In A x l) *) intros a l0 H' x H'0 H'1; elim H'1; clear H'1; intros H'2; auto. Qed.
(**************************************************************************** IEEE754 : ClosestPlus Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export FroundPlus. Require Export ClosestProp. Section ClosestP. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem errorBoundedPlusLe : forall p q pq : float, Fbounded b p -> Fbounded b q -> (Fexp p <= Fexp q)%Z -> Closest b radix (p + q) pq -> exists error : float, error = Rabs (p + q - pq) :>R /\ Fbounded b error /\ Fexp error = Zmin (Fexp p) (Fexp q). intros p q pq H' H'0 H'1 H'2. cut (ex (fun m : Z => pq = Float m (Fexp (Fplus radix p q)) :>R)). 2: unfold FtoRradix in |- *; apply RoundedModeRep with (b := b) (precision := precision) (P := Closest b radix); auto. 2: apply ClosestRoundedModeP with (precision := precision); auto. 2: rewrite (Fplus_correct radix); auto with arith. intros H'3; elim H'3; intros m E; clear H'3. exists (Fabs (Fminus radix q (Fminus radix (Float m (Fexp (Fplus radix p q))) p))). cut (forall A B : Prop, A -> (A -> B) -> A /\ B); [ intros tmp; apply tmp; clear tmp | auto ]. unfold FtoRradix in |- *; rewrite Fabs_correct; auto with arith. cut (forall p q : R, p = q -> Rabs p = Rabs q); [ intros tmp; apply tmp; clear tmp | intros p' q' H; rewrite H; auto ]. unfold FtoRradix in |- *; repeat rewrite Fminus_correct; auto with arith. unfold FtoRradix in E; rewrite E; auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) ring. intros H'4. cut (Rabs (pq - (p + q)) <= Rabs (q - (p + q)))%R. 2: elim H'2; auto. replace (q - (p + q))%R with (- FtoRradix p)%R. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) 2: ring. rewrite Rabs_Ropp. unfold FtoRradix in |- *; rewrite <- Fabs_correct; auto with arith. rewrite <- Rabs_Ropp; rewrite Ropp_minus_distr. unfold FtoRradix in H'4; rewrite <- H'4. simpl in |- *. rewrite Zmin_le1; auto. generalize H'1 H'; case p; case q; unfold Fabs, Fminus, Fopp, Fplus in |- *; simpl in |- *; clear H'1 H'. intros Fnum1 Fexp1 Fnum2 Fexp2 H'5 H'6. repeat rewrite Zmin_n_n; auto. repeat rewrite (Zmin_le2 _ _ H'5); auto with zarith. replace (Zabs_nat (Fexp2 - Fexp2)) with 0. rewrite Zpower_nat_O. cut (forall z : Z, (z * 1%nat)%Z = z); [ intros tmp; repeat rewrite tmp; clear tmp | auto with zarith ]. unfold FtoRradix, FtoR in |- *; simpl in |- *. intros H'. repeat split; simpl in |- *. rewrite (fun x => Zabs_eq (Zabs x)); auto with zarith. apply Zle_lt_trans with (Zabs Fnum2); auto. apply le_IZR. apply (Rle_monotony_contra_exp radix) with (z := Fexp2); auto. case H'6; auto. case H'6; auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) intros; simpl in |- *; ring. replace (Fexp2 - Fexp2)%Z with 0%Z; simpl in |- *; auto with zarith. Qed. Theorem errorBoundedPlusAbs : forall p q pq : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) pq -> exists error : float, error = Rabs (p + q - pq) :>R /\ Fbounded b error /\ Fexp error = Zmin (Fexp p) (Fexp q). (* Goal: forall (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) intros p q pq H' H'0 H'1. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rabs (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) case (Zle_or_lt (Fexp p) (Fexp q)); intros H'2. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rabs (Rminus (Rplus (FtoRradix q) (FtoRradix p)) (FtoRradix pq)))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp q) (Fexp p))))) *) apply errorBoundedPlusLe; auto. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rabs (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) replace (p + q)%R with (q + p)%R; [ idtac | ring ]. replace (Zmin (Fexp p) (Fexp q)) with (Zmin (Fexp q) (Fexp p)); [ idtac | apply Zmin_sym ]. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rabs (Rminus (Rplus (FtoRradix q) (FtoRradix p)) (FtoRradix pq)))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp q) (Fexp p))))) *) apply errorBoundedPlusLe; auto. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply (ClosestCompatible b radix (p + q)%R (q + p)%R pq); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) ring. (* Goal: Fbounded b pq *) case H'1; auto. Qed. Theorem errorBoundedPlus : forall p q pq : float, (Fbounded b p) -> (Fbounded b q) -> (Closest b radix (p + q) pq) -> exists error : float, error = (p + q - pq)%R :>R /\ (Fbounded b error) /\ (Fexp error) = (Zmin (Fexp p) (Fexp q)). (* Goal: forall (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) intros p q pq H' H'0 H'1. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) case (errorBoundedPlusAbs p q pq); auto. intros x H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; clear H'4 H'2. (* Goal: @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) generalize H'3; clear H'3. (* Goal: forall _ : @eq R (FtoRradix x) (Rabs (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) unfold Rabs in |- *; case (Rcase_abs (p + q - pq)). (* Goal: forall (_ : Rlt (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Ropp (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) (* Goal: forall (_ : Rge (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) intros H'2 H'3; exists (Fopp x); split; auto. (* Goal: @eq R (FtoRradix (Fopp x)) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) *) (* Goal: and (Fbounded b (Fopp x)) (@eq Z (Fexp (Fopp x)) (Z.min (Fexp p) (Fexp q))) *) (* Goal: forall (_ : Rge (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) unfold FtoRradix in H'3; rewrite H'3; ring. (* Goal: and (Fbounded b (Fopp x)) (@eq Z (Fexp (Fopp x)) (Z.min (Fexp p) (Fexp q))) *) (* Goal: forall (_ : Rge (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) split. (* Goal: Fbounded b (Fopp q) *) (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply oppBounded; auto. (* Goal: @eq Z (Fexp (Fopp x)) (Z.min (Fexp p) (Fexp q)) *) (* Goal: forall (_ : Rge (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) rewrite <- H'6; auto. (* Goal: forall (_ : Rge (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0)) (_ : @eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))), @ex float (fun error : float => and (@eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b error) (@eq Z (Fexp error) (Z.min (Fexp p) (Fexp q))))) *) intros H'2 H'3; exists x; split; auto. Qed. Theorem plusExact1 : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> (Fexp r <= Zmin (Fexp p) (Fexp q))%Z -> r = (p + q)%R :>R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : @eq R (FtoRradix r) (IZR Z0)), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2. cut (2%nat * Rabs (FtoR radix (Fplus radix p q) - FtoR radix r) <= Float 1%nat (Fexp r))%R; [ rewrite Fplus_correct; auto with zarith; intros Rl1 | idtac ]. case errorBoundedPlus with (p := p) (q := q) (pq := r); auto. intros x H'3; elim H'3; intros H'4 H'5; elim H'5; intros H'6 H'7; clear H'5 H'3. unfold FtoRradix in H'4; rewrite <- H'4 in Rl1. 2: apply Rle_trans with (Fulp b radix precision r); auto. 2: apply (ClosestUlp b radix precision); auto. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) 2: rewrite Fplus_correct; auto with zarith. 2: unfold FtoRradix in |- *; apply FulpLe; auto. 2: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. 2: apply ClosestRoundedModeP with (precision := precision); auto. cut (x = 0%R :>R); [ unfold FtoRradix in |- *; intros Eq1 | idtac ]. replace (FtoR radix r) with (FtoR radix r + 0)%R; [ idtac | ring ]. rewrite <- Eq1. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) rewrite H'4; ring. apply (is_Fzero_rep1 radix). case (Z_zerop (Fnum x)); simpl in |- *; auto. intros H'3; Contradict Rl1. apply Rgt_not_le. red in |- *; apply Rle_lt_trans with (Rabs (FtoR radix x)). (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto. rewrite Rabs_mult. apply Rmult_le_compat; auto with real arith. generalize H'3; case (Fnum x); simpl in |- *; auto with real zarith. intros H'5; case H'5; auto. intros p0 H'5; rewrite Rabs_right; auto with real. replace 1%R with (INR 1); unfold IZR; repeat rewrite <- INR_IPR; auto with real arith. intros p0 H'5; rewrite Faux.Rabsolu_left1; auto. unfold IZR; rewrite Ropp_involutive. repeat rewrite <- INR_IPR; simpl; replace 1%R with (INR 1); auto with real arith. unfold IZR; repeat rewrite <- INR_IPR; replace 0%R with (- 0%nat)%R; auto with real. rewrite Rabs_right; auto with real arith. apply Rle_powerRZ; auto with real arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. apply Rle_ge; cut (1 < radix)%Z; auto with float real zarith. cut (forall r : R, (2%nat * r)%R = (r + r)%R); [ intros tmp; rewrite tmp; clear tmp | intros f; simpl in |- *; ring ]. pattern (Rabs (FtoR radix x)) at 1 in |- *; replace (Rabs (FtoR radix x)) with (Rabs (FtoR radix x) + 0)%R; [ idtac | ring ]. apply Rplus_lt_compat_l; auto. case (Rabs_pos (FtoR radix x)); auto. rewrite <- Fabs_correct; auto with arith. intros H'5; Contradict H'3. cut (Fnum (Fabs x) = 0%Z). unfold Fabs in |- *; simpl in |- *; case (Fnum x); simpl in |- *; auto; intros; discriminate. change (is_Fzero (Fabs x)) in |- *. apply (is_Fzero_rep2 radix); auto with arith. Qed. Theorem plusExact1bis : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> r <> (p + q)%R :>R -> (Zmin (Fexp p) (Fexp q) < Fexp r)%Z. intros p0 q0 r0 H' H'0 H'1 H'2; case (Zle_or_lt (Fexp r0) (Zmin (Fexp p0) (Fexp q0))); auto. (* Goal: forall _ : Z.le (Fexp r0) (Z.min (Fexp p0) (Fexp q0)), Z.lt (Z.min (Fexp p0) (Fexp q0)) (Fexp r0) *) intros H'3; Contradict H'2. (* Goal: @eq R (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply plusExact1; auto. Qed. Theorem plusExact2Aux : forall p q r : float, (0 <= p)%R -> Fcanonic radix b p -> Fbounded b q -> Closest b radix (p + q) r -> (Fexp r < Zpred (Fexp p))%Z -> r = (p + q)%R :>R. (* Goal: forall (p q r : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Fcanonic radix b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : Z.lt (Fexp r) (Z.pred (Fexp p))), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2 H'3. (* Goal: @eq R (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply plusExact1; auto. (* Goal: Fbounded b p *) (* Goal: Z.le (Fexp r) (Z.min (Fexp p) (Fexp q)) *) apply FcanonicBound with (1 := H'0); auto. (* Goal: Z.le (Fexp r) (Z.min (Fexp p) (Fexp q)) *) case (Zle_or_lt (Fexp p) (Fexp q)); intros Zl1. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite Zmin_le1; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply Zle_trans with (Zpred (Fexp p)); auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) unfold Zpred in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite Zmin_le2; auto with zarith. (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) case (Zlt_next _ _ Zl1); intros Zl2. (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite Zl2 in H'3. replace (Fexp q) with (Zpred (Zsucc (Fexp q))); auto with zarith; (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) unfold Zpred, Zsucc in |- *; ring. (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) case H'0; clear H'0; intros H'0. (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) absurd (r < Float (nNormMin radix precision) (Zpred (Fexp p)))%R. (* Goal: not (Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rle_not_lt; auto. unfold FtoRradix in |- *; apply (ClosestMonotone b radix (Float (nNormMin radix precision) (Zpred (Fexp p))) ( p + q)%R); auto; auto. cut (Float (nNormMin radix precision) (Fexp p) <= p)%R; [ intros Eq1 | idtac ]. (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) case (Rle_or_lt 0 q); intros Rl1. (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rlt_le_trans with (FtoRradix p). apply Rlt_le_trans with (FtoRradix (Float (nNormMin radix precision) (Fexp p))); auto. (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto. (* Goal: Rlt (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rmult_lt_compat_l; auto with real arith. (* Goal: Rlt (IZR Z0) (IZR (nNormMin radix precision)) *) (* Goal: Rlt (powerRZ (IZR radix) (Z.pred (Fexp p))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) replace 0%R with (IZR 0%nat); auto with real; auto with real float arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply Rlt_IZR; apply nNormPos; auto with zarith. (* Goal: Rlt (powerRZ (IZR radix) (Z.pred (Fexp p))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) unfold Zpred in |- *; auto with real float zarith arith. pattern (FtoRradix p) at 1 in |- *; replace (FtoRradix p) with (p + 0)%R; auto with real. (* Goal: Rlt (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rplus_lt_reg_l with (r := (- q)%R); auto. (* Goal: Rlt (Rplus (Ropp (FtoRradix q)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (Rplus (Ropp (FtoRradix q)) (Rplus (FtoRradix p) (FtoRradix q))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) replace (- q + (p + q))%R with (FtoRradix p); [ idtac | ring ]. apply Rlt_le_trans with (FtoRradix (Float (nNormMin radix precision) (Fexp p))); auto. apply Rlt_le_trans with (2%nat * Float (nNormMin radix precision) (Zpred (Fexp p)))%R; auto. cut (forall r : R, (2%nat * r)%R = (r + r)%R); [ intros tmp; rewrite tmp; clear tmp | intros; simpl in |- *; ring ]. (* Goal: Rlt (Rplus (Ropp (FtoRradix q)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (Rplus (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) *) (* Goal: Rle (Rmult (INR (S (S O))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (FtoRradix (Float (nNormMin radix precision) (Fexp p))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite (Rplus_comm (- q)). (* Goal: Rlt (Rplus (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Ropp (FtoRradix q))) (Rplus (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) *) (* Goal: Rle (Rmult (INR (S (S O))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (FtoRradix (Float (nNormMin radix precision) (Fexp p))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rplus_lt_compat_l. (* Goal: Rlt (Ropp (FtoRradix q)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rle (Rmult (INR (S (S O))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (FtoRradix (Float (nNormMin radix precision) (Fexp p))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- Faux.Rabsolu_left1; auto. (* Goal: Rlt (Rabs (FtoRradix r)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- (Fabs_correct radix); auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) unfold FtoRradix in |- *; apply maxMaxBis with (b := b); auto with zarith. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Rle (Rmult (INR (S (S O))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (FtoRradix (Float (nNormMin radix precision) (Fexp p))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rlt_le; auto. apply Rle_trans with (radix * Float (nNormMin radix precision) (Zpred (Fexp p)))%R. (* Goal: Rle (Rmult (INR (S (S O))) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (Rmult (IZR radix) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) *) (* Goal: Rle (Rmult (IZR radix) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p))))) (FtoRradix (Float (nNormMin radix precision) (Fexp p))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rmult_le_compat_r; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply (LeFnumZERO radix); simpl in |- *; auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply Zlt_le_weak; apply nNormPos; auto with zarith. rewrite INR_IZR_INZ; apply Rle_IZR; simpl in |- *; cut (1 < radix)%Z; auto with real zarith. pattern (Fexp p) at 2 in |- *; replace (Fexp p) with (Zsucc (Zpred (Fexp p))); [ idtac | unfold Zsucc, Zpred in |- *; ring ]. unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: Rle (Rmult (IZR radix) (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Z.pred (Fexp p))))) (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Z.succ (Z.pred (Fexp p))))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite powerRZ_Zs; auto with real zarith. (* Goal: Rle (Rmult (IZR radix) (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Z.pred (Fexp p))))) (Rmult (IZR (nNormMin radix precision)) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred (Fexp p))))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) repeat rewrite <- Rmult_assoc. (* Goal: Rle (Rmult (Rmult (IZR radix) (IZR (nNormMin radix precision))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (Rmult (IZR (nNormMin radix precision)) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) *) (* Goal: Rle (FtoRradix (Float (nNormMin radix precision) (Fexp p))) (FtoRradix p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite (Rmult_comm radix); auto with real. (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto. (* Goal: Rle (Rmult (IZR (nNormMin radix precision)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rmult_le_compat_r; auto with real zarith. (* Goal: Rle (IZR (nNormMin radix precision)) (IZR (Fnum p)) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rle_IZR. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite <- (Zabs_eq (Fnum p)); auto with zarith. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum p)) *) (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply pNormal_absolu_min with (b := b); auto with arith. (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto. (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply (LeR0Fnum radix); auto with arith. (* Goal: Closest b radix (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply (RoundedModeProjectorIdem b radix (Closest b radix)); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply ClosestRoundedModeP with (precision := precision); auto. repeat split; simpl in |- *. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (nNormMin radix precision) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp p)) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply ZltNormMinVnum; auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply Zlt_le_weak; apply nNormPos; auto with zarith. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.pred (Fexp p)) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Zle_trans with (Fexp q); auto with float zarith. (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) case (Rle_or_lt 0 r); intros Rl1. (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- (Rabs_right r); auto with real. (* Goal: Rlt (Rabs (FtoRradix r)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- (Fabs_correct radix); auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) unfold FtoRradix in |- *; apply maxMaxBis with (b := b); auto with zarith. apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply ClosestRoundedModeP with (precision := precision); auto with real. (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply Rlt_le_trans with 0%R; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) apply (LeFnumZERO radix); simpl in |- *; auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply Zlt_le_weak; apply nNormPos; auto with zarith. (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) absurd (- dExp b <= Fexp q)%Z; auto with float. (* Goal: not (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp q)) *) apply Zlt_not_le. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) case H'0; intros Z1 (Z2, Z3); rewrite <- Z2; auto with zarith. Qed. Theorem plusExact2 : forall p q r : float, Fcanonic radix b p -> Fbounded b q -> Closest b radix (p + q) r -> (Fexp r < Zpred (Fexp p))%Z -> r = (p + q)%R :>R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : @eq R (FtoRradix r) (IZR Z0)), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2. (* Goal: @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) case (Rle_or_lt 0 p); intros Rl1. (* Goal: @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) apply plusExact2Aux; auto. (* Goal: @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) replace (p + q)%R with (- (Fopp p + Fopp q))%R. (* Goal: @eq R (FtoRradix r) (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) rewrite <- (plusExact2Aux (Fopp p) (Fopp q) (Fopp r)); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) unfold FtoRradix in |- *; rewrite Fopp_correct; ring. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: Fcanonic radix b (Fopp p) *) (* Goal: Fbounded b (Fopp q) *) (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (IZR Z0) (Ropp (FtoR radix p)) *) (* Goal: Fcanonic radix b (Fopp p) *) (* Goal: Fbounded b (Fopp q) *) (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply Rlt_le; replace 0%R with (-0)%R; auto with real. (* Goal: Fcanonic radix b (Fopp p) *) (* Goal: Fbounded b (Fopp q) *) (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply FcanonicFopp; auto with arith. (* Goal: Fbounded b (Fopp q) *) (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply oppBounded; auto. (* Goal: Closest b radix (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) replace (Fopp p + Fopp q)%R with (- (p + q))%R. (* Goal: Closest b radix (Ropp (Rplus (FtoRradix p) (FtoRradix q))) (Fopp r) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix p) (FtoRradix q))) (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix (Fopp p)) (FtoRradix (Fopp q)))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply ClosestOpp; auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct; ring. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct; ring. Qed. Theorem plusExactR0 : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> r = 0%R :>R -> r = (p + q)%R :>R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : @eq R (FtoRradix r) (IZR Z0)), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2. cut (r = FtoRradix (Fzero (- dExp b)) :>R); [ intros Eq1; rewrite Eq1 | rewrite H'2; apply sym_eq; unfold FtoRradix in |- *; apply FzeroisZero ]. (* Goal: @eq R (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (Rplus (FtoRradix p) (FtoRradix q)) *) apply plusExact1; auto. (* Goal: Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Z.le (Fexp (Fzero (Z.opp (Z.of_N (dExp b))))) (Z.min (Fexp p) (Fexp q)) *) apply (ClosestCompatible b radix (p + q)%R (p + q)%R r); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Z.le (Fexp (Fzero (Z.opp (Z.of_N (dExp b))))) (Z.min (Fexp p) (Fexp q)) *) apply FboundedFzero; auto. (* Goal: Z.le (Fexp (Fzero (Z.opp (Z.of_N (dExp b))))) (Z.min (Fexp p) (Fexp q)) *) simpl in |- *; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.min (Fexp p) (Fexp q)) *) unfold Zmin in |- *; case (Fexp p ?= Fexp q)%Z; auto with float. Qed. Theorem plusErrorBound1 : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> ~ is_Fzero r -> (Rabs (r - (p + q)) < Rabs r * / 2%nat * (radix * / pPred (vNum b)))%R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : @eq R (FtoRradix r) (IZR Z0)), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2. cut (Fcanonic radix b (Fnormalize radix b precision r)); [ intros tmp; Casec tmp; intros Fs | idtac ]. 3: apply FnormalizeCanonic; auto with arith. 3: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) 3: apply ClosestRoundedModeP with (precision := precision); auto. 2: rewrite <- (plusExact1 p q (Fnormalize radix b precision r)); auto. 2: unfold FtoRradix in |- *; rewrite FnormalizeCorrect; auto with arith. 2: replace (FtoR radix r - FtoR radix r)%R with 0%R; [ idtac | ring ]. 2: rewrite Rabs_R0. 2: replace 0%R with (0 * (radix * / pPred (vNum b)))%R; [ apply Rmult_lt_compat_r | ring ]. 2: replace 0%R with (0 * / pPred (vNum b))%R; [ apply Rmult_lt_compat_r | ring ]. 2: apply Rinv_0_lt_compat; replace 0%R with (IZR 0); auto with real zarith. 2: apply Rlt_IZR; unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *. 2: apply vNumbMoreThanOne with (radix := radix) (precision := precision); auto with real zarith. 2: cut (1 < radix)%Z; auto with real zarith. 2: replace 0%R with (0 * / 2%nat)%R; [ apply Rmult_lt_compat_r | ring ]; auto with real. 2: case (Rabs_pos (FtoR radix r)); auto. (* Goal: forall _ : Z.le (Fexp r0) (Z.min (Fexp p0) (Fexp q0)), Z.lt (Z.min (Fexp p0) (Fexp q0)) (Fexp r0) *) 2: intros H'3; Contradict H'2. 2: apply is_Fzero_rep2 with (radix := radix); auto with real arith. 2: generalize H'3; fold FtoRradix in |- *; unfold Rabs in |- *; case (Rcase_abs r); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) 2: intros r0 H'2; replace 0%R with (-0)%R; [ rewrite H'2 | idtac ]; ring. (* Goal: Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Z.le (Fexp (Fzero (Z.opp (Z.of_N (dExp b))))) (Z.min (Fexp p) (Fexp q)) *) 2: apply (ClosestCompatible b radix (p + q)%R (p + q)%R r); auto. 2: apply sym_eq; apply FnormalizeCorrect; auto. 2: apply FnormalizeBounded; auto with arith. 2: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. 2: apply ClosestRoundedModeP with (precision := precision); auto. 2: replace (Fexp (Fnormalize radix b precision r)) with (- dExp b)%Z. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.min (Fexp p) (Fexp q)) *) 2: unfold Zmin in |- *; case (Fexp p ?= Fexp q)%Z; auto with float. 2: apply sym_equal; case Fs; intros H1 H2; case H2; auto. apply Rle_lt_trans with (/ 2%nat * Fulp b radix precision r)%R. apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real; rewrite Rmult_1_l. unfold FtoRradix in |- *; rewrite <- Rabs_Ropp; rewrite Ropp_minus_distr; (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite <- (Fplus_correct radix); auto with zarith. apply ClosestUlp; auto. rewrite Fplus_correct; auto with arith. replace (Rabs r * / 2%nat * (radix * / pPred (vNum b)))%R with (/ 2%nat * (Rabs r * (radix * / pPred (vNum b))))%R; [ apply Rmult_lt_compat_l; auto with real | ring ]. replace (Fulp b radix precision r) with (Float (pPred (vNum b)) (Zpred (Fexp (Fnormalize radix b precision r))) * (radix * / pPred (vNum b)))%R. apply Rmult_lt_compat_r. replace 0%R with (radix * 0)%R; [ apply Rmult_lt_compat_l | ring ]; auto with real arith. apply Rinv_0_lt_compat; replace 0%R with (IZR 0%nat); auto with real arith; apply Rlt_IZR. unfold pPred in |- *; apply Zlt_succ_pred; apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. unfold FtoRradix in |- *; rewrite <- (FnormalizeCorrect _ radixMoreThanOne b precision r). (* Goal: Rlt (Rabs (FtoRradix r)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- (Fabs_correct radix); auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply FnormalBoundAbs; auto with zarith. unfold Fulp, FtoRradix, FtoR in |- *; simpl in |- *. apply trans_eq with (pPred (vNum b) * / pPred (vNum b) * (radix * powerRZ radix (Zpred (Fexp (Fnormalize radix b precision r)))))%R; [ ring | idtac ]; auto. rewrite Rinv_r; auto with real arith. rewrite <- powerRZ_Zs; auto with real. cut (forall r : Z, Zsucc (Zpred r) = r); [ intros Er; rewrite Er | intros r'; unfold Zsucc, Zpred in |- * ]; (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) ring. apply Rlt_dichotomy_converse; right; red in |- *. replace 0%R with (IZR 0); cut (1 < radix)%Z; auto with real zarith. apply Rlt_dichotomy_converse; right; red in |- *. replace 0%R with (IZR 0); auto with real zarith. unfold pPred in |- *; apply Rlt_IZR; apply Zlt_succ_pred; simpl in |- *. apply vNumbMoreThanOne with (radix := radix) (precision := precision); auto with real arith. Qed. Theorem plusErrorBound1bis : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> ~ is_Fzero r -> (Rabs (r - (p + q)) <= Rabs r * / 2%nat * (radix * / Zpos (vNum b)))%R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : @eq R (FtoRradix r) (IZR Z0)), @eq R (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)) *) intros p q r H' H'0 H'1 H'2. cut (Fcanonic radix b (Fnormalize radix b precision r)); [ intros tmp; Casec tmp; intros Fs | idtac ]. 3: apply FnormalizeCanonic; auto with arith. 3: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b (Float (nNormMin radix precision) (Z.pred (Fexp p))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) 3: apply ClosestRoundedModeP with (precision := precision); auto. 2: rewrite <- (plusExact1 p q (Fnormalize radix b precision r)); auto. 2: unfold FtoRradix in |- *; rewrite FnormalizeCorrect; auto. 2: replace (FtoR radix r - FtoR radix r)%R with 0%R; [ idtac | ring ]. 2: rewrite Rabs_R0. 2: replace 0%R with (0 * (radix * / Zpos (vNum b)))%R; [ apply Rmult_le_compat_r | ring ]; auto with real zarith. 2: replace 0%R with (0 * / Zpos (vNum b))%R; [ apply Rmult_le_compat_r | ring ]; auto with real zarith. 2: replace 0%R with (0 * / 2%nat)%R; [ apply Rmult_le_compat_r | ring ]; auto with real zarith. (* Goal: Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Z.le (Fexp (Fzero (Z.opp (Z.of_N (dExp b))))) (Z.min (Fexp p) (Fexp q)) *) 2: apply (ClosestCompatible b radix (p + q)%R (p + q)%R r); auto. 2: apply sym_eq; apply FnormalizeCorrect; auto. 2: apply FnormalizeBounded; auto with arith. 2: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. 2: apply ClosestRoundedModeP with (precision := precision); auto. 2: replace (Fexp (Fnormalize radix b precision r)) with (- dExp b)%Z. 2: unfold Zmin in |- *; case (Fexp p ?= Fexp q)%Z; intuition. 2: case Fs; intros H1 (H2, H3); auto. apply Rle_trans with (/ 2%nat * Fulp b radix precision r)%R. replace (Rabs (FtoRradix r - (FtoRradix p + FtoRradix q))) with (/ 2%nat * (2%nat * Rabs (FtoRradix r - (FtoRradix p + FtoRradix q))))%R; [ idtac | rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real ]. apply Rmult_le_compat_l; auto with real. replace (FtoRradix r - (FtoRradix p + FtoRradix q))%R with (- (FtoRradix p + FtoRradix q - FtoRradix r))%R; [ rewrite Rabs_Ropp | ring ]. apply (ClosestUlp b radix); auto. replace (Rabs r * / 2%nat * (radix * / Zpos (vNum b)))%R with (/ 2%nat * (Rabs r * (radix * / Zpos (vNum b))))%R; [ apply Rmult_le_compat_l; auto with real | ring ]. replace (Fulp b radix precision r) with (Zpos (vNum b) * FtoR radix (Float 1%nat (Zpred (Fexp (Fnormalize radix b precision r)))) * (radix * / Zpos (vNum b)))%R. apply Rmult_le_compat_r. replace 0%R with (radix * 0)%R; [ apply Rmult_le_compat_l | ring ]; apply Rlt_le; auto with real arith; rewrite INR_IZR_INZ; apply Rlt_IZR; simpl in |- *; apply Zlt_1_O; apply Zlt_le_weak; apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. unfold FtoRradix in |- *; rewrite <- (FnormalizeCorrect _ radixMoreThanOne b precision r). (* Goal: Rlt (Rabs (FtoRradix r)) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Rlt (FtoRradix r) (FtoRradix (Float (nNormMin radix precision) (Z.pred (Fexp p)))) *) (* Goal: Z.le (Z.add (Fexp p) (Zneg xH)) (Fexp q) *) rewrite <- (Fabs_correct radix); auto with arith. apply FnormalBoundAbs2 with precision; auto with arith. unfold Fulp, FtoRradix, FtoR in |- *; simpl in |- *. apply trans_eq with (nat_of_P (vNum b) * / nat_of_P (vNum b) * (radix * powerRZ radix (Zpred (Fexp (Fnormalize radix b precision r)))))%R; [ unfold IZR at 1 5; repeat rewrite <- INR_IPR; ring | idtac]. rewrite Rinv_r; auto with real arith. rewrite <- powerRZ_Zs; auto with real zarith. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) rewrite <- Zsucc_pred; ring. Qed. Theorem plusErrorBound1withZero : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> (Rabs (r - (p + q)) <= Rabs r * / 2%nat * (radix * / pPred (vNum b)))%R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r), Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) intros p q r H H0 H1. (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) case (Req_dec r 0); intros Hr. (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) replace (Rabs (r - (p + q))) with (Rabs r * / 2%nat * 0)%R. (* Goal: Rle (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) apply Rmult_le_compat_l. replace 0%R with (Rabs r * 0)%R; [ apply Rmult_le_compat_l | ring ]; auto with real arith. replace 0%R with (radix * 0)%R; [ apply Rmult_le_compat_l | ring ]; auto with real arith. (* Goal: Rle (IZR Z0) (Rinv (IZR (pPred (vNum b)))) *) (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) apply Rlt_le; apply Rinv_0_lt_compat; auto with real arith. (* Goal: Rlt (IZR Z0) (IZR (pPred (vNum b))) *) (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) replace 0%R with (IZR 0%nat); auto with real zarith; apply Rlt_IZR. (* Goal: Z.lt radix (pPred (vNum b)) *) apply Zle_lt_trans with (nNormMin radix precision). (* Goal: Z.le (Z.of_nat O) (nNormMin radix precision) *) (* Goal: Z.lt (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) apply Zlt_le_weak; apply nNormPos; auto with real zarith. (* Goal: Z.lt (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) apply nNormMimLtvNum; auto with real zarith. (* Goal: @eq R (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (IZR Z0)) (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) rewrite <- plusExactR0 with (3 := H1); auto with real zarith. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) rewrite Hr; repeat rewrite Rabs_R0 || (rewrite Rminus_diag_eq; auto); ring. (* Goal: Rle (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (Rabs (FtoRradix r)) (Rinv (INR (S (S O))))) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b)))))) *) apply Rlt_le; apply plusErrorBound1; auto. (* Goal: not (is_Fzero r) *) Contradict Hr; unfold FtoRradix in |- *; apply is_Fzero_rep1; auto. Qed. Theorem pPredMoreThanOne : (0 < pPred (vNum b))%Z. unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *. apply (vNumbMoreThanOne radix) with (precision := precision); (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. Qed. Theorem pPredMoreThanRadix : (radix < pPred (vNum b))%Z. (* Goal: Z.lt radix (pPred (vNum b)) *) apply Zle_lt_trans with (nNormMin radix precision). pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix); (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) unfold nNormMin in |- *; auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply nNormMimLtvNum; auto with zarith. Qed. Theorem RoundBound : forall x y p : float, Fbounded b x -> Fbounded b y -> Fbounded b p -> Closest b radix (x + y) p -> (radix < 2%nat * pPred (vNum b))%Z -> (Rabs p <= Rabs (x + y) * (2%nat * pPred (vNum b) * / (2%nat * pPred (vNum b) - radix)))%R. intros x y p H H0 H1 H2 H3. cut (0 < 2%nat * pPred (vNum b))%Z; [ intros NZ1 | apply Zlt_trans with radix; auto with zarith ]. cut (0 < 2%nat * pPred (vNum b))%R; [ intros NZ1' | rewrite INR_IZR_INZ; rewrite <- Rmult_IZR; auto with real zarith ]. cut (radix < 2%nat * pPred (vNum b))%R; [ intros NZ2 | rewrite INR_IZR_INZ; rewrite <- Rmult_IZR; auto with real zarith ]. replace (Rabs p) with (Rabs p * ((2%nat * pPred (vNum b) - radix) * / (2%nat * pPred (vNum b))) * (2%nat * pPred (vNum b) * / (2%nat * pPred (vNum b) - radix)))%R. 2: replace (Rabs p * ((2%nat * pPred (vNum b) - radix) * / (2%nat * pPred (vNum b))) * (2%nat * pPred (vNum b) * / (2%nat * pPred (vNum b) - radix)))%R with (Rabs p * ((2%nat * pPred (vNum b) - radix) * / (2%nat * pPred (vNum b) - radix)) * (2%nat * pPred (vNum b) * / (2%nat * pPred (vNum b))))%R; [ idtac | ring ]. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) 2: repeat rewrite Rinv_r; auto with real zarith; try ring. apply Rmult_le_compat_r. replace 0%R with (2%nat * pPred (vNum b) * 0)%R; [ apply Rmult_le_compat_l | ring ]; auto with real zarith. replace ((2%nat * pPred (vNum b) - radix) * / (2%nat * pPred (vNum b)))%R with (1 - radix * / (2%nat * pPred (vNum b)))%R. 2: unfold Rminus in |- *; rewrite Rmult_plus_distr_r; rewrite Rinv_r; auto with real. replace (Rabs p * (1 - radix * / (2%nat * pPred (vNum b))))%R with (Rabs p - Rabs p * (radix * / (2%nat * pPred (vNum b))))%R; [ idtac | ring; ring ]. apply Rplus_le_reg_l with (Rabs p * (radix * / (2%nat * pPred (vNum b))))%R. replace (Rabs (FtoRradix p) * (radix * / (2%nat * pPred (vNum b))) + (Rabs (FtoRradix p) - Rabs (FtoRradix p) * (radix * / (2%nat * pPred (vNum b)))))%R with (Rabs p); [ idtac | ring ]. apply Rle_trans with (Rabs (p - (x + y)) + Rabs (x + y))%R. pattern (FtoRradix p) at 1 in |- *; replace (FtoRradix p) with (p - (x + y) + (x + y))%R; [ apply Rabs_triang | ring ]. rewrite (Rplus_comm (Rabs (p - (x + y))) (Rabs (x + y))); rewrite (Rplus_comm (Rabs p * (radix * / (2%nat * pPred (vNum b)))) (Rabs (x + y))) ; apply Rplus_le_compat_l. replace (Rabs p * (radix * / (2%nat * pPred (vNum b))))%R with (Rabs p * / 2%nat * (radix * / pPred (vNum b)))%R; [ apply plusErrorBound1withZero | idtac ]; auto. rewrite (Rinv_mult_distr 2%nat (pPred (vNum b))); auto with real zarith. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (Rplus (FtoRradix q) (FtoRradix p)) *) (* Goal: Fbounded b pq *) ring. apply NEq_IZRO; auto with real zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) generalize pPredMoreThanOne; auto with zarith. Qed. Theorem plusExactExp : forall p q pq : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) pq -> ex (fun r : float => ex (fun s : float => Fbounded b r /\ Fbounded b s /\ s = pq :>R /\ r = (p + q - s)%R :>R /\ Fexp r = Zmin (Fexp p) (Fexp q) :>Z /\ (Fexp r <= Fexp s)%Z /\ (Fexp s <= Zsucc (Zmax (Fexp p) (Fexp q)))%Z)). (* Goal: forall (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) intros p q pq H H0 H1. case (plusExpBound b radix precision) with (P := Closest b radix) (5 := H1); (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) apply (ClosestRoundedModeP b radix precision); auto with zarith. (* Goal: forall (x : float) (_ : and (Fbounded b x) (and (@eq R (FtoR radix x) (FtoR radix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp x)) (Z.le (Fexp x) (Z.succ (Zmax (Fexp p) (Fexp q))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) intros r (H2, (H3, (H4, H5))); fold FtoRradix in H3. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) case (Req_dec (p + q - pq) 0); intros Hr. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) cut (Fbounded b (Fzero (Zmin (Fexp p) (Fexp q)))); [ intros Fbs | idtac ]. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) (* Goal: Fbounded b (Fzero (Z.min (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) exists (Fzero (Zmin (Fexp p) (Fexp q))); exists r; repeat (split; auto). (* Goal: @eq R (FtoRradix (Fzero (Z.min (Fexp p) (Fexp q)))) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix r)) *) (* Goal: Fbounded b (Fzero (Z.min (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) rewrite (FzeroisReallyZero radix); rewrite <- Hr; rewrite <- H3; auto. case (Zmin_or (Fexp p) (Fexp q)); intros Hz; rewrite Hz; apply FboundedZeroSameExp; auto. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) case (errorBoundedPlus p q pq); auto. (* Goal: forall (x : float) (_ : and (@eq R (FtoRradix x) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b x) (@eq Z (Fexp x) (Z.min (Fexp p) (Fexp q))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) intros error (H6, (H7, H8)). (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp p) (Fexp q))) (and (Z.le (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp p) (Fexp q))))))))))) *) exists error; exists r; repeat (split; auto). (* Goal: @eq R (FtoRradix error) (Rminus (Rplus (FtoRradix p) (FtoRradix q)) (FtoRradix r)) *) (* Goal: Z.le (Fexp error) (Fexp r) *) rewrite H3; auto. (* Goal: Z.le (Fexp error) (Fexp r) *) rewrite H8; auto. Qed. Theorem plusExactExpCanonic : forall c d p q : float, Fbounded b c -> Fbounded b d -> Fbounded b p -> Fbounded b q -> Closest b radix (c + d) p -> q = (c + d - p)%R :>R -> q <> 0%R :>R -> ex (fun r : float => ex (fun s : float => Fcanonic radix b s /\ Fbounded b r /\ s = p :>R /\ r = (c + d - s)%R :>R /\ Fexp r = Zmin (Fexp c) (Fexp d) :>Z /\ (Fexp r < Fexp s)%Z /\ (Fexp s <= Zsucc (Zmax (Fexp c) (Fexp d)))%Z)). (* Goal: forall (c d p q : float) (_ : Fbounded b c) (_ : Fbounded b d) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix c) (FtoRradix d)) p) (_ : @eq R (FtoRradix q) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix p))) (_ : not (@eq R (FtoRradix q) (IZR Z0))), @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b s) (and (Fbounded b r) (and (@eq R (FtoRradix s) (FtoRradix p)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp c) (Fexp d))) (and (Z.lt (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp c) (Fexp d))))))))))) *) intros c d p q H H0 H1 H2 H3 H4 H5. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b s) (and (Fbounded b r) (and (@eq R (FtoRradix s) (FtoRradix p)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp c) (Fexp d))) (and (Z.lt (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp c) (Fexp d))))))))))) *) case (plusExactExp c d p); auto. (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix p)) (and (@eq R (FtoRradix x) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix s))) (and (@eq Z (Fexp x) (Z.min (Fexp c) (Fexp d))) (and (Z.le (Fexp x) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp c) (Fexp d))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b s) (and (Fbounded b r) (and (@eq R (FtoRradix s) (FtoRradix p)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp c) (Fexp d))) (and (Z.lt (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp c) (Fexp d))))))))))) *) intros r (s, (H6, (H7, (H8, (H9, (H10, (H11, H12))))))). (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b s) (and (Fbounded b r) (and (@eq R (FtoRradix s) (FtoRradix p)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix s))) (and (@eq Z (Fexp r) (Z.min (Fexp c) (Fexp d))) (and (Z.lt (Fexp r) (Fexp s)) (Z.le (Fexp s) (Z.succ (Zmax (Fexp c) (Fexp d))))))))))) *) exists r; exists (Fnormalize radix b precision s). (* Goal: and (Fcanonic radix b (Fnormalize radix b precision s)) (and (Fbounded b r) (and (@eq R (FtoRradix (Fnormalize radix b precision s)) (FtoRradix p)) (and (@eq R (FtoRradix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoRradix (Fnormalize radix b precision s)))) (and (@eq Z (Fexp r) (Z.min (Fexp c) (Fexp d))) (and (Z.lt (Fexp r) (Fexp (Fnormalize radix b precision s))) (Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))))))))) *) repeat (split; auto with float). (* Goal: Fcanonic radix b (Fnormalize radix b precision s) *) apply FnormalizeCanonic; auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite <- H8; apply (FnormalizeCorrect radix); auto with zarith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite (FnormalizeCorrect radix); auto with zarith. apply ClosestErrorExpStrict with (radix := radix) (b := b) (precision := precision) (x := (c + d)%R); auto with float. (* Goal: Fbounded b (Fnormalize radix b precision s) *) (* Goal: @eq R (FtoR radix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoR radix (Fnormalize radix b precision s))) *) (* Goal: not (@eq R (FtoR radix r) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))) *) apply FnormalizeBounded; auto with arith. (* Goal: Closest b radix (Rplus (FtoRradix c) (FtoRradix d)) (Fnormalize radix b precision s) *) (* Goal: @eq R (FtoR radix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoR radix (Fnormalize radix b precision s))) *) (* Goal: not (@eq R (FtoR radix r) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))) *) apply (ClosestCompatible b radix (c + d)%R (c + d)%R p); auto. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite (FnormalizeCorrect radix); auto with zarith. (* Goal: Fbounded b (Fnormalize radix b precision s) *) (* Goal: @eq R (FtoR radix r) (Rminus (Rplus (FtoRradix c) (FtoRradix d)) (FtoR radix (Fnormalize radix b precision s))) *) (* Goal: not (@eq R (FtoR radix r) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))) *) apply FnormalizeBounded; auto with arith. (* Goal: Z.le (Fexp q) (Fexp p) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) rewrite (FnormalizeCorrect radix); auto with zarith. (* Goal: not (@eq R (FtoR radix r) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))) *) fold FtoRradix in |- *; rewrite H9; rewrite H8; rewrite <- H4; auto. (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Z.succ (Zmax (Fexp c) (Fexp d))) *) apply Zle_trans with (Fexp s); auto. (* Goal: Z.le (Fexp (Fnormalize radix b precision s)) (Fexp s) *) apply FcanonicLeastExp with radix b precision; auto with arith. (* Goal: @eq R (FtoR radix s) (FtoR radix (Fnormalize radix b precision s)) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision s) *) apply sym_eq; apply FnormalizeCorrect; auto with real. (* Goal: Fcanonic radix b (Fnormalize radix b precision s) *) apply FnormalizeCanonic; auto with arith. Qed. End ClosestP.
(**************************************************************************** IEEE754 : FroundMult Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export FroundProp. Section FRoundP. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem errorBoundedMultMin : forall p q fmin : float, Fbounded b p -> Fbounded b q -> (0 <= p)%R -> (0 <= q)%R -> (- dExp b <= Fexp p + Fexp q)%Z -> isMin b radix (p * q) fmin -> exists r : float, r = (p * q - fmin)%R :>R /\ Fbounded b r /\ Fexp r = (Fexp p + Fexp q)%Z. intros p q fmin Fp Fq H' H'0 H'1 H'2. cut (0 <= Fnum p * Fnum q)%Z; [ intros multPos | apply Zle_mult_gen; apply (LeR0Fnum radix); auto with arith ]. cut (ex (fun m : Z => FtoRradix fmin = Float m (Fexp (Fmult p q)))). 2: unfold FtoRradix in |- *; apply RoundedModeRep with (b := b) (precision := precision) (P := isMin b radix); auto. 2: apply MinRoundedModeP with (precision := precision); auto. 2: rewrite (Fmult_correct radix); auto with zarith. intros H'3; elim H'3; intros m E; clear H'3. exists (Fminus radix (Fmult p q) (Float m (Fexp (Fmult p q)))). split. rewrite E; unfold FtoRradix in |- *; repeat rewrite Fminus_correct; repeat rewrite Fmult_correct; auto with zarith. split. cut (fmin <= Fmult p q)%R; [ idtac | unfold FtoRradix in |- *; rewrite Fmult_correct; auto; case H'2; auto with real zarith; (intros H1 H2; case H2; auto with zarith) ]. rewrite E; unfold Fmult, Fminus, Fopp, Fplus in |- *; simpl in |- *; auto. repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; auto. simpl in |- *; repeat rewrite Zpower_nat_O; repeat rewrite Zmult_1_r. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. intros H'3; (cut (m <= Fnum p * Fnum q)%Z; [ idtac | apply le_IZR; apply Rmult_le_reg_l with (r := powerRZ radix (Fexp p + Fexp q)); auto with real zarith; repeat rewrite (Rmult_comm (powerRZ radix (Fexp p + Fexp q))); auto with zarith ]); intros H'4. repeat split; simpl in |- *; auto. case (ZquotientProp (Fnum p * Fnum q) (Zpower_nat radix precision)); auto with zarith. intros x (H'5, (H'6, H'7)). cut (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * powerRZ radix (precision + (Fexp p + Fexp q)) <= fmin)%R; [ rewrite E; intros H'8 | idtac ]. cut (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * powerRZ radix precision <= m)%R; [ intros H'9 | idtac ]. rewrite Zabs_eq; auto with zarith. apply Zle_lt_trans with x; auto. replace x with (Fnum p * Fnum q + - (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * Zpower_nat radix precision))%Z. apply Zplus_le_compat_l; auto. apply Zle_Zopp. (* Goal: Z.le (Z.add (Fexp p) (Fexp q)) (Fexp x0) *) apply le_IZR; auto. (* Goal: Rlt (Rmult (IZR (Z.mul (Z.abs ny) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision))))))) (powerRZ (IZR radix) (Z.of_nat precision))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Rmult_IZR. rewrite Zpower_nat_Z_powerRZ; auto with zarith. pattern (Fnum p * Fnum q)%Z at 1 in |- *; rewrite H'5; ring. rewrite pGivesBound. rewrite <- (Zabs_eq (Zpower_nat radix precision)); auto with zarith. apply Zlt_Zabs_inv2; auto. apply Rmult_le_reg_l with (r := powerRZ radix (Fexp p + Fexp q)); (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. repeat rewrite (Rmult_comm (powerRZ radix (Fexp p + Fexp q))); auto. (* Goal: @eq R (FtoRradix pq) (Rmult (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q))))) (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q)))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite Rmult_assoc; rewrite <- powerRZ_add; auto with real zarith. case (FboundedMbound _ radixMoreThanOne b precision) with (z := (precision + (Fexp p + Fexp q))%Z) (m := Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)); auto with zarith. apply Zmult_le_reg_r with (p := Zpower_nat radix precision); auto with zarith. apply Zlt_gt; auto with zarith. pattern (Zpower_nat radix precision) at 2 in |- *; rewrite <- (fun x => Zabs_eq (Zpower_nat radix x)). rewrite <- Zabs_Zmult. apply Zle_trans with (1 := H'6); auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Zabs_Zmult. apply Zle_trans with (Zpower_nat radix precision * Zabs (Fnum q))%Z. apply Zle_Zmult_comp_r; auto with zarith. apply Zlt_le_weak; rewrite <- pGivesBound; case Fp; auto with float. apply Zle_Zmult_comp_l; auto with zarith. apply Zlt_le_weak; rewrite <- pGivesBound; case Fq; auto with float. auto with zarith. intros x0 (H'8, H'9); rewrite <- H'9. case H'2. intros H'10 (H'11, H'12); apply H'12; auto. rewrite H'9; auto. rewrite powerRZ_add; auto with real zarith. (* Goal: @eq R (Rmult (IZR radix) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b))))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) rewrite <- Rmult_assoc. unfold FtoRradix in |- *; rewrite <- Fmult_correct; auto with zarith. unfold Fmult, FtoR in |- *; simpl in |- *. repeat rewrite (fun x => Rmult_comm x (powerRZ radix (Fexp p + Fexp q))). apply Rmult_le_compat_l; auto with real zarith. rewrite <- Zpower_nat_Z_powerRZ; auto with zarith. pattern (Fnum p * Fnum q)%Z at 2 in |- *; rewrite <- (Zabs_eq (Fnum p * Fnum q)); auto. rewrite <- Rmult_IZR; apply Rle_IZR; apply Zle_Zabs_inv2; auto. simpl in |- *; auto. apply Zmin_n_n; auto. Qed. Theorem errorBoundedMultMax : forall p q fmax : float, Fbounded b p -> Fbounded b q -> (0 <= p)%R -> (0 <= q)%R -> (- dExp b <= Fexp p + Fexp q)%Z -> isMax b radix (p * q) fmax -> exists r : float, FtoRradix r = (p * q - fmax)%R /\ Fbounded b r /\ Fexp r = (Fexp p + Fexp q)%Z. intros p q fmax Fp Fq H' H'0 H'1 H'2. cut (0 <= Fnum p * Fnum q)%Z; [ intros multPos | apply Zle_mult_gen; apply (LeR0Fnum radix); auto with arith ]. case (ZquotientProp (Fnum p * Fnum q) (Zpower_nat radix precision)); auto with zarith. intros r; intros (H'3, (H'4, H'5)). cut (0 <= Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision))%Z; [ intros Z2 | apply ZquotientPos; auto with zarith ]. cut (0 <= r)%Z; [ intros Z3 | replace r with (Fnum p * Fnum q - Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * Zpower_nat radix precision)%Z; [ idtac | pattern (Fnum p * Fnum q)%Z at 1 in |- *; rewrite H'3; ring ]; auto ]. 2: apply Zle_Zminus_ZERO; rewrite Zabs_eq in H'4; auto with zarith; rewrite Zabs_eq in H'4; auto with zarith. case (Z_eq_dec r 0); intros Z4. exists (Fzero (Fexp p + Fexp q)); repeat (split; auto with float). replace (FtoRradix (Fzero (Fexp p + Fexp q))) with 0%R; [ idtac | unfold Fzero, FtoRradix, FtoR in |- *; simpl in |- *; ring ]. apply Rplus_eq_reg_l with (r := FtoRradix fmax). replace (fmax + 0)%R with (FtoRradix fmax); [ idtac | ring ]. replace (fmax + (p * q - fmax))%R with (p * q)%R; [ idtac | ring ]. unfold FtoRradix in |- *; rewrite <- (Fmult_correct radix); auto with zarith. case (FboundedMbound _ radixMoreThanOne b precision) with (z := (precision + (Fexp p + Fexp q))%Z) (m := Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)); auto with zarith. apply Zmult_le_reg_r with (p := Zpower_nat radix precision); auto with zarith. apply Zlt_gt; auto with zarith. pattern (Zpower_nat radix precision) at 2 in |- *; rewrite <- (fun x => Zabs_eq (Zpower_nat radix x)). rewrite <- Zabs_Zmult. apply Zle_trans with (1 := H'4); auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Zabs_Zmult. apply Zle_trans with (Zpower_nat radix precision * Zabs (Fnum q))%Z. apply Zle_Zmult_comp_r; auto with zarith. apply Zlt_le_weak; rewrite <- pGivesBound; case Fp; auto with float. apply Zle_Zmult_comp_l; auto with zarith. apply Zlt_le_weak; rewrite <- pGivesBound; case Fq; auto with float. auto with zarith. intros x (H'6, H'7). cut (FtoR radix (Fmult p q) = FtoR radix x). intros H'8; rewrite H'8. apply sym_eq; apply (ProjectMax b radix); auto. rewrite <- H'8; auto. rewrite Fmult_correct; auto with zarith. rewrite H'7. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. rewrite powerRZ_add with (n := Z_of_nat precision); auto with real zarith. pattern (Fnum p * Fnum q)%Z at 1 in |- *; rewrite H'3. (* Goal: Rlt (Rmult (IZR (Z.mul (Z.abs ny) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision))))))) (powerRZ (IZR radix) (Z.of_nat precision))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite plus_IZR; rewrite Rmult_IZR. repeat rewrite Zpower_nat_Z_powerRZ; auto with real zarith. rewrite Z4; simpl;ring. cut (ex (fun m : Z => FtoRradix fmax = Float m (Fexp (Fmult p q)))); [ intros Z5 | idtac ]. 2: unfold FtoRradix in |- *; apply RoundedModeRep with (b := b) (precision := precision) (P := isMax b radix); auto. 2: apply MaxRoundedModeP with (precision := precision); auto. 2: rewrite (Fmult_correct radix); auto with zarith. elim Z5; intros m E; clear Z5. exists (Fopp (Fminus radix (Float m (Fexp (Fmult p q))) (Fmult p q))). split. rewrite E; unfold FtoRradix in |- *; repeat rewrite Fopp_correct; repeat rewrite Fminus_correct; repeat rewrite Fmult_correct; auto with zarith; ring. cut (Fexp (Fopp (Fminus radix (Float m (Fexp (Fmult p q))) (Fmult p q))) = (Fexp p + Fexp q)%Z); [ intros Z5 | idtac ]. split; auto. split; [ idtac | rewrite Z5; auto ]. cut (Fmult p q <= fmax)%R; [ idtac | unfold FtoRradix in |- *; rewrite Fmult_correct; auto; case H'2; auto with real zarith; (intros H1 H2; case H2; auto) ]. cut (fmax <= Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * powerRZ radix (precision + (Fexp p + Fexp q)))%R. rewrite E; repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; repeat rewrite Zpower_nat_O; repeat rewrite Zmult_1_r; auto. unfold Fmult, Fminus, Fplus, Fopp in |- *; simpl in |- *. repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; repeat rewrite Zpower_nat_O; repeat rewrite Zmult_1_r; auto. intros H1 H2; rewrite Zabs_Zopp; apply Zlt_Zabs_intro. apply Zlt_le_trans with 0%Z; auto with zarith. cut (Fnum p * Fnum q <= m)%Z; auto with zarith. apply le_IZR; apply (Rle_monotony_contra_exp radix) with (z := (Fexp p + Fexp q)%Z); auto with zarith. cut (m <= Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * Zpower_nat radix precision)%Z; [ intros H'9 | idtac ]. apply Zle_lt_trans with (Zpower_nat radix precision - r)%Z; [ idtac | rewrite pGivesBound; auto with zarith ]. replace r with (Fnum p * Fnum q - Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * Zpower_nat radix precision)%Z. replace (Zpower_nat radix precision - (Fnum p * Fnum q - Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * Zpower_nat radix precision))%Z with (Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * Zpower_nat radix precision - Fnum p * Fnum q)%Z; auto with zarith. unfold Zsucc in |- *; simpl in |- *; ring. pattern (Fnum p * Fnum q)%Z at 1 in |- *; rewrite H'3; ring. apply le_IZR; apply (Rle_monotony_contra_exp radix) with (z := (Fexp p + Fexp q)%Z); auto with zarith. replace (IZR (Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * Zpower_nat radix precision) * powerRZ radix (Fexp p + Fexp q))%R with (Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * powerRZ radix (precision + (Fexp p + Fexp q)))%R; [ auto | idtac ]. rewrite powerRZ_add; auto with real zarith. repeat rewrite Rmult_IZR; repeat rewrite Zpower_nat_Z_powerRZ; auto with zarith. ring. case (FboundedMbound _ radixMoreThanOne b precision) with (z := (precision + (Fexp p + Fexp q))%Z) (m := Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision))); auto with arith. rewrite Zabs_eq; auto with zarith. apply Zlt_le_succ. case (Zle_lt_or_eq _ _ multPos); intros Eq1. cut (0 < Zabs (Fnum p))%Z; [ intros Eq2 | idtac ]. cut (0 < Zabs (Fnum q))%Z; [ intros Eq3 | idtac ]. apply Zlt_mult_simpl_l with (c := Zpower_nat radix precision); auto with zarith. rewrite (fun x y z => Zmult_comm x (Zquotient y z)). apply Zle_lt_trans with (Fnum p * Fnum q)%Z. rewrite Zabs_eq in H'4; auto with zarith; rewrite Zabs_eq in H'4; auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite <- (Zabs_eq (Fnum p * Fnum q)); auto with zarith; rewrite Zabs_Zmult. apply Zlt_trans with (Zabs (Fnum p) * Zpower_nat radix precision)%Z. cut (Zabs (Fnum q) < Zpower_nat radix precision)%Z; [ intros Eq4; apply Zmult_gt_0_lt_compat_l | rewrite <- pGivesBound; case Fq ]; auto with zarith. cut (Zabs (Fnum p) < Zpower_nat radix precision)%Z; [ intros Eq4; apply Zmult_gt_0_lt_compat_r | rewrite <- pGivesBound; case Fp ]; auto with zarith. case (Zle_lt_or_eq _ _ (Zle_ZERO_Zabs (Fnum q))); auto. intros Eq3; Contradict Eq1; replace (Fnum q) with 0%Z; auto with zarith. generalize Eq3; case (Fnum q); simpl in |- *; auto; intros; discriminate. case (Zle_lt_or_eq _ _ (Zle_ZERO_Zabs (Fnum p))); auto. intros Eq3; Contradict Eq1; replace (Fnum p) with 0%Z; auto with zarith. generalize Eq3; case (Fnum p); simpl in |- *; auto; intros; discriminate. rewrite <- Eq1; replace (Zquotient 0 (Zpower_nat radix precision)) with 0%Z; auto with zarith. apply Zle_trans with (1 := H'1); auto with zarith. intros f1 (Hf1, Hf2); rewrite <- Hf2. case H'2; intros L1 (L2, L3); apply L3; auto. rewrite Hf2; unfold Fmult, FtoRradix, FtoR in |- *. replace (Fnum p * powerRZ radix (Fexp p) * (Fnum q * powerRZ radix (Fexp q)))%R with (Fnum p * Fnum q * powerRZ radix (Fexp p + Fexp q))%R. replace (Zsucc (Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision)) * powerRZ radix (precision + (Fexp p + Fexp q)))%R with ((Zquotient (Fnum p * Fnum q) (Zpower_nat radix precision) * Zpower_nat radix precision + Zpower_nat radix precision)%Z * powerRZ radix (Fexp p + Fexp q))%R. apply Rle_monotone_exp; auto with real zarith. rewrite <- Rmult_IZR; apply Rle_IZR. pattern (Fnum p * Fnum q)%Z at 1 in |- *; rewrite H'3; cut (r < Zpower_nat radix precision)%Z; auto with zarith. rewrite Zabs_eq in H'5; auto with zarith; rewrite Zabs_eq in H'5; auto with zarith. unfold Zsucc in |- *; repeat rewrite Rmult_IZR || rewrite plus_IZR; simpl in |- *. rewrite (powerRZ_add radix precision); auto with real zarith; rewrite <- (Zpower_nat_Z_powerRZ radix precision); auto with real zarith; ring. rewrite powerRZ_add; auto with real zarith; ring. unfold Fopp, Fminus, Fmult in |- *; simpl in |- *; auto. apply Zmin_n_n. Qed. Theorem multExpMin : forall P, RoundedModeP b radix P -> forall p q pq : float, P (p * q)%R pq -> exists s : float, Fbounded b s /\ s = pq :>R /\ (Fexp p + Fexp q <= Fexp s)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) pq), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.add (Fexp p) (Fexp q)) (Fexp s)))) *) intros P H' p q pq H'0. case (RoundedModeRep b radix precision) with (p := Fmult p q) (q := pq) (P := P); auto with zarith. rewrite Fmult_correct; auto with zarith. (* Goal: forall (x : Z) (_ : @eq R (FtoR radix pq) (FtoR radix (Float x (Fexp (Fmult p q))))), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.add (Fexp p) (Fexp q)) (Fexp s)))) *) simpl in |- *; intros x H'1. case (eqExpLess _ radixMoreThanOne b) with (p := pq) (q := Float x (Fexp (Fmult p q))); auto. apply RoundedModeBounded with (radix := radix) (P := P) (r := (p * q)%R); auto. simpl in |- *; intros x0 H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; clear H'4 H'2. (* Goal: @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.add (Fexp p) (Fexp q)) (Fexp s)))) *) exists x0; split; [ idtac | split ]; auto. (* Goal: @eq R (FtoRradix x0) (FtoRradix pq) *) (* Goal: Z.le (Z.add (Fexp p) (Fexp q)) (Fexp x0) *) unfold FtoRradix in |- *; rewrite H'5; auto. (* Goal: Z.le (Z.add (Fexp p) (Fexp q)) (Fexp x0) *) apply le_IZR; auto. Qed. Theorem multExpUpperBound : forall P, RoundedModeP b radix P -> forall p q pq : float, P (p * q)%R pq -> Fbounded b p -> Fbounded b q -> (- dExp b <= Fexp p + Fexp q)%Z -> exists r : float, Fbounded b r /\ r = pq :>R /\ (Fexp r <= precision + (Fexp p + Fexp q))%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))), @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))))) *) intros P H' p q pq H'0 H'1 H'2 H'3. replace (precision + (Fexp p + Fexp q))%Z with (Fexp (Float (pPred (vNum b)) (precision + (Fexp p + Fexp q)))); [ idtac | simpl in |- *; auto ]. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (Z.le (Fexp r) (Fexp (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))))))) *) unfold FtoRradix in |- *; apply eqExpMax; auto. apply RoundedModeBounded with (radix := radix) (P := P) (r := (p * q)%R); auto; auto. (* Goal: Fbounded b (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) *) (* Goal: Rle (FtoR radix (Fabs pq)) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) unfold pPred in |- *; apply maxFbounded; auto. apply Zle_trans with (1 := H'3); auto with zarith. replace (FtoR radix (Float (pPred (vNum b)) (precision + (Fexp p + Fexp q)))) with (radix * Float (pPred (vNum b)) (pred precision + (Fexp p + Fexp q)))%R. rewrite Fabs_correct; auto with zarith. unfold FtoRradix in |- *; apply RoundedModeMultAbs with (b := b) (precision := precision) (P := P) (r := (p * q)%R); auto. unfold pPred in |- *; apply maxFbounded; auto with zarith. (* Goal: Rle (Rabs (Rmult (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Rabs_mult; auto. apply Rle_trans with (FtoR radix (Fmult (Float (pPred (vNum b)) (Fexp p)) (Float (pPred (vNum b)) (Fexp q)))). (* Goal: Rle (Rmult (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) (FtoR radix (Fmult (Float (pPred (vNum b)) (Fexp p)) (Float (pPred (vNum b)) (Fexp q)))) *) (* Goal: Rle (FtoR radix (Fmult (Float (pPred (vNum b)) (Fexp p)) (Float (pPred (vNum b)) (Fexp q)))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Fmult_correct; auto with arith. (* Goal: Rle (Rmult (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) (Rmult (FtoR radix (Float (pPred (vNum b)) (Fexp p))) (FtoR radix (Float (pPred (vNum b)) (Fexp q)))) *) (* Goal: Rle (FtoR radix (Fmult (Float (pPred (vNum b)) (Fexp p)) (Float (pPred (vNum b)) (Fexp q)))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) apply Rmult_le_compat; auto with real. rewrite <- (Fabs_correct radix); try apply maxMax1; auto with zarith. rewrite <- (Fabs_correct radix); try apply maxMax1; auto with zarith. unfold Fmult, FtoR in |- *; simpl in |- *; auto. rewrite powerRZ_add with (n := Z_of_nat (pred precision)); auto with real arith. (* Goal: @eq R (Rmult (IZR radix) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b))))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) repeat rewrite <- Rmult_assoc. repeat rewrite (fun (z : Z) (x : R) => Rmult_comm x (powerRZ radix z)); auto. (* Goal: Rle (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b))))) (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (Rmult (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred precision))) (Rmult (IZR radix) (IZR (pPred (vNum b)))))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) apply Rmult_le_compat_l; auto with real arith. (* Goal: @eq R (Rmult (IZR radix) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b))))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) rewrite <- Rmult_assoc. (* Goal: Rle (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b)))) (Rmult (Rmult (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred precision))) (IZR radix)) (IZR (pPred (vNum b)))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite (fun x : R => Rmult_comm x radix). (* Goal: Rle (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b)))) (Rmult (Rmult (IZR radix) (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred precision)))) (IZR (pPred (vNum b)))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite <- powerRZ_Zs; auto with real arith. (* Goal: Rle (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.succ (Z.of_nat (Init.Nat.pred precision)))) (IZR (pPred (vNum b)))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) replace (Zsucc (pred precision)) with (Z_of_nat precision). (* Goal: Rle (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (pPred (vNum b)))) *) (* Goal: @eq Z (Z.of_nat precision) (Z.succ (Z.of_nat (Init.Nat.pred precision))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Rmult_IZR; auto. (* Goal: Rle (Rmult (IZR (pPred (vNum b))) (IZR (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (pPred (vNum b)))) *) (* Goal: @eq Z (Z.of_nat precision) (Z.succ (Z.of_nat (Init.Nat.pred precision))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) apply Rmult_le_compat; auto with real arith. replace 0%R with (IZR 0); unfold pPred in |- *; try apply Rle_IZR; (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. replace 0%R with (IZR 0); unfold pPred in |- *; try apply Rle_IZR; (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. unfold pPred in |- *; rewrite pGivesBound; rewrite <- Zpower_nat_Z_powerRZ; (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.succ (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q))))) (IZR (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) rewrite inj_pred; auto with arith zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR radix) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) repeat rewrite (Rmult_comm (pPred (vNum b))). (* Goal: @eq R (Rmult (IZR radix) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b))))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) rewrite <- Rmult_assoc. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite <- powerRZ_Zs; auto with real zarith. (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.succ (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q))))) (IZR (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))) (IZR (pPred (vNum b)))) *) rewrite inj_pred; auto with arith zarith. replace (Zsucc (Zpred precision + (Fexp p + Fexp q))) with (precision + (Fexp p + Fexp q))%Z; auto; unfold Zsucc, Zpred in |- *; ring. Qed. Theorem errorBoundedMultPos : forall P, RoundedModeP b radix P -> forall p q f : float, Fbounded b p -> Fbounded b q -> (0 <= p)%R -> (0 <= q)%R -> (- dExp b <= Fexp p + Fexp q)%Z -> P (p * q)%R f -> exists r : float, r = (p * q - f)%R :>R /\ Fbounded b r /\ Fexp r = (Fexp p + Fexp q)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q f : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) f), @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) intros P H p q f H0 H1 H2 H3 H4 H5. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) generalize errorBoundedMultMin errorBoundedMultMax; intros H6 H7. cut (MinOrMaxP b radix P); [ intros | case H; intros H'1 (H'2, (H'3, H'4)); auto ]. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) case (H8 (p * q)%R f); auto. Qed. Theorem errorBoundedMultNeg : forall P, RoundedModeP b radix P -> forall p q f : float, Fbounded b p -> Fbounded b q -> (p <= 0)%R -> (0 <= q)%R -> (- dExp b <= Fexp p + Fexp q)%Z -> P (p * q)%R f -> exists r : float, r = (p * q - f)%R :>R /\ Fbounded b r /\ Fexp r = (Fexp p + Fexp q)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q f : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) f), @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) intros P H p q f H0 H1 H2 H3 H4 H5. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) generalize errorBoundedMultMin errorBoundedMultMax; intros H6 H7. cut (MinOrMaxP b radix P); [ intros | case H; intros H'1 (H'2, (H'3, H'4)); auto ]. case (H8 (p * q)%R f); auto; intros H9. generalize (H7 (Fopp p) q (Fopp f)); intros H12. lapply H12; auto with float; intros H10; clear H12. lapply H10; auto; intros H12; clear H10. lapply H12; [ intros H10 | unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real ]; clear H12. lapply H10; auto; intros H12; clear H10. lapply H12; [ intros H10 | simpl in |- *; auto ]; clear H12. lapply H10; [ intros H12 | idtac ]; clear H10. 2: replace (Fopp p * q)%R with (- (p * q))%R; [ apply MinOppMax; auto | idtac ]. 2: unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. elim H12; intros r H10; clear H12; elim H10; intros H11 H12; clear H10. elim H12; clear H12; intros H10 H12. exists (Fopp r); split; [ generalize H11 | split; auto with float ]. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; intros H13; rewrite H13; ring. generalize (H6 (Fopp p) q (Fopp f)); intros H12. lapply H12; auto with float; intros H10; clear H12. lapply H10; auto; intros H12; clear H10. lapply H12; [ intros H10 | unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real ]; clear H12. lapply H10; auto; intros H12; clear H10. lapply H12; [ intros H10 | simpl in |- *; auto ]; clear H12. lapply H10; [ intros H12 | idtac ]; clear H10. 2: replace (Fopp p * q)%R with (- (p * q))%R; [ apply MaxOppMin; auto | idtac ]. 2: unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. elim H12; intros r H10; clear H12; elim H10; intros H11 H12; clear H10. elim H12; clear H12; intros H10 H12. exists (Fopp r); split; [ generalize H11 | split; auto with float ]. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; intros H13; rewrite H13; ring. Qed. Theorem errorBoundedMult : forall P, RoundedModeP b radix P -> forall p q f : float, Fbounded b p -> Fbounded b q -> (- dExp b <= Fexp p + Fexp q)%Z -> P (p * q)%R f -> exists r : float, r = (p * q - f)%R :>R /\ Fbounded b r /\ Fexp r = (Fexp p + Fexp q)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q f : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) f), @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) intros P H p q f H0 H1 H2 H3. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) case (Rle_or_lt 0 p); intros H4; case (Rle_or_lt 0 q); intros H5. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) apply errorBoundedMultPos with P; auto. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) replace (Fexp p) with (Fexp (Fopp p)); auto with float. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp (Fopp p)) (Fexp q))))) *) replace (Fexp q) with (Fexp (Fopp q)); auto with float. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))) *) cut ((p * q)%R = (Fopp p * Fopp q)%R); [ intros H6; rewrite H6 | idtac ]. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) apply errorBoundedMultNeg with P; auto with float real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) rewrite <- H6; auto. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; ring. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) apply errorBoundedMultNeg with P; auto with float real. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp p) (Fexp q))))) *) replace (Fexp p) with (Fexp (Fopp p)); auto with float. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp (Fopp p)) (Fexp q))))) *) replace (Fexp q) with (Fexp (Fopp q)); auto with float. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))) *) cut ((p * q)%R = (Fopp p * Fopp q)%R); [ intros H6; rewrite H6 | idtac ]. (* Goal: @ex float (fun r : float => and (@eq R (FtoRradix r) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix f))) (and (Fbounded b r) (@eq Z (Fexp r) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))) *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) apply errorBoundedMultPos with P; auto with float real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) unfold FtoRradix in |- *; rewrite Fopp_correct; auto with real. (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) f *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) *) rewrite <- H6; auto. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; ring. Qed. Theorem errorBoundedMultExp_aux : forall n1 n2 : Z, (Zabs n1 < Zpos (vNum b))%Z -> (Zabs n2 < Zpos (vNum b))%Z -> (exists ny : Z, (exists ey : Z, (n1 * n2)%R = (ny * powerRZ radix ey)%R :>R /\ (Zabs ny < Zpos (vNum b))%Z)) -> exists nx : Z, (exists ex : Z, (n1 * n2)%R = (nx * powerRZ radix ex)%R :>R /\ (Zabs nx < Zpos (vNum b))%Z /\ (0 <= ex)%Z /\ (ex <= precision)%Z). (* Goal: forall (n1 n2 : Z) (_ : Z.lt (Z.abs n1) (Zpos (vNum b))) (_ : Z.lt (Z.abs n2) (Zpos (vNum b))) (_ : @ex Z (fun ny : Z => @ex Z (fun ey : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR ny) (powerRZ (IZR radix) ey))) (Z.lt (Z.abs ny) (Zpos (vNum b)))))), @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) intros n1 n2 H H0 H1. (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) case H1; intros ny (ey, (H2, H3)). (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) case (Zle_or_lt 0 ey); intros Zl1. (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) case (Zle_or_lt ey precision); intros Zl2. (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) exists ny; exists ey; repeat (split; auto). exists (ny * Zpower_nat radix (Zabs_nat (ey - precision)))%Z; exists (Z_of_nat precision); repeat (split; auto with zarith). replace (IZR (ny * Zpower_nat radix (Zabs_nat (ey - precision)))) with (ny * powerRZ radix (ey - precision))%R. (* Goal: @eq R (Rmult (IZR n1) (IZR n2)) (Rmult (Rmult (IZR ny) (powerRZ (IZR radix) (Z.sub ey (Z.of_nat precision)))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @eq R (Rmult (IZR ny) (powerRZ (IZR radix) (Z.sub ey (Z.of_nat precision)))) (IZR (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) *) (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Rmult_assoc; rewrite <- powerRZ_add; auto with zarith real. (* Goal: @eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR ny) (powerRZ (IZR radix) (Z.add (Z.sub ey (Z.of_nat precision)) (Z.of_nat precision)))) *) (* Goal: @eq R (Rmult (IZR ny) (powerRZ (IZR radix) (Z.sub ey (Z.of_nat precision)))) (IZR (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) *) (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) replace (ey - precision + precision)%Z with ey; [ auto | ring ]. (* Goal: Rlt (Rmult (IZR (Z.mul (Z.abs ny) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision))))))) (powerRZ (IZR radix) (Z.of_nat precision))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Rmult_IZR. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Zpower_nat_powerRZ_absolu; auto with real zarith. (* Goal: Z.lt (Z.abs (Z.mul ny (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision)))))) (Zpos (vNum b)) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Zabs_Zmult. apply lt_IZR; apply Rmult_lt_reg_l with (r := powerRZ radix precision); (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (Rmult (IZR (Fnum p)) (IZR (Fnum q)))) (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) repeat rewrite (fun x y => Rmult_comm (powerRZ x y)). (* Goal: Rlt (Rmult (IZR (Z.mul (Z.abs ny) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision))))))) (powerRZ (IZR radix) (Z.of_nat precision))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Rmult_IZR. (* Goal: Rlt (Rmult (Rmult (IZR (Z.abs ny)) (IZR (Z.abs (Zpower_nat radix (Z.abs_nat (Z.sub ey (Z.of_nat precision))))))) (powerRZ (IZR radix) (Z.of_nat precision))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite Rmult_assoc. rewrite (Zabs_eq (Zpower_nat radix (Zabs_nat (ey - precision)))); auto with zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Zpower_nat_powerRZ_absolu; auto with real zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite <- powerRZ_add; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.abs ny)) (powerRZ (IZR radix) (Z.add (Z.sub ey (Z.of_nat precision)) (Z.of_nat precision)))) (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.of_nat precision))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) replace (ey - precision + precision)%Z with ey; [ idtac | ring ]. replace (powerRZ radix precision) with (IZR (Zpos (vNum b))); [ idtac | rewrite pGivesBound; rewrite <- Zpower_nat_powerRZ_absolu; try rewrite absolu_INR; auto with zarith ]. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite <- (fun x y => Rabs_pos_eq (powerRZ x y)); auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.abs ny)) (Rabs (powerRZ (IZR radix) ey))) (Rmult (IZR (Zpos (vNum b))) (IZR (Zpos (vNum b)))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) rewrite <- Faux.Rabsolu_Zabs; rewrite <- Rabs_mult; rewrite <- H2. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Rabs_mult; repeat rewrite Faux.Rabsolu_Zabs; auto with real zarith. (* Goal: Rlt (Rmult (IZR (Z.abs n1)) (IZR (Z.abs n2))) (Rmult (IZR (Zpos (vNum b))) (IZR (Zpos (vNum b)))) *) (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) case (Zle_lt_or_eq 0 (Zabs n2)); auto with zarith; intros Z1. apply Rlt_trans with (Zpos (vNum b) * Zabs n2)%R; (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite <- Z1; auto with real zarith. replace (Zabs n1 * 0%Z)%R with (0 * Zpos (vNum b))%R; [ auto with real zarith | simpl; ring ]. (* Goal: @ex Z (fun nx : Z => @ex Z (fun ex : Z => and (@eq R (Rmult (IZR n1) (IZR n2)) (Rmult (IZR nx) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs nx) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))) *) exists (n1 * n2)%Z; exists 0%Z; repeat (split; auto with zarith). rewrite Rmult_IZR; rewrite powerRZ_O; ring. (* Goal: Z.lt (Z.abs (Z.mul n1 n2)) (Zpos (vNum b)) *) apply lt_IZR. (* Goal: Rlt (IZR (Z.abs (Z.mul n1 n2))) (IZR (Zpos (vNum b))) *) rewrite <- Faux.Rabsolu_Zabs; rewrite Rmult_IZR; rewrite H2. (* Goal: Rlt (Rabs (Rmult (IZR ny) (powerRZ (IZR radix) ey))) (IZR (Zpos (vNum b))) *) rewrite Rabs_mult. (* Goal: Rlt (Rmult (Rabs (IZR ny)) (Rabs (powerRZ (IZR radix) ey))) (IZR (Zpos (vNum b))) *) apply Rle_lt_trans with (Rabs ny). pattern (Rabs ny) at 2 in |- *; replace (Rabs ny) with (Rabs ny * 1)%R; [ apply Rmult_le_compat_l | ring ]; auto with arith real. rewrite (Rabs_pos_eq (powerRZ radix ey)); [ idtac | apply powerRZ_le; auto with arith real ]. replace 1%R with (powerRZ radix 0); [ apply Rle_powerRZ | simpl in |- * ]; auto with real arith zarith. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Faux.Rabsolu_Zabs; auto with real zarith. Qed. Theorem errorBoundedMultExpPos : forall P, RoundedModeP b radix P -> forall p q pq : float, Fbounded b p -> Fbounded b q -> (0 <= p)%R -> (0 <= q)%R -> P (p * q)%R pq -> (- dExp b <= Fexp p + Fexp q)%Z -> ex (fun r : float => ex (fun s : float => Fbounded b r /\ Fbounded b s /\ r = pq :>R /\ s = (p * q - r)%R :>R /\ Fexp s = (Fexp p + Fexp q)%Z :>Z /\ (Fexp s <= Fexp r)%Z /\ (Fexp r <= precision + (Fexp p + Fexp q))%Z)). (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (IZR Z0) (FtoRradix q)) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) pq) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) intros P H p q pq H0 H1 H2 H3 H4 H5. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (multExpUpperBound P H p q pq); auto; intros r (H'1, (H'2, H'3)). (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Req_dec (p * q - pq) 0); intros H6. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Req_dec pq 0); intros H7. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) cut (Fbounded b (Fzero (Fexp p + Fexp q))); [ intros Fb1 | idtac ]. exists (Fzero (Fexp p + Fexp q)); exists (Fzero (Fexp p + Fexp q)); repeat (split; simpl in |- *; auto with zarith). (* Goal: @eq R (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q)))) (FtoRradix pq) *) (* Goal: @eq R (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q)))) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q))))) *) (* Goal: Fbounded b (Fzero (Z.add (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite H7; unfold FtoRradix in |- *; apply FzeroisReallyZero. (* Goal: @eq R (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q)))) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q))))) *) (* Goal: Fbounded b (Fzero (Z.add (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) unfold FtoRradix in |- *; rewrite FzeroisReallyZero; rewrite <- H7. (* Goal: @eq R (FtoRradix pq) (Rminus (Rmult (FtoR radix p) (FtoR radix q)) (FtoRradix pq)) *) (* Goal: Fbounded b (Fzero (Z.add (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) pattern (FtoRradix pq) at 1 in |- *; rewrite H7; auto with real. (* Goal: Fbounded b (Fzero (Z.add (Fexp p) (Fexp q))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) repeat (split; auto); simpl in |- *; auto with arith zarith. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (errorBoundedMultExp_aux (Fnum p) (Fnum q)); auto with float real zarith. exists (Fnum pq); exists (Fexp pq - (Fexp p + Fexp q))%Z; split. apply Rmult_eq_reg_l with (powerRZ radix (Fexp p + Fexp q)); (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) auto with real zarith. (* Goal: @eq R (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (Rmult (IZR (Fnum p)) (IZR (Fnum q)))) (Rmult (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q))) (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) repeat rewrite (fun x y => Rmult_comm (powerRZ x y)). (* Goal: @eq R (Rmult (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q)))) (Rmult (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q))))) (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q)))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply trans_eq with (p * q)%R; auto. rewrite <- (Fmult_correct radix); auto with real zarith; unfold FtoRradix, FtoR, Fmult in |- *; simpl in |- *; (* Goal: Rle (IZR (Z.mul (pPred (vNum b)) (pPred (vNum b)))) (Rmult (powerRZ (IZR radix) (Z.of_nat precision)) (IZR (pPred (vNum b)))) *) (* Goal: @eq Z (Z.of_nat precision) (Z.succ (Z.of_nat (Init.Nat.pred precision))) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) rewrite Rmult_IZR; auto. (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (Rmult (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q))))) (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q)))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply trans_eq with (FtoRradix pq); auto with real. (* Goal: @eq R (FtoRradix pq) (Rmult (Rmult (IZR (Fnum pq)) (powerRZ (IZR radix) (Z.sub (Fexp pq) (Z.add (Fexp p) (Fexp q))))) (powerRZ (IZR radix) (Z.add (Fexp p) (Fexp q)))) *) (* Goal: Z.lt (Z.abs (Fnum pq)) (Zpos (vNum b)) *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite Rmult_assoc; rewrite <- powerRZ_add; auto with real zarith. replace (Fexp pq - (Fexp p + Fexp q) + (Fexp p + Fexp q))%Z with (Fexp pq); auto; ring. (* Goal: not (@eq R (IZR radix) (IZR Z0)) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Z.add (Z.of_nat (Init.Nat.pred precision)) (Z.add (Fexp p) (Fexp q)))))) (FtoR radix (Float (pPred (vNum b)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))) *) cut (Fbounded b pq); [ intros Z1; case Z1 | idtac ]; auto with real zarith. (* Goal: Fbounded b pq *) (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply (RoundedModeBounded b radix P (p * q)); auto. (* Goal: forall (x : Z) (_ : @ex Z (fun ex : Z => and (@eq R (Rmult (IZR (Fnum p)) (IZR (Fnum q))) (Rmult (IZR x) (powerRZ (IZR radix) ex))) (and (Z.lt (Z.abs x) (Zpos (vNum b))) (and (Z.le Z0 ex) (Z.le ex (Z.of_nat precision)))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) intros nx (ex, (H'4, (H'5, (H'6, H'7)))). cut (FtoRradix pq = FtoRradix (Float nx (ex + (Fexp p + Fexp q))) :>R); [ intros Eq1 | idtac ]. exists (Float nx (ex + (Fexp p + Fexp q))); exists (Fzero (Fexp p + Fexp q)); repeat (split; simpl in |- *; auto with real zarith). (* Goal: @eq R (FtoRradix (Fzero (Z.add (Fexp p) (Fexp q)))) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Float nx (Z.add ex (Z.add (Fexp p) (Fexp q)))))) *) (* Goal: @eq R (FtoRradix pq) (FtoRradix (Float nx (Z.add ex (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite <- Eq1; rewrite H6; apply (FzeroisReallyZero radix). (* Goal: @eq R (FtoRradix pq) (FtoRradix (Float nx (Z.add ex (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) replace (FtoRradix pq) with (p * q)%R. (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Float nx (Z.add ex (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix pq) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Fnum q)) (powerRZ (IZR radix) (Fexp q)))) (Rmult (IZR nx) (powerRZ (IZR radix) (Z.add ex (Z.add (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix pq) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite powerRZ_add; auto with zarith real. repeat rewrite <- Rmult_assoc; rewrite <- H'4; rewrite powerRZ_add; [ ring | auto with zarith real ]. replace (FtoRradix p * FtoRradix q)%R with (pq + (FtoRradix p * FtoRradix q - FtoRradix pq))%R; [ rewrite H6 | idtac ]; ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (errorBoundedMultPos P H p q pq); auto. (* Goal: forall (x : float) (_ : and (@eq R (FtoRradix x) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix pq))) (and (Fbounded b x) (@eq Z (Fexp x) (Z.add (Fexp p) (Fexp q))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) intros s (H'4, (H'5, H'6)). (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) exists r; exists s; repeat (split; auto with zarith). (* Goal: @eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r)) *) (* Goal: Z.le (Fexp s) (Fexp r) *) rewrite H'2; auto. apply Zlt_le_weak; apply RoundedModeErrorExpStrict with b radix precision P (p * q)%R; auto. cut (CompatibleP b radix P); [ intros H'7 | case H; try intros H'7 (H'8, (H'9, H'10)); auto ]. (* Goal: P (Rmult (FtoRradix p) (FtoRradix q)) r *) (* Goal: @eq R (FtoR radix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoR radix r)) *) (* Goal: not (@eq R (FtoR radix s) (IZR Z0)) *) apply H'7 with (p * q)%R pq; auto with real. (* Goal: @eq R (FtoR radix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoR radix r)) *) (* Goal: not (@eq R (FtoR radix s) (IZR Z0)) *) fold FtoRradix in |- *; rewrite H'2; auto with real. (* Goal: not (@eq R (FtoR radix s) (IZR Z0)) *) fold FtoRradix in |- *; rewrite H'4; auto with real. Qed. Theorem errorBoundedMultExp : forall P, (RoundedModeP b radix P) -> forall p q pq : float, (Fbounded b p) -> (Fbounded b q) -> (P (p * q)%R pq) -> (-(dExp b) <= Fexp p + Fexp q)%Z -> exists r : float, exists s : float, (Fbounded b r) /\ (Fbounded b s) /\ r = pq :>R /\ s = (p * q - r)%R :>R /\ (Fexp s = Fexp p + Fexp q)%Z /\ (Fexp s <= Fexp r)%Z /\ (Fexp r <= precision + (Fexp p + Fexp q))%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : P (Rmult (FtoRradix p) (FtoRradix q)) pq) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) intros P H p q pq H1 H2 H3 H4. cut (MinOrMaxP b radix P); [ intros | case H; intros H'1 (H'2, (H'3, H'4)); auto ]. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case H0 with (p*q)%R pq; auto; intros H0'; clear H0. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 p); intros Rl1. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 q); intros Rl2. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply (errorBoundedMultExpPos P); auto. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case errorBoundedMultExpPos with (isMax b radix) p (Fopp q) (Fopp pq); auto with float real. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: isMax b radix (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (Fopp pq) *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix (Fopp pq))) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp q))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp q))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply MaxRoundedModeP with precision; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix p * FtoRradix (Fopp q))%R with (- (FtoRradix p * FtoRradix q))%R; [apply MinOppMax;auto|idtac]. rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, H9))))); exists (Fopp r); exists (Fopp s); repeat (split; simpl in |- *; auto with float real zarith). repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H7; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 q); intros Rl2. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case errorBoundedMultExpPos with (isMax b radix) (Fopp p) q (Fopp pq); auto with float real. (* Goal: RoundedModeP b radix (isMax b radix) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: isMax b radix (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (Fopp pq) *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix (Fopp pq))) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp q))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp q))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply MaxRoundedModeP with precision; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix (Fopp p) * FtoRradix q)%R with (- (FtoRradix p * FtoRradix q))%R; [apply MinOppMax;auto|idtac]. rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, H9))))); exists (Fopp r); exists (Fopp s); repeat (split; simpl in |- *; auto with float real zarith). repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H7; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix;ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (errorBoundedMultExpPos P H (Fopp p) (Fopp q) pq); auto with float real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix (Fopp p) * FtoRradix (Fopp q))%R with (FtoRradix p * FtoRradix q)%R; auto; repeat rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, (H9, (H10, H11))))))); exists r; exists s; repeat (split; simpl in |- *; auto with float real zarith). fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 p); intros Rl1. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 q); intros Rl2. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply (errorBoundedMultExpPos P); auto. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case errorBoundedMultExpPos with (isMin b radix) p (Fopp q) (Fopp pq); auto with float real. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: isMin b radix (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (Fopp pq) *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix (Fopp pq))) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp q))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp q))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply MinRoundedModeP with precision; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix p * FtoRradix (Fopp q))%R with (- (FtoRradix p * FtoRradix q))%R; [apply MaxOppMin;auto|idtac]. rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, H9))))); exists (Fopp r); exists (Fopp s); repeat (split; simpl in |- *; auto with float real zarith). repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H7; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (Rle_or_lt 0 q); intros Rl2. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case errorBoundedMultExpPos with (isMin b radix) (Fopp p) q (Fopp pq); auto with float real. (* Goal: RoundedModeP b radix (isMin b radix) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: isMin b radix (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (Fopp pq) *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix (Fopp pq))) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix q)) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp q))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp q))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) apply MinRoundedModeP with precision; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix (Fopp p) * FtoRradix q)%R with (- (FtoRradix p * FtoRradix q))%R; [apply MaxOppMin;auto|idtac]. rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, H9))))); exists (Fopp r); exists (Fopp s); repeat (split; simpl in |- *; auto with float real zarith). repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H7; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix;ring. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) case (errorBoundedMultExpPos P H (Fopp p) (Fopp q) pq); auto with float real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) (* Goal: P (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) pq *) (* Goal: forall (x : float) (_ : @ex float (fun s : float => and (Fbounded b x) (and (Fbounded b s) (and (@eq R (FtoRradix x) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix (Fopp p)) (FtoRradix (Fopp q))) (FtoRradix x))) (and (@eq Z (Fexp s) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))) (and (Z.le (Fexp s) (Fexp x)) (Z.le (Fexp x) (Z.add (Z.of_nat precision) (Z.add (Fexp (Fopp p)) (Fexp (Fopp q)))))))))))), @ex float (fun r : float => @ex float (fun s : float => and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))))) *) rewrite (Fopp_correct radix); auto with real. replace (FtoRradix (Fopp p) * FtoRradix (Fopp q))%R with (FtoRradix p * FtoRradix q)%R; auto; repeat rewrite (Fopp_correct radix); fold FtoRradix in |- *; auto with zarith; ring. intros r (s, (H5, (H6, (H7, (H8, (H9, (H10, H11))))))); exists r; exists s; repeat (split; simpl in |- *; auto with float real zarith). fold FtoRradix in |- *; rewrite H8; repeat rewrite (Fopp_correct radix); auto with zarith; fold FtoRradix; ring. Qed. End FRoundP.
(**************************************************************************** IEEE754 : Fcomp Laurent Thery ******************************************************************************) Require Export Float. Section comparisons. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Definition Fdiff (x y : float) := (Fnum x * Zpower_nat radix (Zabs_nat (Fexp x - Zmin (Fexp x) (Fexp y))) - Fnum y * Zpower_nat radix (Zabs_nat (Fexp y - Zmin (Fexp x) (Fexp y))))%Z. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Theorem Fdiff_correct : forall x y : float, (Fdiff x y * powerRZ radix (Zmin (Fexp x) (Fexp y)))%R = (x - y)%R. (* Goal: forall x y : float, @eq R (Rmult (IZR (Fdiff x y)) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) intros x y; unfold Fdiff in |- *. (* Goal: @eq R (Rmult (IZR (Z.sub (Z.mul (Fnum x) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))) (Z.mul (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))))) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) rewrite <- Z_R_minus. (* Goal: @eq R (Rmult (Rminus (IZR (Z.mul (Fnum x) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Z.mul (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))))) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) rewrite Rmult_comm; rewrite Rmult_minus_distr_l. (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR (Z.mul (Fnum x) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR (Z.mul (Fnum y) (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))))) (Rminus (FtoRradix x) (FtoRradix y)) *) repeat rewrite Rmult_IZR. (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum x)) (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum y)) (IZR (Zpower_nat radix (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))))) (Rminus (FtoRradix x) (FtoRradix y)) *) repeat rewrite Zpower_nat_Z_powerRZ; auto. (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))))) (Rminus (FtoRradix x) (FtoRradix y)) *) rewrite (Rmult_comm (Fnum x)); rewrite (Rmult_comm (Fnum y)). (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))))) (IZR (Fnum x)))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (Rmult (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))))) (IZR (Fnum y))))) (Rminus (FtoRradix x) (FtoRradix y)) *) repeat rewrite <- Rmult_assoc. (* Goal: @eq R (Rminus (Rmult (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum x))) (Rmult (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) repeat rewrite <- powerRZ_add; auto with real zarith. (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.of_nat (Z.abs_nat (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.of_nat (Z.abs_nat (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))))) (IZR (Fnum y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) repeat rewrite inj_abs; auto with arith. (* Goal: @eq R (Rminus (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))))) (IZR (Fnum x))) (Rmult (powerRZ (IZR radix) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))))) (IZR (Fnum y)))) (Rminus (FtoRradix x) (FtoRradix y)) *) (* Goal: Z.le Z0 (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y))) *) (* Goal: Z.le Z0 (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))) *) repeat rewrite Zplus_minus; auto. rewrite (fun t : R => Rmult_comm t (Fnum x)); rewrite (fun t : R => Rmult_comm t (Fnum y)); auto. (* Goal: Z.le Z0 (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))) *) apply Zplus_le_reg_l with (p := Zmin (Fexp x) (Fexp y)); auto with arith. (* Goal: Z.le (Z.add (Z.min (Fexp x) (Fexp y)) Z0) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp y) (Z.min (Fexp x) (Fexp y)))) *) (* Goal: Z.le Z0 (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))) *) rewrite Zplus_minus; rewrite Zplus_0_r; apply Zle_min_r; auto. (* Goal: Z.le Z0 (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y))) *) apply Zplus_le_reg_l with (p := Zmin (Fexp x) (Fexp y)); auto with arith. (* Goal: Z.le (Z.add (Z.min (Fexp x) (Fexp y)) Z0) (Z.add (Z.min (Fexp x) (Fexp y)) (Z.sub (Fexp x) (Z.min (Fexp x) (Fexp y)))) *) rewrite Zplus_minus; rewrite Zplus_0_r; apply Zle_min_l; auto. Qed. (* Definition of comparison functions*) Definition Feq (x y : float) := x = y :>R. Definition Fle (x y : float) := (x <= y)%R. Definition Flt (x y : float) := (x < y)%R. Definition Fge (x y : float) := (x >= y)%R. Definition Fgt (x y : float) := (x > y)%R. Definition Fcompare (x y : float) := (Fdiff x y ?= 0)%Z. Definition Feq_bool (x y : float) := match Fcompare x y with | Eq => true | _ => false end. Theorem Feq_bool_correct_t : forall x y : float, Feq_bool x y = true -> Feq x y. (* Goal: forall (x y : float) (_ : @eq bool (Flt_bool x y) true), Flt x y *) intros x y H'; red in |- *. (* Goal: @eq R (FtoRradix x) (FtoRradix y) *) apply Rplus_eq_reg_l with (r := (- y)%R). (* Goal: Rlt (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (Rplus (FtoRradix y) (Ropp (FtoRradix y))) *) repeat rewrite (Rplus_comm (- y)). (* Goal: Rlt (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (Rplus (FtoRradix y) (Ropp (FtoRradix y))) *) rewrite Rplus_opp_r. (* Goal: @eq R (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (IZR Z0) *) change ((x - y)%R = 0%R) in |- *. (* Goal: Rlt (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) rewrite <- Fdiff_correct. (* Goal: @eq R (Rmult (IZR (Fdiff x y)) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (IZR Z0) *) apply Rmult_eq_0_compat_r; auto. (* Goal: @eq R (IZR (Fdiff x y)) (IZR Z0) *) cut (Fdiff x y = 0%Z); [ intros H; rewrite H | idtac ]; auto with real. (* Goal: @eq Z (Fdiff x y) Z0 *) apply Zcompare_EGAL. (* Goal: @eq comparison (Z.compare (Fdiff x y) Z0) Eq *) generalize H'; unfold Feq_bool, Fcompare in |- *. (* Goal: forall _ : @eq bool match Z.compare (Fdiff x y) Z0 with | Eq => true | Lt => false | Gt => false end true, @eq comparison (Z.compare (Fdiff x y) Z0) Eq *) case (Fdiff x y ?= 0)%Z;auto; intros; discriminate. Qed. Theorem Feq_bool_correct_r : forall x y : float, Feq x y -> Feq_bool x y = true. (* Goal: forall (x y : float) (_ : Feq x y), @eq bool (Feq_bool x y) true *) intros x y H'; cut ((x - y)%R = 0%R). (* Goal: forall _ : @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0), @eq bool (Feq_bool x y) true *) (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) rewrite <- Fdiff_correct; intros H'1; case Rmult_integral with (1 := H'1). (* Goal: forall _ : @eq R (IZR (Fdiff x y)) (IZR Z0), @eq bool (Feq_bool x y) true *) (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0), @eq bool (Feq_bool x y) true *) (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) intros H'0; unfold Feq_bool, Fcompare in |- *. (* Goal: @eq bool match Z.compare (Fdiff x y) Z0 with | Eq => true | Lt => false | Gt => false end true *) (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0), @eq bool (Feq_bool x y) true *) (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) rewrite eq_IZR_R0 with (1 := H'0); auto. (* Goal: forall _ : @eq R (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0), @eq bool (Feq_bool x y) true *) (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) intros H'0; Contradict H'0. (* Goal: not (@eq R (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0)) *) (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) case (Zmin (Fexp x) (Fexp y)); simpl in |- *; auto with real zarith. (* Goal: @eq R (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) apply Rplus_eq_reg_l with (r := FtoR radix y); auto with real. Qed. Theorem Feq_bool_correct_f : forall x y : float, Feq_bool x y = false -> ~ Feq x y. (* Goal: forall (x y : float) (_ : @eq bool (Feq_bool x y) false), not (Feq x y) *) intros x y H'; Contradict H'. (* Goal: not (@eq bool (Feq_bool x y) false) *) rewrite Feq_bool_correct_r; auto with arith. (* Goal: not (@eq bool true false) *) red in |- *; intros H'0; discriminate. Qed. Definition Flt_bool (x y : float) := match Fcompare x y with | Lt => true | _ => false end. Theorem Flt_bool_correct_t : forall x y : float, Flt_bool x y = true -> Flt x y. (* Goal: forall (x y : float) (_ : @eq bool (Flt_bool x y) true), Flt x y *) intros x y H'; red in |- *. (* Goal: Rlt (FtoRradix x) (FtoRradix y) *) apply Rplus_lt_reg_r with (r := (- y)%R). (* Goal: Rlt (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (Rplus (FtoRradix y) (Ropp (FtoRradix y))) *) repeat rewrite (Rplus_comm (- y)). (* Goal: Rlt (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (Rplus (FtoRradix y) (Ropp (FtoRradix y))) *) rewrite Rplus_opp_r. (* Goal: Rlt (Rplus (FtoRradix x) (Ropp (FtoRradix y))) (IZR Z0) *) change (x - y < 0)%R in |- *. (* Goal: Rlt (Rminus (FtoRradix x) (FtoRradix y)) (IZR Z0) *) rewrite <- Fdiff_correct. replace 0%R with (powerRZ radix (Zmin (Fexp x) (Fexp y)) * 0)%R; auto with real arith. (* Goal: Rlt (Rmult (IZR (Fdiff x y)) (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y)))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0)) *) rewrite (Rmult_comm (Fdiff x y)). (* Goal: Rlt (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR (Fdiff x y))) (Rmult (powerRZ (IZR radix) (Z.min (Fexp x) (Fexp y))) (IZR Z0)) *) apply Rmult_lt_compat_l; auto with real zarith. (* Goal: Rlt (IZR (Fdiff x y)) (IZR Z0) *) replace 0%R with (IZR 0); auto with real arith. (* Goal: Rlt (IZR (Fdiff x y)) (IZR Z0) *) apply Rlt_IZR; red in |- *. (* Goal: @eq comparison (Z.compare (Fdiff x y) Z0) Lt *) generalize H'; unfold Flt_bool, Fcompare in |- *. (* Goal: forall _ : @eq bool match Z.compare (Fdiff x y) Z0 with | Eq => false | Lt => true | Gt => false end true, @eq comparison (Z.compare (Fdiff x y) Z0) Lt *) case (Fdiff x y ?= 0)%Z; auto; intros; try discriminate. Qed. Theorem Flt_bool_correct_r : forall x y : float, Flt x y -> Flt_bool x y = true. (* Goal: forall (x y : float) (_ : @eq bool (Fle_bool x y) false), Flt y x *) intros x y H'. cut (0 < y - x)%R; auto with arith. 2: apply Rplus_lt_reg_l with (r := FtoRradix x); rewrite Rplus_0_r; rewrite Rplus_minus; auto with real. intros H'0. cut (Fdiff x y < 0)%R; auto with arith. intros H'1. cut (Fdiff x y < 0)%Z; auto with zarith. intros H'2; generalize (Zlt_compare _ _ H'2); unfold Flt_bool, Fcompare, Zcompare in |- *; case (Fdiff x y); auto with arith; intros; contradiction. apply lt_IZR; auto with arith. apply (Rlt_monotony_contra_exp radix) with (z := Zmin (Fexp x) (Fexp y)); auto with arith real; rewrite Rmult_0_l. rewrite Fdiff_correct; auto with real. Qed. Theorem Flt_bool_correct_f : forall x y : float, Flt_bool x y = false -> Fle y x. (* Goal: forall (x y : float) (_ : @eq bool (Fle_bool x y) false), Flt y x *) intros x y H'. (* Goal: Flt y x *) case (Rtotal_order (FtoRradix y) (FtoRradix x)); auto with real. (* Goal: forall _ : Rlt (FtoRradix y) (FtoRradix x), Fle y x *) (* Goal: forall _ : or (@eq R (FtoRradix y) (FtoRradix x)) (Rgt (FtoRradix y) (FtoRradix x)), Fle y x *) intros H'0; red in |- *; apply Rlt_le; auto with real. intros H'0; elim H'0; clear H'0; intros H'1. (* Goal: Fle x y *) (* Goal: Flt y x *) red in |- *; rewrite H'1; auto with real. (* Goal: Fle y x *) Contradict H'; rewrite Flt_bool_correct_r; auto with real. (* Goal: not (@eq bool true false) *) (* Goal: Fle x y *) red in |- *; intros H'; discriminate. Qed. Definition Fle_bool (x y : float) := match Fcompare x y with | Lt => true | Eq => true | _ => false end. Theorem Fle_bool_correct_t : forall x y : float, Fle_bool x y = true -> Fle x y. (* Goal: forall (x y : float) (_ : @eq bool (Fle_bool x y) false), Flt y x *) intros x y H'. (* Goal: @eq bool (Fle_bool x y) true *) cut (Feq x y \/ Flt x y). (* Goal: forall _ : or (Feq x y) (Flt x y), @eq bool (Fle_bool x y) true *) (* Goal: or (Feq x y) (Flt x y) *) intros H; case H; intros H1; auto with real. (* Goal: Fle x y *) (* Goal: Fle x y *) (* Goal: or (Feq x y) (Flt x y) *) red in |- *; apply Req_le; auto with real. (* Goal: Fle x y *) (* Goal: or (Feq x y) (Flt x y) *) red in |- *; apply Rlt_le; auto with real. (* Goal: or (Feq x y) (Flt x y) *) generalize H' (Feq_bool_correct_t x y) (Flt_bool_correct_t x y). (* Goal: forall _ : forall _ : Feq x y, @eq bool (Feq_bool x y) true, @eq bool (Fle_bool x y) true *) (* Goal: @eq bool (Fle_bool x y) true *) (* Goal: or (Feq x y) (Flt x y) *) unfold Fle_bool, Feq_bool, Flt_bool in |- *; case (Fcompare x y); auto. Qed. Theorem Fle_bool_correct_r : forall x y : float, Fle x y -> Fle_bool x y = true. (* Goal: forall (x y : float) (_ : @eq bool (Fle_bool x y) false), Flt y x *) intros x y H'. (* Goal: @eq bool (Fle_bool x y) true *) cut (Feq x y \/ Flt x y). (* Goal: forall _ : or (Feq x y) (Flt x y), @eq bool (Fle_bool x y) true *) (* Goal: or (Feq x y) (Flt x y) *) intros H; case H; intros H1; auto with real. (* Goal: @eq bool (Fle_bool x y) true *) (* Goal: @eq bool (Fle_bool x y) true *) (* Goal: or (Feq x y) (Flt x y) *) generalize (Feq_bool_correct_r x y). (* Goal: forall _ : forall _ : Feq x y, @eq bool (Feq_bool x y) true, @eq bool (Fle_bool x y) true *) (* Goal: @eq bool (Fle_bool x y) true *) (* Goal: or (Feq x y) (Flt x y) *) unfold Fle_bool, Feq_bool, Flt_bool in |- *; case (Fcompare x y); auto. generalize (Flt_bool_correct_r x y); unfold Fle_bool, Feq_bool, Flt_bool in |- *; case (Fcompare x y); auto with arith. (* Goal: or (Feq x y) (Flt x y) *) case H'; auto with arith. Qed. Theorem Fle_bool_correct_f : forall x y : float, Fle_bool x y = false -> Flt y x. (* Goal: forall (x y : float) (_ : @eq bool (Fle_bool x y) false), Flt y x *) intros x y H'. (* Goal: Flt y x *) case (Rtotal_order (FtoRradix y) (FtoRradix x)); auto with real. intros H'0; elim H'0; clear H'0; intros H'1. (* Goal: Flt y x *) Contradict H'. (* Goal: not (@eq bool (Fle_bool x y) false) *) rewrite Fle_bool_correct_r; auto with real. (* Goal: not (@eq bool true false) *) (* Goal: Fle x y *) red in |- *; intros H'; discriminate. (* Goal: Fle x y *) (* Goal: Flt y x *) red in |- *; rewrite H'1; auto with real. (* Goal: Flt y x *) Contradict H'. (* Goal: not (@eq bool (Fle_bool x y) false) *) rewrite Fle_bool_correct_r; auto with real. (* Goal: not (@eq bool true false) *) (* Goal: Fle x y *) red in |- *; intros H'; discriminate. (* Goal: Fle x y *) red in |- *; auto with real. Qed. Lemma Fle_Zle : forall n1 n2 d : Z, (n1 <= n2)%Z -> Fle (Float n1 d) (Float n2 d). (* Goal: forall (n1 n2 d : Z) (_ : Z.le n1 n2), Fle (Float n1 d) (Float n2 d) *) intros; unfold Fle, FtoRradix, FtoR in |- *; simpl in |- *; auto. (* Goal: Rle (Rmult (IZR n1) (powerRZ (IZR radix) d)) (Rmult (IZR n2) (powerRZ (IZR radix) d)) *) case Zle_lt_or_eq with (1 := H); intros H1. (* Goal: Rle (Rmult (IZR n1) (powerRZ (IZR radix) d)) (Rmult (IZR n2) (powerRZ (IZR radix) d)) *) (* Goal: Rle (Rmult (IZR n1) (powerRZ (IZR radix) d)) (Rmult (IZR n2) (powerRZ (IZR radix) d)) *) apply Rlt_le; auto with real. (* Goal: Rle (Rmult (IZR n1) (powerRZ (IZR radix) d)) (Rmult (IZR n2) (powerRZ (IZR radix) d)) *) rewrite <- H1; auto with real. Qed. Lemma Flt_Zlt : forall n1 n2 d : Z, (n1 < n2)%Z -> Flt (Float n1 d) (Float n2 d). (* Goal: forall (n1 n2 d : Z) (_ : Z.lt n1 n2), Flt (Float n1 d) (Float n2 d) *) intros; unfold Flt, FtoRradix, FtoR in |- *; simpl in |- *; auto with real. Qed. Lemma Fle_Fge : forall x y : float, Fle x y -> Fge y x. (* Goal: forall (x y : float) (_ : Fle x y), Fge y x *) unfold Fle, Fge in |- *; intros x y H'; auto with real. Qed. Lemma Fge_Zge : forall n1 n2 d : Z, (n1 >= n2)%Z -> Fge (Float n1 d) (Float n2 d). (* Goal: forall (n1 n2 d : Z) (_ : Z.ge n1 n2), Fge (Float n1 d) (Float n2 d) *) intros n1 n2 d H'; apply Fle_Fge; auto. (* Goal: Fle (Float n2 d) (Float n1 d) *) apply Fle_Zle; auto. (* Goal: Z.le n2 n1 *) apply Zge_le; auto. Qed. Lemma Flt_Fgt : forall x y : float, Flt x y -> Fgt y x. (* Goal: forall (x y : float) (_ : Flt x y), Fgt y x *) unfold Flt, Fgt in |- *; intros x y H'; auto. Qed. Lemma Fgt_Zgt : forall n1 n2 d : Z, (n1 > n2)%Z -> Fgt (Float n1 d) (Float n2 d). (* Goal: forall (n1 n2 d : Z) (_ : Z.gt n1 n2), Fgt (Float n1 d) (Float n2 d) *) intros n1 n2 d H'; apply Flt_Fgt; auto. (* Goal: Flt (Float n2 d) (Float n1 d) *) apply Flt_Zlt; auto. (* Goal: Z.lt n2 n1 *) apply Zgt_lt; auto. Qed. (* Arithmetic properties on F : Fle is reflexive, transitive, antisymmetric *) Lemma Fle_refl : forall x y : float, Feq x y -> Fle x y. (* Goal: forall (x y : float) (_ : Feq x y), Fle x y *) unfold Feq in |- *; unfold Fle in |- *; intros. (* Goal: Rle (FtoRradix x) (FtoRradix y) *) rewrite H; auto with real. Qed. Lemma Fle_trans : forall x y z : float, Fle x y -> Fle y z -> Fle x z. (* Goal: forall (x y z : float) (_ : Fle x y) (_ : Fle y z), Fle x z *) unfold Fle in |- *; intros. (* Goal: Rle (FtoRradix x) (FtoRradix z) *) apply Rle_trans with (r2 := FtoR radix y); auto. Qed. Theorem Rlt_Fexp_eq_Zlt : forall x y : float, (x < y)%R -> Fexp x = Fexp y -> (Fnum x < Fnum y)%Z. (* Goal: forall (x y : float) (_ : Rle (FtoRradix x) (FtoRradix y)) (_ : @eq Z (Fexp x) (Fexp y)), Z.le (Fnum x) (Fnum y) *) intros x y H' H'0. (* Goal: Z.lt (Fnum p) Z0 *) apply lt_IZR. apply (Rlt_monotony_contra_exp radix) with (z := Fexp x); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp x))) *) pattern (Fexp x) at 2 in |- *; rewrite H'0; auto. Qed. Theorem Rle_Fexp_eq_Zle : forall x y : float, (x <= y)%R -> Fexp x = Fexp y -> (Fnum x <= Fnum y)%Z. (* Goal: forall (x y : float) (_ : Rle (FtoRradix x) (FtoRradix y)) (_ : @eq Z (Fexp x) (Fexp y)), Z.le (Fnum x) (Fnum y) *) intros x y H' H'0. (* Goal: Z.le (Fnum p) Z0 *) apply le_IZR. apply (Rle_monotony_contra_exp radix) with (z := Fexp x); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (Rmult (IZR (Fnum y)) (powerRZ (IZR radix) (Fexp x))) *) pattern (Fexp x) at 2 in |- *; rewrite H'0; auto. Qed. Theorem LtR0Fnum : forall p : float, (0 < p)%R -> (0 < Fnum p)%Z. (* Goal: forall (p : float) (_ : Rle (FtoRradix p) (IZR Z0)), Z.le (Fnum p) Z0 *) intros p H'. (* Goal: Z.lt (Fnum p) Z0 *) apply lt_IZR. apply (Rlt_monotony_contra_exp radix) with (z := Fexp p); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR Z0) (powerRZ (IZR radix) (Fexp p))) *) simpl in |- *; rewrite Rmult_0_l; auto. Qed. Theorem LeR0Fnum : forall p : float, (0 <= p)%R -> (0 <= Fnum p)%Z. (* Goal: forall (p : float) (_ : Rle (FtoRradix p) (IZR Z0)), Z.le (Fnum p) Z0 *) intros p H'. (* Goal: Z.le (Fnum p) Z0 *) apply le_IZR. apply (Rle_monotony_contra_exp radix) with (z := Fexp p); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR Z0) (powerRZ (IZR radix) (Fexp p))) *) simpl in |- *; rewrite Rmult_0_l; auto. Qed. Theorem LeFnumZERO : forall x : float, (0 <= Fnum x)%Z -> (0 <= x)%R. (* Goal: forall (x : float) (_ : Z.le (Fnum x) Z0), Rle (FtoRradix x) (IZR Z0) *) intros x H'; unfold FtoRradix, FtoR in |- *. (* Goal: Rle (IZR Z0) (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) *) replace 0%R with (0%Z * 0%Z)%R; auto 6 with real zarith. Qed. Theorem R0LtFnum : forall p : float, (p < 0)%R -> (Fnum p < 0)%Z. (* Goal: forall (p : float) (_ : Rle (FtoRradix p) (IZR Z0)), Z.le (Fnum p) Z0 *) intros p H'. (* Goal: Z.lt (Fnum p) Z0 *) apply lt_IZR. apply (Rlt_monotony_contra_exp radix) with (z := Fexp p); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR Z0) (powerRZ (IZR radix) (Fexp p))) *) simpl in |- *; rewrite Rmult_0_l; auto. Qed. Theorem R0LeFnum : forall p : float, (p <= 0)%R -> (Fnum p <= 0)%Z. (* Goal: forall (p : float) (_ : Rle (FtoRradix p) (IZR Z0)), Z.le (Fnum p) Z0 *) intros p H'. (* Goal: Z.le (Fnum p) Z0 *) apply le_IZR. apply (Rle_monotony_contra_exp radix) with (z := Fexp p); auto with real arith. (* Goal: Rle (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR Z0) (powerRZ (IZR radix) (Fexp p))) *) simpl in |- *; rewrite Rmult_0_l; auto. Qed. Theorem LeZEROFnum : forall x : float, (Fnum x <= 0)%Z -> (x <= 0)%R. (* Goal: forall (x : float) (_ : Z.le (Fnum x) Z0), Rle (FtoRradix x) (IZR Z0) *) intros x H'; unfold FtoRradix, FtoR in |- *. (* Goal: Rle (Rmult (IZR (Fnum x)) (powerRZ (IZR radix) (Fexp x))) (IZR Z0) *) apply Ropp_le_cancel; rewrite Ropp_0; rewrite <- Ropp_mult_distr_l_reverse. (* Goal: Rle (IZR Z0) (Rmult (Ropp (IZR (Fnum x))) (powerRZ (IZR radix) (Fexp x))) *) replace 0%R with (- 0%Z * 0)%R; auto 6 with real zarith. Qed. End comparisons. Hint Resolve LeFnumZERO LeZEROFnum: float.
(**************************************************************************** IEEE754 : Fnorm Laurent Thery & Sylvie Boldo ******************************************************************************) Require Export Fbound. Section Fnormalized_Def. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Variable b : Fbound. Definition Fnormal (p : float) := Fbounded b p /\ (Zpos (vNum b) <= Zabs (radix * Fnum p))%Z. Theorem FnormalBounded : forall p : float, Fnormal p -> Fbounded b p. (* Goal: forall (p : float) (_ : Fsubnormal p), Z.lt (Z.abs (Z.mul radix (Fnum p))) (Zpos (vNum b)) *) intros p H; case H; auto. Qed. Theorem FnormalBound : forall p : float, Fnormal p -> (Zpos (vNum b) <= Zabs (radix * Fnum p))%Z. (* Goal: forall (p : float) (_ : Fsubnormal p), Z.lt (Z.abs (Z.mul radix (Fnum p))) (Zpos (vNum b)) *) intros p H; case H; auto. Qed. Hint Resolve FnormalBounded FnormalBound: float. Theorem FnormalNotZero : forall p : float, Fnormal p -> ~ is_Fzero p. (* Goal: forall (p : float) (_ : Fnormal p), not (is_Fzero p) *) unfold is_Fzero in |- *; intros p H; red in |- *; intros H1. (* Goal: False *) case H; rewrite H1. (* Goal: forall (_ : Fbounded b p) (_ : Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix Z0))), False *) replace (Zabs (radix * 0)) with 0%Z; auto with zarith. (* Goal: @eq Z Z0 (Z.abs (Z.mul radix Z0)) *) rewrite Zmult_comm; simpl in |- *; auto. Qed. Theorem FnormalFop : forall p : float, Fnormal p -> Fnormal (Fopp p). (* Goal: forall (p : float) (_ : Fnormal p), Fnormal (Fopp p) *) intros p H; split; auto with float. replace (Zabs (radix * Fnum (Fopp p))) with (Zabs (radix * Fnum p)); (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) auto with float. (* Goal: @eq Z (Z.abs (Z.mul radix (Fnum p))) (Z.abs (Z.mul radix (Fnum (Fopp p)))) *) case p; simpl in |- *; auto with zarith. intros Fnum1 Fexp1; rewrite <- Zopp_mult_distr_r; apply sym_equal; apply Zabs_Zopp. Qed. Theorem FnormalFabs : forall p : float, Fnormal p -> Fnormal (Fabs p). (* Goal: forall (p : float) (_ : Fsubnormal p), Fsubnormal (Fabs p) *) intros p; case p; intros a e H; split; auto with float. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (Fnum (Fabs (Float a e))))) *) simpl in |- *; case H; intros H1 H2; simpl in |- *; auto. (* Goal: Z.le (Zpos (vNum b)) (Z.mul (Z.abs (Fnum p)) radix) *) rewrite <- (Zabs_eq radix); auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul (Z.abs radix) (Z.abs a))) (Zpos (vNum b)) *) rewrite <- Zabs_Zmult. (* Goal: Z.lt (Z.abs (Z.abs (Z.mul radix a))) (Zpos (vNum b)) *) rewrite (fun x => Zabs_eq (Zabs x)); auto with float zarith. Qed. Definition pPred x := Zpred (Zpos x). Theorem maxMax1 : forall (p : float) (z : Z), Fbounded b p -> (Fexp p <= z)%Z -> (Fabs p <= Float (pPred (vNum b)) z)%R. (* Goal: forall (p : float) (z : Z) (_ : Fbounded b p) (_ : Z.le (Fexp p) z), Rle (FtoRradix (Fabs p)) (FtoRradix (Float (pPred (vNum b)) z)) *) intros p z H H0; unfold FtoRradix in |- *. rewrite <- (FshiftCorrect _ radixMoreThanOne (Zabs_nat (z - Fexp p)) (Float (pPred (vNum b)) z)). (* Goal: Rle (FtoR radix (Fabs p)) (FtoR radix (Fshift radix (Z.abs_nat (Z.sub z (Fexp p))) (Float (pPred (vNum b)) z))) *) unfold FtoR, Fabs in |- *; simpl in |- *; auto with zarith. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (Z.mul (pPred (vNum b)) (Zpower_nat radix (Z.abs_nat (Z.sub z (Fexp p)))))) (powerRZ (IZR radix) (Z.sub z (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p))))))) *) rewrite Rmult_IZR; rewrite Zpower_nat_Z_powerRZ; auto with zarith. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p)))))) (powerRZ (IZR radix) (Z.sub z (Z.of_nat (Z.abs_nat (Z.sub z (Fexp p))))))) *) repeat rewrite inj_abs; auto with zarith. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.sub z (Fexp p)))) (powerRZ (IZR radix) (Z.sub z (Z.sub z (Fexp p))))) *) replace (z - (z - Fexp p))%Z with (Fexp p); [ idtac | ring ]. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.sub z (Fexp p)))) (powerRZ (IZR radix) (Fexp p))) *) rewrite Rmult_assoc; rewrite <- powerRZ_add; auto with real zarith. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.add (Z.sub z (Fexp p)) (Fexp p)))) *) replace (z - Fexp p + Fexp p)%Z with z; [ idtac | ring ]. (* Goal: Rle (Rmult (IZR (Z.abs (Fnum p))) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) z)) *) apply Rle_trans with (pPred (vNum b) * powerRZ radix (Fexp p))%R. apply Rle_monotone_exp; auto with zarith; repeat rewrite Rmult_IZR; apply Rle_IZR; unfold pPred in |- *; apply Zle_Zpred; auto with float real zarith. (* Goal: Rle (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Fexp p))) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) z)) *) apply Rmult_le_compat_l; auto with real zarith. replace 0%R with (IZR 0); auto with real; apply Rle_IZR; unfold pPred in |- *; apply Zle_Zpred; auto with float zarith. (* Goal: Rle (powerRZ (IZR radix) (Fexp p)) (powerRZ (IZR radix) z) *) apply Rle_powerRZ; auto with float real zarith. Qed. Theorem FnormalBoundAbs : forall p : float, Fnormal p -> (Float (pPred (vNum b)) (Zpred (Fexp p)) < Fabs p)%R. (* Goal: forall (p : float) (_ : Fnormal p), Rle (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp p))))) (FtoRradix (Fabs p)) *) intros p H'; unfold FtoRradix, FtoR in |- *; simpl in |- *. pattern (Fexp p) at 2 in |- *; replace (Fexp p) with (Zsucc (Zpred (Fexp p))); [ rewrite powerRZ_Zs; auto with real zarith | unfold Zsucc, Zpred in |- *; ring ]. (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (IZR (Z.abs (Fnum p))) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred (Fexp p))))) *) repeat rewrite <- Rmult_assoc. (* Goal: Rlt (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) *) apply Rmult_lt_compat_r; auto with real arith. (* Goal: Rlt (IZR (pPred (vNum b))) (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) *) rewrite <- Rmult_IZR; apply Rlt_IZR. unfold pPred in |- *; cut (Zpos (vNum b) <= Zabs (Fnum p) * radix)%Z; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. rewrite <- (Zabs_eq radix); auto with float zarith; rewrite <- Zabs_Zmult; rewrite Zmult_comm; auto with float real zarith. Qed. Definition Fsubnormal (p : float) := Fbounded b p /\ Fexp p = (- dExp b)%Z /\ (Zabs (radix * Fnum p) < Zpos (vNum b))%Z. Theorem FsubnormalFbounded : forall p : float, Fsubnormal p -> Fbounded b p. (* Goal: forall (p : float) (_ : Fsubnormal p), Z.lt (Z.abs (Z.mul radix (Fnum p))) (Zpos (vNum b)) *) intros p H; case H; auto. Qed. Theorem FsubnormalFexp : forall p : float, Fsubnormal p -> Fexp p = (- dExp b)%Z. (* Goal: forall (p : float) (_ : Fsubnormal p), Z.lt (Z.abs (Z.mul radix (Fnum p))) (Zpos (vNum b)) *) intros p H; case H; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. Qed. Theorem FsubnormalBound : forall p : float, Fsubnormal p -> (Zabs (radix * Fnum p) < Zpos (vNum b))%Z. (* Goal: forall (p : float) (_ : Fsubnormal p), Z.lt (Z.abs (Z.mul radix (Fnum p))) (Zpos (vNum b)) *) intros p H; case H; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. Qed. Hint Resolve FsubnormalFbounded FsubnormalBound FsubnormalFexp: float. Theorem FsubnormFopp : forall p : float, Fsubnormal p -> Fsubnormal (Fopp p). (* Goal: forall (p : float) (_ : Fsubnormal p), Fsubnormal (Fopp p) *) intros p H'; repeat split; simpl in |- *; auto with zarith float. (* Goal: Z.lt (Z.abs (Z.opp (Fnum p))) (Zpos (vNum b)) *) (* Goal: Z.lt (Z.abs (Z.mul radix (Z.opp (Fnum p)))) (Zpos (vNum b)) *) rewrite Zabs_Zopp; auto with float. (* Goal: Z.lt (Z.abs (Z.opp (Fnum p))) (Zpos (vNum b)) *) (* Goal: Z.lt (Z.abs (Z.mul radix (Z.opp (Fnum p)))) (Zpos (vNum b)) *) rewrite <- Zopp_mult_distr_r; rewrite Zabs_Zopp; auto with float. Qed. Theorem FsubnormFabs : forall p : float, Fsubnormal p -> Fsubnormal (Fabs p). (* Goal: forall (p : float) (_ : Fsubnormal p), Fsubnormal (Fabs p) *) intros p; case p; intros a e H; split; auto with float. (* Goal: and (@eq Z (Fexp (Fabs (Float a e))) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum (Fabs (Float a e))))) (Zpos (vNum b))) *) simpl in |- *; split; auto with float. (* Goal: Z.lt (Z.abs (Z.mul radix a)) (Zpos (vNum b)) *) case H; intros H1 (H2, H3); auto. (* Goal: Z.le (Zpos (vNum b)) (Z.mul (Z.abs (Fnum p)) radix) *) rewrite <- (Zabs_eq radix); auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul (Z.abs radix) (Z.abs a))) (Zpos (vNum b)) *) rewrite <- Zabs_Zmult. (* Goal: Z.lt (Z.abs (Z.abs (Z.mul radix a))) (Zpos (vNum b)) *) rewrite (fun x => Zabs_eq (Zabs x)); auto with float zarith. (* Goal: Z.lt (Z.abs (Z.mul radix a)) (Zpos (vNum b)) *) case H; intros H1 (H2, H3); auto. Qed. Theorem FsubnormalUnique : forall p q : float, Fsubnormal p -> Fsubnormal q -> p = q :>R -> p = q. (* Goal: forall (p q : float) (_ : Fnormal p) (_ : Fnormal q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float p q *) intros p q H' H'0 H'1. (* Goal: @eq float p q *) apply FtoREqInv2 with (radix := radix); auto. (* Goal: @eq Z (Fexp p) (Fexp q) *) generalize H' H'0; unfold Fsubnormal in |- *; auto with zarith. Qed. Theorem FsubnormalLt : forall p q : float, Fsubnormal p -> Fsubnormal q -> (p < q)%R -> (Fnum p < Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fnormal p) (_ : Fnormal q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float p q *) intros p q H' H'0 H'1. (* Goal: Z.lt (Fnum p) (Fnum q) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with zarith. (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply trans_equal with (- dExp b)%Z. (* Goal: @eq Z (Fexp p) (Z.opp (Z.of_N (dExp b))) *) (* Goal: @eq Z (Z.opp (Z.of_N (dExp b))) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case H'; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. (* Goal: @eq Z (Z.opp (Z.of_N (dExp b))) (Fexp q) *) apply sym_equal; case H'0; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. Qed. Theorem LtFsubnormal : forall p q : float, Fsubnormal p -> Fsubnormal q -> (Fnum p < Fnum q)%Z -> (p < q)%R. (* Goal: forall (p q : float) (_ : Fnormal p) (_ : Fnormal q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float p q *) intros p q H' H'0 H'1. case (Rtotal_order p q); auto; intros Test; case Test; clear Test; intros Test; Contradict H'1. (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold FtoRradix in Test; rewrite sameExpEq with (2 := Test); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply trans_equal with (- dExp b)%Z. (* Goal: @eq Z (Fexp p) (Z.opp (Z.of_N (dExp b))) *) (* Goal: @eq Z (Z.opp (Z.of_N (dExp b))) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case H'; auto. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. (* Goal: @eq Z (Z.opp (Z.of_N (dExp b))) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply sym_equal; case H'0. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H1 H2; case H2; auto. (* Goal: not (Z.lt (Fnum p) nNormMin) *) apply Zle_not_lt. (* Goal: Z.le (Fnum q) (Fnum p) *) apply Zlt_le_weak. (* Goal: Z.lt (Fnum p) (Fnum q) *) apply FsubnormalLt; auto. Qed. Definition Fcanonic (a : float) := Fnormal a \/ Fsubnormal a. Theorem FcanonicBound : forall p : float, Fcanonic p -> Fbounded b p. (* Goal: forall (p : float) (_ : Fcanonic p), Fbounded b p *) intros p H; case H; auto with float. Qed. Hint Resolve FcanonicBound: float. Theorem pUCanonic_absolu : forall p : float, Fcanonic p -> (Zabs (Fnum p) < Zpos (vNum b))%Z. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) auto with float. Qed. Theorem FcanonicFopp : forall p : float, Fcanonic p -> Fcanonic (Fopp p). (* Goal: forall (p : float) (_ : Fcanonic p), Fcanonic (Fopp p) *) intros p H'; case H'; intros H'1. (* Goal: Fcanonic (Fopp p) *) (* Goal: Fcanonic (Fopp p) *) left; apply FnormalFop; auto. (* Goal: Fcanonic (Fopp p) *) right; apply FsubnormFopp; auto. Qed. Theorem FcanonicFabs : forall p : float, Fcanonic p -> Fcanonic (Fabs p). (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros p H'; case H'; clear H'; auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros H; left; auto with float. (* Goal: Fnormal (Fabs p) *) (* Goal: forall _ : Fsubnormal p, Fcanonic (Fabs p) *) apply FnormalFabs; auto. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros H; right; auto with float. (* Goal: Fsubnormal (Fabs p) *) apply FsubnormFabs; auto. Qed. Theorem NormalNotSubNormal : forall p : float, ~ (Fnormal p /\ Fsubnormal p). (* Goal: forall p : float, not (and (Fnormal p) (Fsubnormal p)) *) intros p; red in |- *; intros H; elim H; intros H0 H1; clear H. absurd (Zabs (radix * Fnum p) < Zpos (vNum b))%Z; auto with float zarith. Qed. Theorem MaxFloat : forall x : float, Fbounded b x -> (Rabs x < Float (Zpos (vNum b)) (Fexp x))%R. (* Goal: forall (x : float) (_ : Fbounded b x), Rlt (Rabs (FtoRradix x)) (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) *) intros. (* Goal: Rlt (Rabs (FtoRradix x)) (FtoRradix (Float (Zpos (vNum b)) (Fexp x))) *) replace (Rabs x) with (FtoR radix (Fabs x)). (* Goal: @eq R (FtoR radix (Fabs x)) (Rabs (FtoRradix x)) *) unfold FtoRradix in |- *. (* Goal: Rlt (FtoR radix (Fabs x)) (FtoR radix (Float (Zpos (vNum b)) (Fexp x))) *) (* Goal: @eq R (FtoR radix (Fabs x)) (Rabs (FtoRradix x)) *) apply maxMax with (b := b); auto with *. (* Goal: @eq R (FtoR radix (Fabs x)) (Rabs (FtoRradix x)) *) unfold FtoRradix in |- *. (* Goal: @eq R (FtoR radix (Fabs x)) (Rabs (FtoR radix x)) *) apply Fabs_correct; auto with *. Qed. (* What depends of the precision *) Variable precision : nat. Hypothesis precisionNotZero : precision <> 0. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem FboundNext : forall p : float, Fbounded b p -> exists q : float, Fbounded b q /\ q = Float (Zsucc (Fnum p)) (Fexp p) :>R. (* Goal: forall (p : float) (_ : Fcanonic p), @eq float (Fnormalize p) p *) intros p H'. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) case (Zle_lt_or_eq (Zsucc (Fnum p)) (Zpos (vNum b))); auto with float. (* Goal: Z.le (Z.succ (Fnum p)) (Zpos (vNum b)) *) (* Goal: forall _ : Z.lt (Z.succ (Fnum p)) (Zpos (vNum b)), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix q) (FtoRradix (Float (Z.succ (Fnum p)) (Fexp p))))) *) (* Goal: forall _ : @eq Z (Z.succ (Fnum p)) (Zpos (vNum b)), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix q) (FtoRradix (Float (Z.succ (Fnum p)) (Fexp p))))) *) case (Zle_or_lt 0 (Fnum p)); intros H1. (* Goal: Z.le nNormMin (Fnum p) *) rewrite <- (Zabs_eq (Fnum p)); auto with float zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zle_trans with 0%Z; auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros H'0; exists (Float (Zsucc (Fnum p)) (Fexp p)); split; auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) repeat split; simpl in |- *; auto with float. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case (Zle_or_lt 0 (Fnum p)); intros H1; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.abs (Z.succ (Fnum p))) (Zpos (vNum b)) *) (* Goal: forall _ : @eq Z (Z.succ (Fnum p)) (Zpos (vNum b)), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix q) (FtoRradix (Float (Z.succ (Fnum p)) (Fexp p))))) *) apply Zlt_trans with (Zabs (Fnum p)); auto with float zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat rewrite Zabs_eq_opp; auto with zarith. intros H'0; exists (Float (Zpower_nat radix (pred precision)) (Zsucc (Fexp p))); split; auto. (* Goal: Fbounded b (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p))) *) (* Goal: @eq R (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p)))) (FtoRradix (Float (Z.succ (Fnum p)) (Fexp p))) *) repeat split; simpl in |- *; auto with zarith arith float. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite H'0; rewrite pGivesBound. (* Goal: @eq R (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p)))) (FtoRradix (Float (Zpower_nat radix precision) (Fexp p))) *) pattern precision at 2 in |- *; replace precision with (1 + pred precision). (* Goal: @eq R (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p)))) (FtoRradix (Float (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision))) (Fexp p))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) rewrite Zpower_nat_is_exp. (* Goal: @eq R (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p)))) (FtoRradix (Float (Z.mul (Zpower_nat radix (S O)) (Zpower_nat radix (Init.Nat.pred precision))) (Fexp p))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) rewrite Zpower_nat_1. (* Goal: @eq R (FtoRradix (Float (Zpower_nat radix (Init.Nat.pred precision)) (Z.succ (Fexp p)))) (FtoRradix (Float (Z.mul radix (Zpower_nat radix (Init.Nat.pred precision))) (Fexp p))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (powerRZ (IZR radix) (Z.succ (Fexp p)))) (Rmult (IZR (Z.mul radix (Zpower_nat radix (Init.Nat.pred precision)))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) rewrite powerRZ_Zs; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (Rmult (IZR radix) (powerRZ (IZR radix) (Fexp p)))) (Rmult (IZR (Z.mul radix (Zpower_nat radix (Init.Nat.pred precision)))) (powerRZ (IZR radix) (Fexp p))) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) rewrite Rmult_IZR; ring. (* Goal: @eq nat precision (Init.Nat.add (Init.Nat.pred precision) (S O)) *) generalize precisionNotZero; case precision; simpl in |- *; auto with arith. (* Goal: forall _ : not (@eq nat O O), @eq nat (S O) O *) intros H'1; case H'1; auto. Qed. Theorem digitPredVNumiSPrecision : digit radix (Zpred (Zpos (vNum b))) = precision. (* Goal: @eq nat (digit radix (Zpos (vNum b))) (S precision) *) apply digitInv; auto. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. Qed. Theorem digitVNumiSPrecision : digit radix (Zpos (vNum b)) = S precision. (* Goal: @eq nat (digit radix (Zpos (vNum b))) (S precision) *) apply digitInv; auto. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite pGivesBound; auto with zarith. Qed. Theorem vNumPrecision : forall n : Z, digit radix n <= precision -> (Zabs n < Zpos (vNum b))%Z. (* Goal: forall (n : Z) (_ : le (digit radix n) precision), Z.lt (Z.abs n) (Zpos (vNum b)) *) intros n H'. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite <- (Zabs_eq (Zpos (vNum b))); auto with zarith. (* Goal: Z.lt (Z.abs n) (Z.abs (Zpos (vNum b))) *) apply digit_anti_monotone_lt with (n := radix); auto. (* Goal: lt (digit radix n) (digit radix (Zpos (vNum b))) *) rewrite digitVNumiSPrecision; auto with arith. Qed. Theorem pGivesDigit : forall p : float, Fbounded b p -> Fdigit radix p <= precision. (* Goal: forall (p : float) (_ : Fsubnormal p), lt (Fdigit radix p) precision *) intros p H; unfold Fdigit in |- *. (* Goal: le (S (digit radix (Fnum p))) precision *) rewrite <- digitPredVNumiSPrecision. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply digit_monotone; auto with zarith. (* Goal: Z.le (Z.abs (Z.mul (Fnum p) (Zpower_nat radix (S O)))) (Z.abs (Z.pred (Zpos (vNum b)))) *) (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite (fun x => Zabs_eq (Zpred x)); auto with float zarith. Qed. Theorem digitGivesBoundedNum : forall p : float, Fdigit radix p <= precision -> (Zabs (Fnum p) < Zpos (vNum b))%Z. (* Goal: forall (p : float) (_ : le (Fdigit radix p) precision), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros p H; apply vNumPrecision; auto. Qed. Theorem FboundedOne : forall z : Z, (- dExp b <= z)%Z -> Fbounded b (Float 1%nat z). (* Goal: forall (z : Z) (_ : Z.le (Z.opp (Z.of_N (dExp b))) z), Fbounded b (Float (Z.of_nat (S O)) z) *) intros z H'; repeat (split; simpl in |- *; auto with zarith). (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) rewrite pGivesBound; auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zlt_le_trans with (Zpower_nat radix 1); auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zpower_nat_1; auto with zarith. Qed. Theorem FboundedMboundPos : forall z m : Z, (0 <= m)%Z -> (m <= Zpower_nat radix precision)%Z -> (- dExp b <= z)%Z -> exists c : float, Fbounded b c /\ c = (m * powerRZ radix z)%R :>R. (* Goal: forall (z m : Z) (_ : Z.le Z0 m) (_ : Z.le m (Zpower_nat radix precision)) (_ : Z.le (Z.opp (Z.of_N (dExp b))) z), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) intros z m H' H'0 H'1; case (Zle_lt_or_eq _ _ H'0); intros H'2. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) exists (Float m z); split; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat split; simpl in |- *; auto with zarith. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) rewrite Zabs_eq; auto; rewrite pGivesBound; auto. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) case (FboundNext (Float (Zpred (Zpos (vNum b))) z)); auto with float. (* Goal: forall (x : float) (_ : and (Fbounded b x) (@eq R (FtoRradix x) (FtoRradix (Float (Z.succ (Fnum (Float (Z.pred (Zpos (vNum b))) z))) (Fexp (Float (Z.pred (Zpos (vNum b))) z)))))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) intros f' (H1, H2); exists f'; split; auto. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite H2; rewrite pGivesBound. (* Goal: @eq R (FtoRradix (Float (Z.succ (Fnum (Float (Z.pred (Zpower_nat radix precision)) z))) (Fexp (Float (Z.pred (Zpower_nat radix precision)) z)))) (Rmult (IZR m) (powerRZ (IZR radix) z)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; auto. (* Goal: @eq R (Rmult (IZR (Z.succ (Z.pred (Zpower_nat radix precision)))) (powerRZ (IZR radix) z)) (Rmult (IZR m) (powerRZ (IZR radix) z)) *) rewrite <- Zsucc_pred; rewrite <- H'2; auto; ring. Qed. Theorem FboundedMbound : forall z m : Z, (Zabs m <= Zpower_nat radix precision)%Z -> (- dExp b <= z)%Z -> exists c : float, Fbounded b c /\ c = (m * powerRZ radix z)%R :>R. (* Goal: forall (z m : Z) (_ : Z.le (Z.abs m) (Zpower_nat radix precision)) (_ : Z.le (Z.opp (Z.of_N (dExp b))) z), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) intros z m H H0. (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) case (Zle_or_lt 0 m); intros H1. (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) case (FboundedMboundPos z (Zabs m)); auto; try rewrite Zabs_eq; auto. (* Goal: forall (x : float) (_ : and (Fbounded b x) (@eq R (FtoRradix x) (Rmult (IZR m) (powerRZ (IZR radix) z)))), @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) (* Goal: @ex float (fun c : float => and (Fbounded b c) (@eq R (FtoRradix c) (Rmult (IZR m) (powerRZ (IZR radix) z)))) *) intros f (H2, H3); exists f; split; auto. case (FboundedMboundPos z (Zabs m)); auto; try rewrite Zabs_eq_opp; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros f (H2, H3); exists (Fopp f); split; auto with float. rewrite (Fopp_correct radix); auto with arith; fold FtoRradix in |- *; rewrite H3. (* Goal: @eq R (Ropp (Rmult (IZR (Z.opp m)) (powerRZ (IZR radix) z))) (Rmult (IZR m) (powerRZ (IZR radix) z)) *) rewrite Ropp_Ropp_IZR; ring. Qed. Theorem FnormalPrecision : forall p : float, Fnormal p -> Fdigit radix p = precision. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) intros p H; apply le_antisym; auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply pGivesDigit; auto with float. apply le_S_n. rewrite <- digitVNumiSPrecision. (* Goal: forall _ : le (Fdigit radix p) precision, @eq nat precision (Init.Nat.add (S O) (Init.Nat.add (Init.Nat.pred (Fdigit radix p)) (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) unfold Fdigit in |- *. (* Goal: le (S (digit radix (Fnum p))) (digit radix (Z.pred (Zpos (vNum b)))) *) replace (S (digit radix (Fnum p))) with (digit radix (Fnum p) + 1). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite <- digitAdd; auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply digit_monotone; auto with float. rewrite (fun x => Zabs_eq (Zpos x)); auto with float zarith. (* Goal: Z.le (Z.abs (Z.mul (Fnum p) (Zpower_nat radix (S O)))) (Z.pred (Zpos (vNum b))) *) (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite Zmult_comm; rewrite Zpower_nat_1; auto with float zarith. red in |- *; intros H1; case H. intros H0 H2; Contradict H2; rewrite H1. (* Goal: forall (_ : Fbounded b p) (_ : Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix Z0))), False *) replace (Zabs (radix * 0)) with 0%Z; auto with zarith. (* Goal: @eq Z Z0 (Z.abs (Z.mul radix Z0)) *) rewrite Zmult_comm; simpl in |- *; auto. (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite plus_comm; simpl in |- *; auto. Qed. Hint Resolve FnormalPrecision: float. Theorem FnormalUnique : forall p q : float, Fnormal p -> Fnormal q -> p = q :>R -> p = q. (* Goal: forall (p q : float) (_ : Fnormal p) (_ : Fnormal q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float p q *) intros p q H' H'0 H'1. (* Goal: @eq float p q *) apply (FdigitEq radix); auto. (* Goal: not (is_Fzero p) *) (* Goal: @eq nat (Fdigit radix p) (Fdigit radix q) *) apply FnormalNotZero; auto. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply trans_equal with (y := precision); auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply sym_equal; auto with float. Qed. Theorem FnormalLtPos : forall p q : float, Fnormal p -> Fnormal q -> (0 <= p)%R -> (p < q)%R -> (Fexp p < Fexp q)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. case (Zle_or_lt (Fexp q) (Fexp p)); auto. intros H'3; right. case (Zle_lt_or_eq _ _ H'3); intros H'4. 2: split; auto. (* Goal: Z.lt (Fnum p) (Fnum q) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) 2: apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with zarith. absurd (Fnum (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p) < Fnum q)%Z; auto. (* Goal: Z.lt (Fnum p) (Fnum q) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) 2: apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with zarith. 2: unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) 2: unfold Fshift in |- *; simpl in |- *; auto with zarith. 2: replace (Z_of_nat (Zabs_nat (Fexp p - Fexp q))) with (Fexp p - Fexp q)%Z; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) 2: cut (0 < Fexp p - Fexp q)%Z; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) 2: case (Fexp p - Fexp q)%Z; simpl in |- *; auto with zarith. 2: intros p0; rewrite (inject_nat_convert (Zpos p0)); auto with arith. 2: intros p0 H'5; discriminate. red in |- *; intros H'5. absurd (Fdigit radix (Fshift radix (Zabs_nat (Fexp p - Fexp q)) p) <= Fdigit radix q); auto with arith. rewrite FshiftFdigit; auto with arith. replace (Fdigit radix p) with precision. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) replace (Fdigit radix q) with precision; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) cut (0 < Fexp p - Fexp q)%Z; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case (Fexp p - Fexp q)%Z; simpl in |- *; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros p0 H'6; generalize (convert_not_O p0); auto with zarith. intros p0 H'6; discriminate. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply sym_equal; auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply sym_equal; auto with float. apply FnormalNotZero; auto with arith. unfold Fdigit in |- *; apply digit_monotone; auto with arith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply LeR0Fnum with (radix := radix); auto with zarith. (* Goal: Rle (IZR Z0) (FtoRradix q) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply Rle_trans with (r2 := FtoRradix p); auto with real. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply LeR0Fnum with (radix := radix); auto with zarith. unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. Qed. Theorem FnormalLtNeg : forall p q : float, Fnormal p -> Fnormal q -> (q <= 0)%R -> (p < q)%R -> (Fexp q < Fexp p)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. cut ((Fexp (Fopp q) < Fexp (Fopp p))%Z \/ Fexp (Fopp q) = Fexp (Fopp p) /\ (Fnum (Fopp q) < Fnum (Fopp p))%Z). (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) simpl in |- *. intros H'3; elim H'3; clear H'3; intros H'3; [ idtac | elim H'3; clear H'3; intros H'3 H'4 ]; auto; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) right; split; auto with zarith. apply FnormalLtPos; try apply FnormalFop; auto; unfold FtoRradix in |- *; repeat rewrite Fopp_correct; replace 0%R with (-0)%R; auto with real. Qed. Definition nNormMin := Zpower_nat radix (pred precision). Theorem nNormPos : (0 < nNormMin)%Z. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold nNormMin in |- *; auto with zarith. Qed. Theorem digitnNormMin : digit radix nNormMin = precision. unfold nNormMin, Fdigit in |- *; simpl in |- *; apply digitInv; auto with zarith arith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. Qed. Theorem nNrMMimLevNum : (nNormMin <= Zpos (vNum b))%Z. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: Z.lt nNormMin (Zpower_nat radix precision) *) (* Goal: Z.le Z0 nNormMin *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) unfold nNormMin in |- *; simpl in |- *; auto with zarith arith. Qed. Hint Resolve nNrMMimLevNum: arith. Definition firstNormalPos := Float nNormMin (- dExp b). Theorem firstNormalPosNormal : Fnormal firstNormalPos. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat split; unfold firstNormalPos in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt nNormMin (Zpower_nat radix precision) *) (* Goal: Z.le Z0 nNormMin *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) unfold nNormMin in |- *; simpl in |- *; auto with zarith arith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zlt_le_weak; auto with zarith. (* Goal: Z.lt Z0 nNormMin *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) apply nNormPos. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: Z.le (Zpower_nat radix precision) (Z.abs (Z.mul radix nNormMin)) *) replace precision with (pred precision + 1). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zpower_nat_is_exp; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zpower_nat_1; auto with zarith. rewrite (fun x => Zmult_comm x radix); unfold nNormMin in |- *; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold nNormMin in |- *; auto with zarith. Qed. Theorem pNormal_absolu_min : forall p : float, Fnormal p -> (nNormMin <= Zabs (Fnum p))%Z. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros p H; apply Zmult_le_reg_r with (p := radix); auto with zarith. (* Goal: Z.le (Z.mul nNormMin radix) (Z.mul (Z.abs (Fnum p)) radix) *) unfold nNormMin in |- *. (* Goal: Rle (IZR (Zpos (vNum b))) (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (IZR radix)) *) pattern radix at 2 in |- *; rewrite <- (Zpower_nat_1 radix). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite <- Zpower_nat_is_exp; auto with zarith. (* Goal: Rle (IZR (Zpos (vNum b))) (IZR (Zpower_nat radix (Init.Nat.add (Init.Nat.pred precision) (S O)))) *) replace (pred precision + 1) with precision. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) rewrite <- pGivesBound; auto with float. (* Goal: Z.le (Zpos (vNum b)) (Z.mul (Z.abs (Fnum p)) radix) *) rewrite <- (Zabs_eq radix); auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) rewrite <- Zabs_Zmult; rewrite Zmult_comm; auto with float. generalize precisionNotZero; case precision; simpl in |- *; try (intros tmp; Contradict tmp; auto; fail); intros; (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite plus_comm; simpl in |- *; auto. Qed. Theorem maxMaxBis : forall (p : float) (z : Z), Fbounded b p -> (Fexp p < z)%Z -> (Fabs p < Float nNormMin z)%R. intros p z H' H'0; apply Rlt_le_trans with (FtoR radix (Float (Zpos (vNum b)) (Zpred z))). unfold FtoRradix in |- *; apply maxMax; auto with zarith; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold Zpred in |- *; auto with zarith. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) unfold FtoRradix, FtoR, nNormMin in |- *; simpl in |- *. pattern z at 2 in |- *; replace z with (Zsucc (Zpred z)); [ rewrite powerRZ_Zs; auto with real zarith | unfold Zsucc, Zpred in |- *; ring ]. (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.pred z))) (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred z)))) *) rewrite <- Rmult_assoc. (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) *) apply Rmult_le_compat_r; auto with real arith. (* Goal: Rle (IZR (Zpos (vNum b))) (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (IZR radix)) *) pattern radix at 2 in |- *; rewrite <- (Zpower_nat_1 radix). (* Goal: Rle (IZR (Zpos (vNum b))) (Rmult (IZR (Zpower_nat radix (Init.Nat.pred precision))) (IZR (Zpower_nat radix (S O)))) *) rewrite <- Rmult_IZR. (* Goal: Rle (IZR (Zpos (vNum b))) (IZR (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) (Zpower_nat radix (S O)))) *) rewrite <- Zpower_nat_is_exp. (* Goal: Rle (IZR (Zpos (vNum b))) (IZR (Zpower_nat radix (Init.Nat.add (Init.Nat.pred precision) (S O)))) *) replace (pred precision + 1) with precision. (* Goal: Rle (IZR (Zpos (vNum b))) (IZR (Zpower_nat radix precision)) *) (* Goal: @eq nat precision (Init.Nat.add (Init.Nat.pred precision) (S O)) *) replace (INR (nat_of_P (vNum b))) with (IZR (Zpos (vNum b))). (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Zpower_nat radix precision)) *) (* Goal: @eq nat precision (Init.Nat.add (S O) (Init.Nat.add (Init.Nat.pred (Fdigit radix p)) (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) rewrite pGivesBound; auto with real. (* Goal: @eq R (IZR (Zpos (vNum b))) (INR (Pos.to_nat (vNum b))) *) (* Goal: @eq nat precision (Init.Nat.add (Init.Nat.pred precision) (S O)) *) simpl; unfold IZR; rewrite <- INR_IPR; auto. (* Goal: @eq nat precision (Init.Nat.add (Init.Nat.pred precision) (S O)) *) generalize precisionNotZero; case precision; simpl in |- *; auto with arith. (* Goal: forall _ : not (@eq nat O O), @eq nat O (S O) *) (* Goal: forall (n : nat) (_ : not (@eq nat (S n) O)), @eq nat (S n) (Init.Nat.add n (S O)) *) intros H'1; Contradict H'1; auto. (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) intros; rewrite plus_comm; simpl in |- *; auto. Qed. Theorem FnormalLtFirstNormalPos : forall p : float, Fnormal p -> (0 <= p)%R -> (firstNormalPos <= p)%R. (* Goal: forall (p : float) (_ : Fnormal p) (_ : Rle (FtoRradix p) (IZR Z0)), Rle (FtoRradix p) (FtoRradix (Fopp firstNormalPos)) *) intros p H' H'0. (* Goal: Rle (FtoRradix firstNormalPos) (FtoRradix p) *) case (Rle_or_lt firstNormalPos p); intros Lt0; auto with real. (* Goal: Rle (FtoRradix firstNormalPos) (FtoRradix p) *) case (FnormalLtPos p firstNormalPos); auto. (* Goal: Fnormal firstNormalPos *) (* Goal: forall _ : Z.lt (Fexp p) (Fexp firstNormalPos), Rle (FtoRradix firstNormalPos) (FtoRradix p) *) (* Goal: forall _ : and (@eq Z (Fexp p) (Fexp firstNormalPos)) (Z.lt (Fnum p) (Fnum firstNormalPos)), Rle (FtoRradix firstNormalPos) (FtoRradix p) *) apply firstNormalPosNormal. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) intros H'1; Contradict H'1; unfold firstNormalPos in |- *; simpl in |- *. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply Zle_not_lt; auto with float. (* Goal: forall _ : and (@eq Z (Fexp p) (Fexp firstNormalPos)) (Z.lt (Fnum p) (Fnum firstNormalPos)), Rle (FtoRradix firstNormalPos) (FtoRradix p) *) intros H'1; elim H'1; intros H'2 H'3; Contradict H'3. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) unfold firstNormalPos in |- *; simpl in |- *. (* Goal: not (Z.lt (Fnum p) nNormMin) *) apply Zle_not_lt. (* Goal: Z.le nNormMin (Fnum p) *) rewrite <- (Zabs_eq (Fnum p)); auto with float zarith. (* Goal: Z.le nNormMin (Z.abs (Fnum p)) *) (* Goal: Z.le Z0 (Fnum p) *) apply pNormal_absolu_min; auto. (* Goal: Z.le Z0 (Fnum p) *) apply LeR0Fnum with (radix := radix); auto with arith. Qed. Theorem FnormalLtFirstNormalNeg : forall p : float, Fnormal p -> (p <= 0)%R -> (p <= Fopp firstNormalPos)%R. (* Goal: forall (p : float) (_ : Fnormal p) (_ : Rle (FtoRradix p) (IZR Z0)), Rle (FtoRradix p) (FtoRradix (Fopp firstNormalPos)) *) intros p H' H'0. rewrite <- (Ropp_involutive p); unfold FtoRradix in |- *; repeat rewrite Fopp_correct. (* Goal: Rle (Ropp (Ropp (FtoR radix p))) (Ropp (FtoR radix firstNormalPos)) *) apply Ropp_le_contravar; rewrite <- Fopp_correct. (* Goal: Rle (FtoR radix firstNormalPos) (FtoR radix (Fopp p)) *) apply FnormalLtFirstNormalPos. (* Goal: Fnormal (Fopp q) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) apply FnormalFop; auto. replace 0%R with (-0)%R; unfold FtoRradix in |- *; try rewrite Fopp_correct; auto with real. Qed. Theorem FsubnormalDigit : forall p : float, Fsubnormal p -> Fdigit radix p < precision. (* Goal: forall (p : float) (_ : Fsubnormal p), lt (Fdigit radix p) precision *) intros p H; unfold Fdigit in |- *. (* Goal: lt (digit radix (Fnum p)) precision *) case (Z_eq_dec (Fnum p) 0); intros Z1. (* Goal: lt (digit radix (Fnum p)) precision *) (* Goal: lt (digit radix (Fnum p)) precision *) rewrite Z1; simpl in |- *; auto with arith. (* Goal: lt (digit radix (Fnum p)) precision *) apply lt_S_n; apply le_lt_n_Sm. (* Goal: le (S (digit radix (Fnum p))) precision *) rewrite <- digitPredVNumiSPrecision. (* Goal: le (S (digit radix (Fnum p))) (digit radix (Z.pred (Zpos (vNum b)))) *) replace (S (digit radix (Fnum p))) with (digit radix (Fnum p) + 1). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite <- digitAdd; auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply digit_monotone; auto with float. (* Goal: Z.le (Z.abs (Z.mul (Fnum p) (Zpower_nat radix (S O)))) (Z.abs (Z.pred (Zpos (vNum b)))) *) (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite (fun x => Zabs_eq (Zpred x)); auto with float zarith. (* Goal: Z.le (Z.abs (Z.mul (Fnum p) (Zpower_nat radix (S O)))) (Z.pred (Zpos (vNum b))) *) (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite Zmult_comm; rewrite Zpower_nat_1; auto with float zarith. (* Goal: @eq nat (Init.Nat.add (digit radix (Fnum p)) (S O)) (S (digit radix (Fnum p))) *) rewrite plus_comm; simpl in |- *; auto. Qed. Hint Resolve FsubnormalDigit: float. Theorem pSubnormal_absolu_min : forall p : float, Fsubnormal p -> (Zabs (Fnum p) < nNormMin)%Z. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros p H'; apply Zlt_mult_simpl_l with (c := radix); auto with zarith. (* Goal: Z.lt (Z.mul radix (Z.abs (Fnum p))) (Z.mul radix nNormMin) *) replace (radix * Zabs (Fnum p))%Z with (Zabs (radix * Fnum p)). (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) replace (radix * nNormMin)%Z with (Zpos (vNum b)); auto with float. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: @eq Z (Zpower_nat radix precision) (Z.mul radix nNormMin) *) (* Goal: @eq Z (Z.abs (Z.mul radix (Fnum p))) (Z.mul radix (Z.abs (Fnum p))) *) replace precision with (1 + pred precision). (* Goal: @eq Z (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.pred precision))) (Z.mul radix nNormMin) *) (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) (* Goal: @eq Z (Z.abs (Z.mul radix (Fnum p))) (Z.mul radix (Z.abs (Fnum p))) *) rewrite Zpower_nat_is_exp; auto with zarith; rewrite Zpower_nat_1; auto. (* Goal: @eq nat (Init.Nat.add (S O) (Init.Nat.pred precision)) precision *) (* Goal: @eq Z (Z.abs (Z.mul radix (Fnum p))) (Z.mul radix (Z.abs (Fnum p))) *) generalize precisionNotZero; case precision; simpl in |- *; auto. (* Goal: forall _ : not (@eq nat O O), @eq nat (S O) O *) (* Goal: @eq Z (Z.abs (Z.mul radix (Fnum p))) (Z.mul radix (Z.abs (Fnum p))) *) intros H; Contradict H; auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_Zmult; rewrite (Zabs_eq radix); auto with zarith. Qed. Theorem FsubnormalLtFirstNormalPos : forall p : float, Fsubnormal p -> (0 <= p)%R -> (p < firstNormalPos)%R. intros p H' H'0; unfold FtoRradix, FtoR, firstNormalPos in |- *; (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) simpl in |- *. replace (Fexp p) with (- dExp b)%Z. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) 2: apply sym_equal; case H'; intros H1 H2; case H2; auto. (* Goal: Rlt (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) *) apply Rmult_lt_compat_r; auto with real arith. apply Rlt_IZR. rewrite <- (Zabs_eq (Fnum p)). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) 2: apply LeR0Fnum with (radix := radix); auto with zarith. apply pSubnormal_absolu_min; auto. Qed. Theorem FsubnormalnormalLtPos : forall p q : float, Fsubnormal p -> Fnormal q -> (0 <= p)%R -> (0 <= q)%R -> (p < q)%R. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. (* Goal: Rlt (FtoRradix p) (FtoRradix q) *) apply Rlt_le_trans with (r2 := FtoRradix firstNormalPos). (* Goal: Rlt (FtoRradix p) (FtoRradix firstNormalPos) *) (* Goal: Rle (FtoRradix firstNormalPos) (FtoRradix q) *) apply FsubnormalLtFirstNormalPos; auto. (* Goal: Rle (FtoRradix firstNormalPos) (FtoRradix q) *) apply FnormalLtFirstNormalPos; auto. Qed. Theorem FsubnormalnormalLtNeg : forall p q : float, Fsubnormal p -> Fnormal q -> (p <= 0)%R -> (q <= 0)%R -> (q < p)%R. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. (* Goal: Rlt (FtoRradix q) (FtoRradix p) *) rewrite <- (Ropp_involutive p); rewrite <- (Ropp_involutive q). (* Goal: Rlt (Ropp (Ropp (FtoRradix q))) (Ropp (Ropp (FtoRradix p))) *) apply Ropp_gt_lt_contravar; red in |- *. (* Goal: Rlt (Ropp (FtoRradix p)) (Ropp (FtoRradix q)) *) unfold FtoRradix in |- *; repeat rewrite <- Fopp_correct. (* Goal: Rlt (FtoRradix q) (FtoRradix p) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply FsubnormalnormalLtPos; auto. (* Goal: Fsubnormal (Fopp p) *) (* Goal: Fnormal (Fopp q) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) apply FsubnormFopp; auto. (* Goal: Fnormal (Fopp q) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp p)) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fopp q)) *) apply FnormalFop; auto. unfold FtoRradix in |- *; rewrite Fopp_correct; replace 0%R with (-0)%R; auto with real. unfold FtoRradix in |- *; rewrite Fopp_correct; replace 0%R with (-0)%R; auto with real. Qed. Definition Fnormalize (p : float) := match Z_zerop (Fnum p) with | left _ => Float 0 (- dExp b) | right _ => Fshift radix (min (precision - Fdigit radix p) (Zabs_nat (dExp b + Fexp p))) p end. Theorem FnormalizeCorrect : forall p : float, Fnormalize p = p :>R. (* Goal: forall p : float, @eq R (FtoRradix (Fnormalize p)) (FtoRradix p) *) intros p; unfold Fnormalize in |- *. (* Goal: @eq R (FtoRradix (if Z_zerop (Fnum p) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)) (FtoRradix p) *) case (Z_zerop (Fnum p)). case p; intros Fnum1 Fexp1 H'; unfold FtoRradix, FtoR in |- *; rewrite H'; simpl in |- *; auto with real. (* Goal: @eq R (Rmult (IZR Z0) (powerRZ (IZR radix) (Z.opp (Z.of_N (dExp b))))) (Rmult (IZR Z0) (powerRZ (IZR radix) Fexp1)) *) (* Goal: forall _ : not (@eq Z (Fnum p) Z0), @eq R (FtoRradix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)) (FtoRradix p) *) apply trans_eq with 0%R; auto with real. (* Goal: forall _ : not (@eq Z (Fnum p) Z0), @eq R (FtoRradix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)) (FtoRradix p) *) intros H'; unfold FtoRradix in |- *; apply FshiftCorrect; auto. Qed. Theorem Fnormalize_Fopp : forall p : float, Fnormalize (Fopp p) = Fopp (Fnormalize p). (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) intros p; case p; unfold Fnormalize in |- *; simpl in |- *. (* Goal: forall Fnum Fexp : Z, @eq float (if Z_zerop (Z.opp Fnum) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Fopp (Float Fnum Fexp)))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp))) (Fopp (Float Fnum Fexp))) (Fopp (if Z_zerop Fnum then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Float Fnum Fexp))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp))) (Float Fnum Fexp))) *) intros Fnum1 Fexp1; case (Z_zerop Fnum1); intros H'. (* Goal: @eq float (if Z_zerop (Z.opp Fnum1) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Fopp (Float Fnum1 Fexp1)))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) (Fopp (Float Fnum1 Fexp1))) (Fopp (Float Z0 (Z.opp (Z.of_N (dExp b))))) *) (* Goal: @eq float (if Z_zerop (Z.opp Fnum1) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Fopp (Float Fnum1 Fexp1)))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) (Fopp (Float Fnum1 Fexp1))) (Fopp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Float Fnum1 Fexp1))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) (Float Fnum1 Fexp1))) *) rewrite H'; simpl in |- *; auto. (* Goal: @eq float (if Z_zerop (Z.opp Fnum1) then Float Z0 (Z.opp (Z.of_N (dExp b))) else Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Fopp (Float Fnum1 Fexp1)))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) (Fopp (Float Fnum1 Fexp1))) (Fopp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix (Float Fnum1 Fexp1))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) (Float Fnum1 Fexp1))) *) case (Z_zerop (- Fnum1)); intros H'0; simpl in |- *; auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case H'; replace Fnum1 with (- - Fnum1)%Z; auto with zarith. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) unfold Fopp, Fshift, Fdigit in |- *; simpl in |- *. (* Goal: @eq float (Float (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix (Z.opp Fnum1))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) (Z.sub Fexp1 (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix (Z.opp Fnum1))) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) (Float (Z.opp (Z.mul Fnum1 (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) (Z.sub Fexp1 (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) *) replace (digit radix (- Fnum1)) with (digit radix Fnum1). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply floatEq; simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) (Z.opp (Z.mul Fnum1 (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) *) (* Goal: @eq nat (digit radix Fnum1) (digit radix (Z.opp Fnum1)) *) ring. (* Goal: @eq nat (digit radix Fnum1) (digit radix (Z.opp Fnum1)) *) case Fnum1; simpl in |- *; auto. Qed. Theorem FnormalizeBounded : forall p : float, Fbounded b p -> Fbounded b (Fnormalize p). (* Goal: forall (p : float) (_ : Fbounded b p), Fbounded b (Fnormalize p) *) intros p H'; red in |- *; split. (* Goal: forall _ : Fbounded b (Fnormalize p), Fcanonic (Fnormalize p) *) unfold Fnormalize in |- *; case (Z_zerop (Fnum p)); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H'0; simpl in |- *; auto with zarith. (* Goal: forall _ : not (@eq Z (Fnum p) Z0), Z.lt (Z.abs (Fnum (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fnormalize p)) *) intros H'0. (* Goal: Z.lt (Z.abs (Fnum (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fnormalize p)) *) apply digitGivesBoundedNum; auto. (* Goal: le (Fdigit radix (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)) precision *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fnormalize p)) *) rewrite FshiftFdigit; auto. apply le_trans with (m := Fdigit radix p + (precision - Fdigit radix p)); auto with arith. (* Goal: le (Init.Nat.add (Fdigit radix p) (Init.Nat.sub precision (Fdigit radix p))) precision *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fnormalize p)) *) rewrite <- le_plus_minus; auto. (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply pGivesDigit; auto. (* Goal: forall _ : Fbounded b (Fnormalize p), Fcanonic (Fnormalize p) *) unfold Fnormalize in |- *; case (Z_zerop (Fnum p)); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) simpl in |- *; auto with zarith. generalize H'; case p; unfold Fbounded, Fnormal, Fdigit in |- *; (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) simpl in |- *. (* Goal: forall (Fnum Fexp : Z) (_ : and (Z.lt (Z.abs Fnum) (Zpos (vNum b))) (Z.le (Z.opp (Z.of_N (dExp b))) Fexp)) (_ : not (@eq Z Fnum Z0)), Z.le (Z.opp (Z.of_N (dExp b))) (Z.sub Fexp (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp))))) *) intros Fnum1 Fexp1 H'0 H'1. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.sub Fexp1 (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) *) apply Zle_trans with (m := (Fexp1 - Zabs_nat (dExp b + Fexp1))%Z). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite inj_abs; auto with zarith. (* Goal: Z.le (Z.sub Fexp1 (Z.of_nat (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))) (Z.sub Fexp1 (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) *) unfold Zminus in |- *; apply Zplus_le_compat_l; auto. (* Goal: Z.le (Z.opp (Z.of_nat (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))) (Z.opp (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) *) apply Zle_Zopp; auto. (* Goal: Z.le (Z.of_nat (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))) (Z.of_nat (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))) *) apply inj_le; auto with arith. Qed. Theorem FnormalizeCanonic : forall p : float, Fbounded b p -> Fcanonic (Fnormalize p). (* Goal: forall (p : float) (_ : Fcanonic p), @eq float (Fnormalize p) p *) intros p H'. (* Goal: Fcanonic (Fnormalize p) *) generalize (FnormalizeBounded p H'). (* Goal: forall _ : Fbounded b (Fnormalize p), Fcanonic (Fnormalize p) *) unfold Fnormalize in |- *; case (Z_zerop (Fnum p)); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H'0; right; repeat split; simpl in |- *; auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul radix Z0)) (Zpos (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Fnum p) Z0)) (_ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) rewrite Zmult_comm; simpl in |- *; red in |- *; simpl in |- *; auto. (* Goal: forall (_ : not (@eq Z (Fnum p) Z0)) (_ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros H'1. case (min_or (precision - Fdigit radix p) (Zabs_nat (dExp b + Fexp p))); intros Min; case Min; clear Min; intros MinR MinL. (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros H'2; left; split; auto. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) rewrite MinR; unfold Fshift in |- *; simpl in |- *. apply Zle_trans with (Zabs (radix * (Zpower_nat radix (pred (Fdigit radix p)) * Zpower_nat radix (precision - Fdigit radix p)))). (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat rewrite <- Zpower_nat_is_exp; auto with zarith. replace (1 + (pred (Fdigit radix p) + (precision - Fdigit radix p))) with precision; auto. (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Zpower_nat radix precision)) *) (* Goal: @eq nat precision (Init.Nat.add (S O) (Init.Nat.add (Init.Nat.pred (Fdigit radix p)) (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) rewrite pGivesBound; auto with real. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) cut (Fdigit radix p <= precision); auto with float. (* Goal: forall _ : le (Fdigit radix p) precision, @eq nat precision (Init.Nat.add (S O) (Init.Nat.add (Init.Nat.pred (Fdigit radix p)) (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) unfold Fdigit in |- *. generalize (digitNotZero _ radixMoreThanOne _ H'1); case (digit radix (Fnum p)); simpl in |- *; auto. (* Goal: forall (_ : lt O O) (_ : le O precision), @eq nat precision (S (Init.Nat.sub precision O)) *) (* Goal: forall (n : nat) (_ : lt O (S n)) (_ : le (S n) precision), @eq nat precision (S (Init.Nat.add n (Init.Nat.sub precision (S n)))) *) (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros tmp; Contradict tmp; auto with arith. (* Goal: forall (n : nat) (_ : lt O (S n)) (_ : le (S n) precision), @eq nat precision (S (Init.Nat.add n (Init.Nat.sub precision (S n)))) *) (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros n H H0; change (precision = S n + (precision - S n)) in |- *. (* Goal: @eq nat precision (Init.Nat.add (S n) (Init.Nat.sub precision (S n))) *) (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply le_plus_minus; auto. (* Goal: le (Fdigit radix p) precision *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply pGivesDigit; auto. (* Goal: Z.lt (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) repeat rewrite Zabs_Zmult. (* Goal: Z.le (Z.mul (Z.abs radix) (Z.mul (Z.abs (Zpower_nat radix (Init.Nat.pred (Fdigit radix p)))) (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) (Z.mul (Z.abs radix) (Z.mul (Z.abs (Fnum p)) (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply Zle_Zmult_comp_l. (* Goal: Z.le Z0 (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: Z.le (Z.abs (Zpower_nat radix (Init.Nat.pred (Fdigit radix p)))) (Z.abs (Fnum p)) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply Zle_ZERO_Zabs. (* Goal: Z.le (Z.mul (Z.abs (Zpower_nat radix (Init.Nat.pred (Fdigit radix p)))) (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p))))) (Z.mul (Z.abs (Fnum p)) (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p))))) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply Zle_Zmult_comp_r. (* Goal: Z.le Z0 (Z.abs (Zpower_nat radix (Init.Nat.sub precision (Fdigit radix p)))) *) (* Goal: Z.le (Z.abs (Zpower_nat radix (Init.Nat.pred (Fdigit radix p)))) (Z.abs (Fnum p)) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) apply Zle_ZERO_Zabs. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith. (* Goal: Z.le (Zpower_nat radix (Init.Nat.pred (Fdigit radix p))) (Z.abs (Fnum p)) *) (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) unfold Fdigit in |- *; apply digitLess; auto. (* Goal: forall _ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros H'0; right; split; auto; split. (* Goal: @eq Z (Fexp (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)) (Z.opp (Z.of_N (dExp b))) *) (* Goal: Z.lt (Z.abs (Z.mul radix (Fnum (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)))) (Zpos (vNum b)) *) rewrite MinR; clear MinR; auto. (* Goal: @eq Z (Fexp (Fshift radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))) p)) (Z.opp (Z.of_N (dExp b))) *) (* Goal: Z.lt (Z.abs (Z.mul radix (Fnum (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)))) (Zpos (vNum b)) *) cut (- dExp b <= Fexp p)%Z; [ idtac | auto with float ]. (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) case p; simpl in |- *. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros Fnum1 Fexp1 H'2; rewrite inj_abs; auto with zarith. (* Goal: Z.lt (Z.abs (Z.mul radix (Fnum (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)))) (Zpos (vNum b)) *) rewrite MinR. (* Goal: Z.lt (Z.abs (Z.mul radix (Fnum (Fshift radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))) p)))) (Zpos (vNum b)) *) rewrite <- (fun x => Zabs_eq (Zpos x)). (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) unfold Fshift in |- *; simpl in |- *. apply Zlt_le_trans with (Zabs (radix * (Zpower_nat radix (Fdigit radix p) * Zpower_nat radix (Zabs_nat (dExp b + Fexp p))))). (* Goal: Z.lt (Z.abs (Z.mul radix (Z.mul (Fnum p) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) repeat rewrite Zabs_Zmult. (* Goal: Z.lt (Z.mul (Z.abs radix) (Z.mul (Z.abs (Fnum p)) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Z.mul (Z.abs radix) (Z.mul (Z.abs (Zpower_nat radix (Fdigit radix p))) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) apply Zmult_gt_0_lt_compat_l. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zlt_gt; rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt (Z.mul (Z.abs (Fnum p)) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))))) (Z.mul (Z.abs (Zpower_nat radix (Fdigit radix p))) (Z.abs (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))))) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) apply Zmult_gt_0_lt_compat_r. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zlt_gt; rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith. (* Goal: Z.lt (Z.abs (Fnum p)) (Zpower_nat radix (Fdigit radix p)) *) (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) unfold Fdigit in |- *; apply digitMore; auto. (* Goal: Z.le (Z.abs (Z.mul radix (Z.mul (Zpower_nat radix (Fdigit radix p)) (Zpower_nat radix (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat rewrite <- Zpower_nat_is_exp; auto with zarith. (* Goal: Z.le (Z.abs (Zpower_nat radix (Init.Nat.add (S O) (Init.Nat.add (Fdigit radix p) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p))))))) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) apply Zle_trans with (Zabs (Zpower_nat radix precision)). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat rewrite Zabs_eq; auto with zarith. (* Goal: Z.le (Z.abs (Zpower_nat radix precision)) (Zpos (vNum b)) *) (* Goal: Z.le Z0 (Zpos (vNum b)) *) rewrite pGivesBound. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite (fun x => Zabs_eq (Zpower_nat radix x)); auto with zarith. (* Goal: Z.le Z0 (Zpos (vNum b)) *) red in |- *; simpl in |- *; red in |- *; intros; discriminate. Qed. Theorem NormalAndSubNormalNotEq : forall p q : float, Fnormal p -> Fsubnormal q -> p <> q :>R. (* Goal: forall (_ : not (@eq Z (Fnum p) Z0)) (_ : Fbounded b (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p)), Fcanonic (Fshift radix (Nat.min (Init.Nat.sub precision (Fdigit radix p)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp p)))) p) *) intros p q H' H'0; red in |- *; intros H'1. (* Goal: False *) case (Rtotal_order 0 p); intros H'2. (* Goal: False *) (* Goal: False *) absurd (q < p)%R. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) rewrite <- H'1; auto with real. (* Goal: Rlt (FtoRradix q) (FtoRradix p) *) (* Goal: False *) apply FsubnormalnormalLtPos; auto with real. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) rewrite <- H'1; auto with real. (* Goal: False *) absurd (p < q)%R. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) rewrite <- H'1; auto with real. (* Goal: Rlt (FtoRradix p) (FtoRradix q) *) apply FsubnormalnormalLtNeg; auto with real. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) rewrite <- H'1; auto with real. (* Goal: Rle (FtoRradix p) (IZR Z0) *) elim H'2; intros H'3; try rewrite <- H'3; auto with real. (* Goal: Rle (FtoRradix p) (IZR Z0) *) elim H'2; intros H'3; try rewrite <- H'3; auto with real. Qed. Theorem FcanonicUnique : forall p q : float, Fcanonic p -> Fcanonic q -> p = q :>R -> p = q. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : @eq R (FtoRradix p) (FtoRradix q)), @eq float p q *) intros p q H' H'0 H'1; case H'; case H'0; intros H'2 H'3. (* Goal: @eq float p q *) (* Goal: @eq float p q *) (* Goal: @eq float p q *) (* Goal: @eq float p q *) apply FnormalUnique; auto. (* Goal: @eq float p q *) (* Goal: @eq float p q *) (* Goal: @eq float p q *) Contradict H'1; apply NormalAndSubNormalNotEq; auto. (* Goal: @eq float p q *) (* Goal: @eq float p q *) absurd (q = p :>R); auto; apply NormalAndSubNormalNotEq; auto. (* Goal: @eq float p q *) apply FsubnormalUnique; auto. Qed. Theorem FcanonicLeastExp : forall x y : float, x = y :>R -> Fbounded b x -> Fcanonic y -> (Fexp y <= Fexp x)%Z. (* Goal: forall (x y : float) (_ : Fcanonic x) (_ : Fcanonic y) (_ : Rle (Rabs (FtoRradix x)) (Rabs (FtoRradix y))), Z.le (Fexp x) (Fexp y) *) intros x y H H0 H1. (* Goal: Z.le (Fexp y) (Fexp x) *) cut (Fcanonic (Fnormalize x)); [ intros | apply FnormalizeCanonic; auto ]. replace y with (Fnormalize x); [ simpl in |- * | apply FcanonicUnique; auto with real ]. (* Goal: Z.le (Fexp (Fnormalize x)) (Fexp x) *) (* Goal: @eq R (FtoRradix (Fnormalize x)) (FtoRradix y) *) unfold Fnormalize in |- *. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) case (Z_zerop (Fnum x)); simpl in |- *; intros Z1; auto with float. (* Goal: Z.le (Z.sub (Fexp x) (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))))) (Fexp x) *) (* Goal: @eq R (FtoRradix (Fnormalize x)) (FtoRradix y) *) apply Zplus_le_reg_l with (- Fexp x)%Z. (* Goal: @eq Z (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) (Z.opp (Z.mul Fnum1 (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) *) (* Goal: @eq nat (digit radix Fnum1) (digit radix (Z.opp Fnum1)) *) replace (- Fexp x + Fexp x)%Z with (- (0))%Z; try ring. replace (- Fexp x + (Fexp x - min (precision - Fdigit radix x) (Zabs_nat (dExp b + Fexp x))))%Z with (- min (precision - Fdigit radix x) (Zabs_nat (dExp b + Fexp x)))%Z; (* Goal: @eq Z (Z.mul (Z.opp Fnum1) (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1))))) (Z.opp (Z.mul Fnum1 (Zpower_nat radix (Nat.min (Init.Nat.sub precision (digit radix Fnum1)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) Fexp1)))))) *) (* Goal: @eq nat (digit radix Fnum1) (digit radix (Z.opp Fnum1)) *) try ring. (* Goal: Z.le (Z.opp (Z.of_nat (Nat.min (Init.Nat.sub precision (Fdigit radix x)) (Z.abs_nat (Z.add (Z.of_N (dExp b)) (Fexp x)))))) (Z.opp Z0) *) (* Goal: @eq R (FtoRradix (Fnormalize x)) (FtoRradix y) *) apply Zle_Zopp; auto with arith zarith. (* Goal: @eq R (FtoRradix (Fnormalize x)) (FtoRradix y) *) rewrite <- H. (* Goal: @eq R (FtoRradix (Fnormalize x)) (FtoRradix x) *) apply FnormalizeCorrect. Qed. Theorem FcanonicLtPos : forall p q : float, Fcanonic p -> Fcanonic q -> (0 <= p)%R -> (p < q)%R -> (Fexp p < Fexp q)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2; case H'; case H'0. (* Goal: forall (_ : Fnormal q) (_ : Fnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros H'3 H'4; apply FnormalLtPos; auto. (* Goal: forall (_ : Fsubnormal q) (_ : Fnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros H'3 H'4; absurd (p < q)%R; auto. (* Goal: not (Rlt (FtoRradix p) (FtoRradix q)) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply Rlt_asym. (* Goal: Rlt (FtoRradix q) (FtoRradix p) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply FsubnormalnormalLtPos; auto. (* Goal: Rle (IZR Z0) (FtoRradix q) *) (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply Rle_trans with (r2 := FtoRradix p); auto with real. (* Goal: forall (_ : Fnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros H'3 H'4; case (Z_eq_dec (Fexp q) (- dExp b)); intros H'5. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) right; split. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite H'5; case H'4; intros H1 H2; case H2; auto. (* Goal: Z.lt (Fnum p) (Fnum q) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) apply Rlt_Fexp_eq_Zlt with (radix := radix); auto with zarith. (* Goal: forall (_ : Fbounded b q) (_ : and (@eq Z (Fexp q) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum q))) (Zpos (vNum b)))), @eq Z (Fexp q) (Z.opp (Z.of_N (dExp b))) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite H'5; case H'4; intros H1 H2; case H2; auto. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) left. replace (Fexp p) with (- dExp b)%Z; [ idtac | apply sym_equal; auto with float ]. (* Goal: Z.lt (Z.opp (Z.of_N (dExp b))) (Fexp q) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) case (Zle_lt_or_eq (- dExp b) (Fexp q)); auto with float zarith. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: forall (_ : Fsubnormal q) (_ : Fsubnormal p), or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros H'3 H'4; right; split. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply trans_equal with (- dExp b)%Z; auto with float. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) apply sym_equal; auto with float. (* Goal: Z.lt (Fnum p) (Fnum q) *) apply FsubnormalLt; auto. Qed. Theorem FcanonicLePos : forall p q : float, Fcanonic p -> Fcanonic q -> (0 <= p)%R -> (p <= q)%R -> (Fexp p < Fexp q)%Z \/ Fexp p = Fexp q /\ (Fnum p <= Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.le (Fnum p) (Fnum q))) *) case H'2; intros H'3. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.le (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.le (Fnum p) (Fnum q))) *) case FcanonicLtPos with (p := p) (q := q); auto with zarith arith. (* Goal: or (Z.lt (Fexp p) (Fexp q)) (and (@eq Z (Fexp p) (Fexp q)) (Z.le (Fnum p) (Fnum q))) *) rewrite FcanonicUnique with (p := p) (q := q); auto with zarith arith. Qed. Theorem Fcanonic_Rle_Zle : forall x y : float, Fcanonic x -> Fcanonic y -> (Rabs x <= Rabs y)%R -> (Fexp x <= Fexp y)%Z. (* Goal: forall (x y : float) (_ : Fcanonic x) (_ : Fcanonic y) (_ : Rle (Rabs (FtoRradix x)) (Rabs (FtoRradix y))), Z.le (Fexp x) (Fexp y) *) intros x y H H0 H1. cut (forall z : float, Fexp z = Fexp (Fabs z) :>Z); [ intros E | intros; unfold Fabs in |- *; simpl in |- *; auto with zarith ]. (* Goal: Z.le (Fexp x) (Fexp y) *) rewrite (E x); rewrite (E y). (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) cut (Fcanonic (Fabs x)); [ intros D | apply FcanonicFabs; auto ]. (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) cut (Fcanonic (Fabs y)); [ intros G | apply FcanonicFabs; auto ]. (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) case H1; intros Z2. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) case (FcanonicLtPos (Fabs x) (Fabs y)); auto with zarith. (* Goal: Rle (IZR Z0) (FtoRradix (Fabs x)) *) (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Fabs y)) *) (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) rewrite (Fabs_correct radix); auto with real zarith. (* Goal: Rle (IZR Z0) (FtoRradix (Fabs x)) *) (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Fabs y)) *) (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) repeat rewrite (Fabs_correct radix); auto with real zarith. (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) rewrite (FcanonicUnique (Fabs x) (Fabs y)); auto with float zarith. (* Goal: Rle (IZR Z0) (FtoRradix (Fabs x)) *) (* Goal: Rlt (FtoRradix (Fabs x)) (FtoRradix (Fabs y)) *) (* Goal: Z.le (Fexp (Fabs x)) (Fexp (Fabs y)) *) repeat rewrite (Fabs_correct radix); auto with real zarith. Qed. Theorem FcanonicLtNeg : forall p q : float, Fcanonic p -> Fcanonic q -> (q <= 0)%R -> (p < q)%R -> (Fexp q < Fexp p)%Z \/ Fexp p = Fexp q /\ (Fnum p < Fnum q)%Z. (* Goal: forall (p q : float) (_ : Fcanonic p) (_ : Fcanonic q) (_ : Rle (FtoRradix q) (IZR Z0)) (_ : Rlt (FtoRradix p) (FtoRradix q)), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) intros p q H' H'0 H'1 H'2. cut ((Fexp (Fopp q) < Fexp (Fopp p))%Z \/ Fexp (Fopp q) = Fexp (Fopp p) /\ (Fnum (Fopp q) < Fnum (Fopp p))%Z). (* Goal: forall _ : or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))), or (Z.lt (Fexp q) (Fexp p)) (and (@eq Z (Fexp p) (Fexp q)) (Z.lt (Fnum p) (Fnum q))) *) (* Goal: or (Z.lt (Fexp (Fopp q)) (Fexp (Fopp p))) (and (@eq Z (Fexp (Fopp q)) (Fexp (Fopp p))) (Z.lt (Fnum (Fopp q)) (Fnum (Fopp p)))) *) simpl in |- *. intros H'3; elim H'3; clear H'3; intros H'3; [ idtac | elim H'3; clear H'3; intros H'3 H'4 ]; auto; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) right; split; auto with zarith. apply FcanonicLtPos; try apply FcanonicFopp; auto; unfold FtoRradix in |- *; repeat rewrite Fopp_correct; replace 0%R with (-0)%R; auto with real. Qed. Theorem FcanonicFnormalizeEq : forall p : float, Fcanonic p -> Fnormalize p = p. (* Goal: forall (p : float) (_ : Fcanonic p), @eq float (Fnormalize p) p *) intros p H'. (* Goal: @eq float (Fnormalize p) p *) apply FcanonicUnique; auto. (* Goal: Fcanonic (Fnormalize p) *) (* Goal: Fcanonic (Float (pPred (vNum b)) x) *) (* Goal: forall _ : Z.lt (Fexp (Fnormalize p)) x, @eq Z (Fexp (Fnormalize p)) x *) (* Goal: forall _ : and (@eq Z (Fexp (Fnormalize p)) x) (Z.le (Fnum (Fnormalize p)) (pPred (vNum b))), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply FnormalizeCanonic; auto. (* Goal: Fbounded b p *) (* Goal: @eq R (FtoRradix (Fnormalize p)) (FtoRradix p) *) apply FcanonicBound with (1 := H'); auto. (* Goal: @eq R (FtoRradix (Fnormalize p)) (FtoRradix p) *) apply FnormalizeCorrect; auto. Qed. Theorem FcanonicPosFexpRlt : forall x y : float, (0 <= x)%R -> (0 <= y)%R -> Fcanonic x -> Fcanonic y -> (Fexp x < Fexp y)%Z -> (x < y)%R. (* Goal: forall (x y : float) (_ : Rle (FtoRradix x) (IZR Z0)) (_ : Rle (FtoRradix y) (IZR Z0)) (_ : Fcanonic x) (_ : Fcanonic y) (_ : Z.lt (Fexp x) (Fexp y)), Rlt (FtoRradix y) (FtoRradix x) *) intros x y H' H'0 H'1 H'2 H'3. (* Goal: Rlt (FtoRradix x) (FtoRradix y) *) case (Rle_or_lt y x); auto. (* Goal: forall _ : Rle (FtoRradix x) (FtoRradix y), Rlt (FtoRradix y) (FtoRradix x) *) intros H'4; case H'4; clear H'4; intros H'4. (* Goal: Rlt (FtoRradix x) (FtoRradix y) *) (* Goal: Rlt (FtoRradix x) (FtoRradix y) *) case FcanonicLtPos with (p := y) (q := x); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H'5; Contradict H'3; auto with zarith. intros H'5; elim H'5; intros H'6 H'7; clear H'5; Contradict H'3; rewrite H'6; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: Rlt (FtoRradix y) (FtoRradix x) *) Contradict H'3. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite FcanonicUnique with (p := x) (q := y); auto with zarith. Qed. Theorem FcanonicNegFexpRlt : forall x y : float, (x <= 0)%R -> (y <= 0)%R -> Fcanonic x -> Fcanonic y -> (Fexp x < Fexp y)%Z -> (y < x)%R. (* Goal: forall (x y : float) (_ : Rle (FtoRradix x) (IZR Z0)) (_ : Rle (FtoRradix y) (IZR Z0)) (_ : Fcanonic x) (_ : Fcanonic y) (_ : Z.lt (Fexp x) (Fexp y)), Rlt (FtoRradix y) (FtoRradix x) *) intros x y H' H'0 H'1 H'2 H'3. (* Goal: Rlt (FtoRradix y) (FtoRradix x) *) case (Rle_or_lt x y); auto. (* Goal: forall _ : Rle (FtoRradix x) (FtoRradix y), Rlt (FtoRradix y) (FtoRradix x) *) intros H'4; case H'4; clear H'4; intros H'4. (* Goal: Rlt (FtoRradix y) (FtoRradix x) *) (* Goal: Rlt (FtoRradix y) (FtoRradix x) *) case FcanonicLtNeg with (p := x) (q := y); auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H'5; Contradict H'3; auto with zarith. intros H'5; elim H'5; intros H'6 H'7; clear H'5; Contradict H'3; rewrite H'6; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: Rlt (FtoRradix y) (FtoRradix x) *) Contradict H'3. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite FcanonicUnique with (p := x) (q := y); auto with zarith. Qed. Theorem FnormalBoundAbs2 : forall p : float, Fnormal p -> (Zpos (vNum b) * Float 1%nat (Zpred (Fexp p)) <= Fabs p)%R. (* Goal: forall (p : float) (_ : Fnormal p), Rle (Rmult (IZR (Zpos (vNum b))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp p))))) (FtoRradix (Fabs p)) *) intros p H'; unfold FtoRradix, FtoR in |- *; simpl in |- *. replace (1 * powerRZ radix (Zpred (Fexp p)))%R with (powerRZ radix (Zpred (Fexp p))); [ idtac | ring ]. pattern (Fexp p) at 2 in |- *; replace (Fexp p) with (Zsucc (Zpred (Fexp p))); [ rewrite powerRZ_Zs; auto with real zarith | unfold Zsucc, Zpred in |- *; ring ]. (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (IZR (Z.abs (Fnum p))) (Rmult (IZR radix) (powerRZ (IZR radix) (Z.pred (Fexp p))))) *) repeat rewrite <- Rmult_assoc. (* Goal: Rle (Rmult (IZR (Zpos (vNum b))) (powerRZ (IZR radix) (Z.pred (Fexp p)))) (Rmult (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) (powerRZ (IZR radix) (Z.pred (Fexp p)))) *) apply Rmult_le_compat_r; auto with real arith. (* Goal: Rle (IZR (Zpos (vNum b))) (Rmult (IZR (Z.abs (Fnum p))) (IZR radix)) *) rewrite <- Rmult_IZR; apply Rle_IZR. (* Goal: Z.le (Zpos (vNum b)) (Z.mul (Z.abs (Fnum p)) radix) *) rewrite <- (Zabs_eq radix); auto with zarith. (* Goal: forall (p : float) (_ : Fcanonic p), Z.lt (Z.abs (Fnum p)) (Zpos (vNum b)) *) rewrite <- Zabs_Zmult; rewrite Zmult_comm; auto with float. Qed. Theorem vNumbMoreThanOne : (1 < Zpos (vNum b))%Z. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) replace 1%Z with (Z_of_nat 1); [ idtac | simpl in |- *; auto ]. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite <- (Zpower_nat_O radix); rewrite pGivesBound; auto with zarith. Qed. Theorem PosNormMin : Zpos (vNum b) = (radix * nNormMin)%Z. pattern radix at 1 in |- *; rewrite <- (Zpower_nat_1 radix); (* Goal: Z.le (Z.mul nNormMin radix) (Z.mul (Z.abs (Fnum p)) radix) *) unfold nNormMin in |- *. (* Goal: Rle (IZR (Zpos (vNum b))) (IZR (Z.mul (Zpower_nat radix (Init.Nat.pred precision)) (Zpower_nat radix (S O)))) *) rewrite pGivesBound; rewrite <- Zpower_nat_is_exp. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) generalize precisionNotZero; case precision; auto with zarith. Qed. Theorem FnormalPpred : forall x : Z, (- dExp b <= x)%Z -> Fnormal (Float (pPred (vNum b)) x). intros x H; (cut (0 <= pPred (vNum b))%Z; [ intros Z1 | unfold pPred in |- *; auto with zarith ]). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat split; simpl in |- *; auto with zarith. (* Goal: Z.lt (Z.abs (pPred (vNum b))) (Zpos (vNum b)) *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix (pPred (vNum b)))) *) rewrite (Zabs_eq (pPred (vNum b))). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold pPred in |- *; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold pPred in |- *; rewrite pGivesBound; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_Zmult; repeat rewrite Zabs_eq; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zle_trans with ((1 + 1) * pPred (vNum b))%Z; auto with zarith. replace ((1 + 1) * pPred (vNum b))%Z with (pPred (vNum b) + pPred (vNum b))%Z; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. replace (Zpos (vNum b)) with (1 + Zpred (Zpos (vNum b)))%Z; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) unfold pPred in |- *; auto with zarith. (* Goal: Z.le (Z.add (Zpos xH) (Z.pred (Zpos (vNum b)))) (Z.add (Z.pred (Zpos (vNum b))) (Z.pred (Zpos (vNum b)))) *) apply Zplus_le_compat_r; apply Zle_Zpred. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) apply vNumbMoreThanOne. Qed. Theorem FcanonicPpred : forall x : Z, (- dExp b <= x)%Z -> Fcanonic (Float (pPred (vNum b)) x). (* Goal: forall (x : Z) (_ : Z.le (Z.opp (Z.of_N (dExp b))) x), Fcanonic (Float (pPred (vNum b)) x) *) intros x H; left; apply FnormalPpred; auto. Qed. Theorem FnormalNnormMin : forall x : Z, (- dExp b <= x)%Z -> Fnormal (Float nNormMin x). (* Goal: forall (x : Z) (_ : Z.le (Z.opp (Z.of_N (dExp b))) x), Fnormal (Float nNormMin x) *) intros x H; (cut (0 < nNormMin)%Z; [ intros Z1 | apply nNormPos ]). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) repeat split; simpl in |- *; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.lt nNormMin (Zpos (vNum b)) *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) rewrite PosNormMin. pattern nNormMin at 1 in |- *; replace nNormMin with (1 * nNormMin)%Z; (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply Zmult_gt_0_lt_compat_r; auto with zarith. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) rewrite PosNormMin; auto with zarith. Qed. Theorem FcanonicNnormMin : forall x : Z, (- dExp b <= x)%Z -> Fcanonic (Float nNormMin x). (* Goal: forall (x : Z) (_ : Z.le (Z.opp (Z.of_N (dExp b))) x), Fcanonic (Float nNormMin x) *) intros x H; left; apply FnormalNnormMin; auto. Qed. Theorem boundedNorMinGivesExp : forall (x : Z) (p : float), Fbounded b p -> (- dExp b <= x)%Z -> (Float nNormMin x <= p)%R -> (p <= Float (pPred (vNum b)) x)%R -> Fexp (Fnormalize p) = x. (* Goal: forall (x : Z) (p : float) (_ : Fbounded b p) (_ : Z.le (Z.opp (Z.of_N (dExp b))) x) (_ : Rle (FtoRradix (Float nNormMin x)) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix (Float (pPred (vNum b)) x))), @eq Z (Fexp (Fnormalize p)) x *) intros x p H' H'0 H'1 H'2. (* Goal: @eq Z (Fexp (Fnormalize p)) x *) cut (0 <= p)%R; [ intros Rle1 | idtac ]. case (FcanonicLePos (Float nNormMin x) (Fnormalize p)); try rewrite FnormalizeCorrect; simpl in |- *; auto with float zarith. (* Goal: Fcanonic (Float nNormMin x) *) (* Goal: Fcanonic (Fnormalize p) *) (* Goal: Rle (IZR Z0) (FtoRradix (Float nNormMin x)) *) (* Goal: forall _ : Z.lt x (Fexp (Fnormalize p)), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply FcanonicNnormMin; auto. (* Goal: Fcanonic (Fnormalize p) *) (* Goal: Fcanonic (Float (pPred (vNum b)) x) *) (* Goal: forall _ : Z.lt (Fexp (Fnormalize p)) x, @eq Z (Fexp (Fnormalize p)) x *) (* Goal: forall _ : and (@eq Z (Fexp (Fnormalize p)) x) (Z.le (Fnum (Fnormalize p)) (pPred (vNum b))), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply FnormalizeCanonic; auto. (* Goal: Rle (IZR Z0) (FtoRradix (Float nNormMin x)) *) (* Goal: forall _ : Z.lt x (Fexp (Fnormalize p)), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply (LeFnumZERO radix); simpl in |- *; auto. (* Goal: Z.lt Z0 nNormMin *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) apply Zlt_le_weak; apply nNormPos. (* Goal: forall _ : Z.lt x (Fexp (Fnormalize p)), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) intros H'3. case (FcanonicLePos (Fnormalize p) (Float (pPred (vNum b)) x)); try rewrite FnormalizeCorrect; simpl in |- *; auto. (* Goal: Fcanonic (Fnormalize p) *) (* Goal: Fcanonic (Float (pPred (vNum b)) x) *) (* Goal: forall _ : Z.lt (Fexp (Fnormalize p)) x, @eq Z (Fexp (Fnormalize p)) x *) (* Goal: forall _ : and (@eq Z (Fexp (Fnormalize p)) x) (Z.le (Fnum (Fnormalize p)) (pPred (vNum b))), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply FnormalizeCanonic; auto. (* Goal: Fcanonic (Float (pPred (vNum b)) x) *) (* Goal: forall _ : Z.lt (Fexp (Fnormalize p)) x, @eq Z (Fexp (Fnormalize p)) x *) (* Goal: forall _ : and (@eq Z (Fexp (Fnormalize p)) x) (Z.le (Fnum (Fnormalize p)) (pPred (vNum b))), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply FcanonicPpred; auto. (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) intros H'4; Contradict H'4; auto with zarith. (* Goal: forall _ : and (@eq Z (Fexp (Fnormalize p)) x) (Z.le (Fnum (Fnormalize p)) (pPred (vNum b))), @eq Z (Fexp (Fnormalize p)) x *) (* Goal: Rle (IZR Z0) (FtoRradix p) *) intros (H'4, H'5); auto. (* Goal: Rle (IZR Z0) (FtoRradix p) *) apply Rle_trans with (2 := H'1). (* Goal: not (Z.lt (Fnum q) (Fnum q)) *) (* Goal: @eq Z (Fexp p) (Fexp q) *) (* Goal: not (Z.lt (Fnum p) (Fnum q)) *) apply (LeFnumZERO radix); simpl in |- *; auto with zarith. (* Goal: Z.lt Z0 nNormMin *) (* Goal: Z.le (Zpos (vNum b)) (Z.abs (Z.mul radix nNormMin)) *) apply Zlt_le_weak; apply nNormPos. Qed. End Fnormalized_Def. Hint Resolve FnormalBounded FnormalPrecision: float. Hint Resolve FnormalNotZero nNrMMimLevNum firstNormalPosNormal FsubnormFopp FsubnormalLtFirstNormalPos FnormalizeBounded FcanonicFopp FcanonicFabs FnormalizeCanonic: float. Hint Resolve nNrMMimLevNum: arith. Hint Resolve FsubnormalFbounded FsubnormalFexp FsubnormalDigit: float. Hint Resolve FcanonicBound: float.
(**************************************************************************** IEEE754 : sTactic Laurent Thery ***************************************************************************** *) Global Set Asymmetric Patterns. (* Some simple tactics *) Theorem Contradict1 : forall a b : Prop, b -> (a -> ~ b) -> ~ a. (* Goal: forall (a b : Prop) (_ : b) (_ : not b), a *) intuition. Qed. Theorem Contradict2 : forall a b : Prop, b -> ~ b -> a. (* Goal: forall (a b : Prop) (_ : b) (_ : not b), a *) intuition. Qed. Theorem Contradict3 : forall a : Prop, a -> ~ ~ a. (* Goal: forall (a : Prop) (_ : a), not (not a) *) auto. Qed. (* Contradict is used to contradict an hypothesis H if we have H:~A |- B the result is |- A if we have H:~A |- ~B the result is H:B |- A *) Ltac Contradict name := (simple apply (fun a : Prop => Contradict1 a _ name); clear name; intros name) || (simple apply (fun a : Prop => Contradict2 a _ name); clear name); try simple apply Contradict3. (* Same as Case but keeps an equality *) Ltac CaseEq name := generalize (refl_equal name); pattern name at -1 in |- *; case name. (* Same as Case but cleans the case variable *) Ltac Casec name := case name; clear name. (* Same as Elim but cleans the elim variable *) Ltac Elimc name := elim name; clear name.
(**************************************************************************** IEEE754 : Closest2Plus Laurent Thery ******************************************************************************) Require Export ClosestPlus. Require Export Closest2Prop. Section F2. Variable b : Fbound. Variable precision : nat. Let radix := 2%Z. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Theorem TwoMoreThanOne : (1 < radix)%Z. (* Goal: Z.lt (Zpos xH) radix *) red in |- *; simpl in |- *; auto. Qed. Hint Resolve TwoMoreThanOne. Hypothesis precisionNotZero : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem plusUpperBound : forall P, RoundedModeP b 2%nat P -> forall p q pq : float, P (p + q)%R pq -> Fbounded b p -> Fbounded b q -> (Rabs pq <= radix * Rmax (Rabs p) (Rabs q))%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b (Z.of_nat (S (S O))) P) (p q pq : float) (_ : P (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q), Rle (Rabs (FtoRradix pq)) (Rmult (IZR radix) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) intros P H' p q pq H'0 H'1 H'2. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmult (IZR radix) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) rewrite <- (Rabs_right radix); auto with real zarith. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmult (Rabs (IZR radix)) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) rewrite <- RmaxRmult; auto with real. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmax (Rmult (Rabs (IZR radix)) (Rabs (FtoRradix p))) (Rmult (Rabs (IZR radix)) (Rabs (FtoRradix q)))) *) repeat rewrite <- Rabs_mult. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmax (Rabs (Rmult (IZR radix) (FtoRradix p))) (Rabs (Rmult (IZR radix) (FtoRradix q)))) *) case (Rle_or_lt p q); intros Rltp. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmax (Rabs (Rmult (IZR radix) (FtoRradix q))) (Rabs (Rmult (IZR radix) (FtoRradix p)))) *) apply RmaxAbs; auto. (* Goal: Rle (Rmult (IZR radix) (FtoRradix q)) (FtoRradix pq) *) (* Goal: Rle (FtoRradix pq) (Rmult (IZR radix) (FtoRradix p)) *) apply (RoundedModeMultLess b radix) with (P := P) (r := (p + q)%R); auto. replace (radix * FtoR radix p)%R with (p + p)%R; [ auto with real | unfold radix at 1; fold FtoRradix; ring]. unfold FtoRradix in |- *; apply (RoundedModeMult b radix) with (P := P) (r := (p + q)%R); auto. replace (radix * FtoR radix q)%R with (q + q)%R; [ auto with real | unfold radix at 1; fold FtoRradix; ring ]. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmax (Rabs (Rmult (IZR radix) (FtoRradix p))) (Rabs (Rmult (IZR radix) (FtoRradix q)))) *) rewrite RmaxSym. (* Goal: Rle (Rabs (FtoRradix pq)) (Rmax (Rabs (Rmult (IZR radix) (FtoRradix q))) (Rabs (Rmult (IZR radix) (FtoRradix p)))) *) apply RmaxAbs; auto. (* Goal: Rle (Rmult (IZR radix) (FtoRradix q)) (FtoRradix pq) *) (* Goal: Rle (FtoRradix pq) (Rmult (IZR radix) (FtoRradix p)) *) apply (RoundedModeMultLess b radix) with (P := P) (r := (p + q)%R); auto. replace (radix * FtoR radix q)%R with (q + q)%R; [ auto with real | unfold radix at 1; fold FtoRradix; ring ]. unfold FtoRradix in |- *; apply (RoundedModeMult b radix) with (P := P) (r := (p + q)%R); auto. replace (radix * FtoR radix p)%R with (p + p)%R; [ auto with real zarith | unfold radix at 1; fold FtoRradix; ring]. Qed. Theorem plusErrorBound2 : forall p q r : float, Fbounded b p -> Fbounded b q -> Closest b radix (p + q) r -> ~ is_Fzero r -> (Rabs (r - (p + q)) < radix * / pPred (vNum b) * Rmax (Rabs p) (Rabs q))%R. (* Goal: forall (p q r : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) r) (_ : not (is_Fzero r)), Rlt (Rabs (Rminus (FtoRradix r) (Rplus (FtoRradix p) (FtoRradix q)))) (Rmult (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b))))) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) intros p q r H' H'0 H'1 H'2. apply Rlt_le_trans with (Rabs (FtoR radix r) * / radix * (radix * / pPred (vNum b)))%R; auto. unfold FtoRradix in |- *; apply plusErrorBound1 with (precision := precision); auto with arith. replace (Rabs (FtoR radix r) * / radix * (radix * / pPred (vNum b)))%R with (radix * / pPred (vNum b) * (Rabs r * / radix))%R; [ idtac | fold FtoRradix; ring ]. (* Goal: Rle (Rmult (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b))))) (Rmult (Rabs (FtoRradix r)) (Rinv (IZR radix)))) (Rmult (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b))))) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) apply Rmult_le_compat_l; auto. (* Goal: Rle (IZR Z0) (Rmult (IZR radix) (Rinv (IZR (pPred (vNum b))))) *) (* Goal: Rle (Rmult (Rabs (FtoRradix r)) (Rinv (IZR radix))) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) *) replace 0%R with (radix * 0)%R; [ apply Rmult_le_compat_l | ring ]. (* Goal: Rle (IZR Z0) (IZR radix) *) (* Goal: Rle (IZR Z0) (Rinv (IZR (pPred (vNum b)))) *) (* Goal: Rle (Rmult (Rabs (FtoRradix r)) (Rinv (IZR radix))) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) *) cut (0 <= radix)%Z; auto with real zarith. apply Rlt_le; apply Rinv_0_lt_compat; cut (0 < pPred (vNum b))%Z; auto with real zarith. (* Goal: Z.lt Z0 (pPred (vNum b)) *) (* Goal: Rle (Rmult (Rabs (FtoRradix r)) (Rinv (IZR radix))) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) *) unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *. apply vNumbMoreThanOne with (radix := radix) (precision := precision); auto with real arith. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoR radix (Fopp q)) *) (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rmult_le_reg_l with (r := IZR radix); auto with real. rewrite (Rmult_comm (Rabs r)); rewrite <- Rmult_assoc; rewrite Rinv_r; (* Goal: Rlt (Rmult (IZR (Zpos xH)) (FtoR radix p)) (Rplus (Rmult (IZR radix) (FtoRradix p)) (Rmult (IZR radix) (FtoRradix q))) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) auto with real zarith; rewrite Rmult_1_l. (* Goal: Rle (Rabs (FtoRradix r)) (Rmult (IZR radix) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) *) apply plusUpperBound with (P := Closest b radix); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. Qed. Theorem plusClosestLowerBoundAux1 : forall p q pq : float, (Rabs q <= p)%R -> Closest b radix (p + q) pq -> Fbounded b p -> Fbounded b q -> pq <> (p + q)%R :>R -> (/ radix * p <= pq)%R. (* Goal: forall (p q pq : float) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q) (_ : not (@eq R (FtoRradix pq) (Rplus (FtoRradix p) (FtoRradix q)))) (_ : Rle (Rabs (FtoRradix p)) (Rabs (FtoRradix q))), Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) intros p q pq H' H'0 H'1 H'2 H'3. cut (0 <= p)%R; [ intros Rl0; Casec Rl0; intros H0 | apply Rle_trans with (2 := H'); auto with real ]. (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply (FmultRadixInv b radix precision) with (5 := H'0); auto. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) case (Rle_or_lt 0 q); intros Rl0. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rlt_le_trans with (FtoRradix p); auto. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoRradix p) *) (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rlt_RinvDouble; auto. pattern (FtoRradix p) at 1 in |- *; replace (FtoRradix p) with (p + 0)%R; auto with real. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rmult_lt_reg_l with (r := IZR radix); auto with real. (* Goal: Rle (Rmult (IZR radix) (Rmult (Rinv (INR (S (S O)))) (FtoR radix p))) (Rmult (IZR radix) (FtoR radix (Fopp q))) *) (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- Rmult_assoc; rewrite Rinv_r. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (FtoR radix p)) (Rmult (IZR radix) (Rplus (FtoRradix p) (FtoRradix q))) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite Rmult_plus_distr_l. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (FtoR radix p)) (Rplus (Rmult (IZR radix) (FtoRradix p)) (Rmult (IZR radix) (FtoRradix q))) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite Rmult_1_l. (* Goal: Rlt (FtoR radix p) (Rplus (Rmult (IZR radix) (FtoRradix p)) (Rmult (IZR radix) (FtoRradix q))) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rplus_lt_reg_l with (r := (- (radix * p))%R). replace (- (radix * p) + FtoR radix p)%R with (- p)%R; [ idtac | unfold radix at 1; unfold FtoRradix; ring]. replace (- (radix * p) + (radix * p + radix * q))%R with (radix * q)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Ropp (FtoRradix p)) (Rmult (IZR radix) (FtoRradix q)) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- (Ropp_involutive (radix * q)); apply Ropp_lt_contravar. (* Goal: Rlt (Ropp (Rmult (IZR radix) (FtoRradix q))) (FtoRradix p) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) replace (- (radix * q))%R with (radix * - q)%R; [ idtac | ring ]. (* Goal: Rlt (Rmult (IZR radix) (Ropp (FtoRradix q))) (FtoRradix p) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) case (Rle_or_lt (FtoRradix p) (radix * - q)); auto. (* Goal: forall _ : Rle (FtoRradix p) (Rmult (IZR radix) (Ropp (FtoRradix q))), Rlt (Rmult (IZR radix) (Ropp (FtoRradix q))) (FtoRradix p) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) intros H'4; Contradict H'3. (* Goal: @eq R (FtoRradix pq) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- (Fplus_correct radix); auto. (* Goal: @eq R (FtoRradix pq) (FtoR radix (Fplus radix p q)) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) unfold FtoRradix in |- *; apply sym_eq; apply ClosestIdem with (b := b); auto. (* Goal: Fbounded b (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) replace (Fplus radix p q) with (Fminus radix p (Fopp q)). (* Goal: Fbounded b (Fminus radix p (Fopp q)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- Fopp_Fminus. (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply oppBounded; auto. (* Goal: Fbounded b (Fminus radix (Fopp q) p) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Sterbenz; auto. (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply oppBounded; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix p)) (FtoR radix (Fopp q)) *) (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rmult_le_reg_l with (r := IZR radix); auto with real. (* Goal: Rle (Rmult (IZR radix) (Rmult (Rinv (INR (S (S O)))) (FtoR radix p))) (Rmult (IZR radix) (FtoR radix (Fopp q))) *) (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- Rmult_assoc; rewrite Rinv_r. (* Goal: Rle (Rmult (IZR (Zpos xH)) (FtoR radix p)) (Rmult (IZR radix) (FtoR radix (Fopp q))) *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite Rmult_1_l; rewrite Fopp_correct; auto. (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) replace 0%R with (INR 0); auto with real arith. (* Goal: Rle (FtoR radix (Fopp q)) (Rmult (INR (S (S O))) (FtoR radix p)) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rle_trans with (FtoR 2%nat p); auto with real. (* Goal: Rle (FtoR radix (Fopp q)) (FtoR (Z.of_nat (S (S O))) p) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite Fopp_correct; auto. (* Goal: Rle (Ropp (FtoR radix q)) (FtoR (Z.of_nat (S (S O))) p) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- Faux.Rabsolu_left1; auto. (* Goal: Rle (FtoR radix q) (IZR Z0) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rlt_le; auto. (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) unfold Fminus in |- *; rewrite Fopp_Fopp; auto. apply (ClosestCompatible b radix (p + q)%R (FtoR radix (Fplus radix p q)) pq pq); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (FtoR radix (Fplus radix p q)) *) (* Goal: Fbounded b pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply sym_eq; unfold FtoRradix in |- *; apply Fplus_correct; auto. apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) replace 0%R with (INR 0); auto with real arith. (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) rewrite <- H0; rewrite Rmult_0_r. (* Goal: Rle (IZR Z0) (FtoRradix pq) *) replace (FtoRradix pq) with (FtoRradix p); auto. (* Goal: Rle (IZR Z0) (FtoRradix p) *) (* Goal: @eq R (FtoRradix p) (FtoRradix pq) *) rewrite <- H0; auto with real. (* Goal: @eq R (FtoRradix p) (FtoRradix pq) *) unfold FtoRradix in |- *; apply ClosestIdem with (b := b); auto. (* Goal: Closest b radix (FtoR radix p) pq *) apply (ClosestCompatible b radix (p + q)%R (FtoR radix p) pq pq); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (FtoR radix p) *) (* Goal: Fbounded b pq *) replace (FtoR 2%nat p) with (FtoRradix p); auto. (* Goal: @eq R (Rplus (FtoRradix p) (FtoRradix q)) (FtoR radix p) *) (* Goal: Fbounded b pq *) fold FtoRradix; rewrite <- H0; replace (FtoRradix q) with 0%R; try ring. (* Goal: @eq R (IZR Z0) (FtoRradix q) *) (* Goal: Fbounded b pq *) generalize H'; unfold Rabs in |- *; case (Rcase_abs q); auto. (* Goal: Rle (IZR Z0) (FtoRradix p) *) (* Goal: @eq R (FtoRradix p) (FtoRradix pq) *) intros H'4 H'5; Contradict H'5; rewrite <- H0; auto with real. (* Goal: not (Rle (Ropp (FtoRradix q)) (IZR Z0)) *) (* Goal: forall (_ : Rge (FtoRradix q) (IZR Z0)) (_ : Rle (FtoRradix q) (FtoRradix p)), @eq R (IZR Z0) (FtoRradix q) *) (* Goal: Fbounded b pq *) apply Rlt_not_le; auto with real. (* Goal: forall (_ : Rge (FtoRradix q) (IZR Z0)) (_ : Rle (FtoRradix q) (FtoRradix p)), @eq R (IZR Z0) (FtoRradix q) *) (* Goal: Fbounded b pq *) intros H'4 H'5; apply Rle_antisym; auto with real. (* Goal: Rle (FtoRradix q) (IZR Z0) *) (* Goal: Fbounded b pq *) rewrite H0; auto. apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. Qed. Theorem plusClosestLowerBoundAux2 : forall p q pq : float, Closest b radix (p + q) pq -> Fbounded b p -> Fbounded b q -> pq <> (p + q)%R :>R -> (Rabs p <= Rabs q)%R -> (/ radix * Rabs q <= Rabs pq)%R. (* Goal: forall (p q pq : float) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q) (_ : not (@eq R (FtoRradix pq) (Rplus (FtoRradix p) (FtoRradix q)))) (_ : Rle (Rabs (FtoRradix p)) (Rabs (FtoRradix q))), Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) intros p q pq H' H'0 H'1 H'2 H'3. cut (Fbounded b pq); [ intros Fb0 | apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto; apply ClosestRoundedModeP with (precision := precision) ]; auto. case (Rle_or_lt 0 q); intros Rl2; [ idtac | cut (q <= 0)%R; [ intros Rl2' | apply Rlt_le; auto ] ]. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix q)) (FtoRradix pq) *) (* Goal: Rge (FtoRradix pq) (IZR Z0) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) apply plusClosestLowerBoundAux1 with (q := p); auto. (* Goal: Rle (Rabs (FtoRradix p)) (FtoRradix q) *) (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) (* Goal: not (@eq R (FtoRradix pq) (Rplus (FtoRradix q) (FtoRradix p))) *) (* Goal: Rge (FtoRradix pq) (IZR Z0) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) rewrite <- (Rabs_right q); auto with real. (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) (* Goal: not (@eq R (FtoRradix pq) (Rplus (FtoRradix q) (FtoRradix p))) *) (* Goal: Rle (Rabs (FtoRradix q)) (Rabs (FtoRradix p)) *) apply (ClosestCompatible b radix (p + q)%R (q + p)%R pq pq); auto; try ring. (* Goal: not (@eq R (FtoRradix pq) (Rplus (FtoRradix q) (FtoRradix p))) *) (* Goal: Rge (FtoRradix pq) (IZR Z0) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) rewrite Rplus_comm; auto with real. apply Rle_ge; unfold FtoRradix in |- *; apply RleRoundedR0 with (b := b) (precision := precision) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. case (Rle_or_lt 0 p); intros Rl3; [ idtac | cut (p <= 0)%R; [ intros Rl3' | apply Rlt_le; auto ] ]; auto with real. (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) replace 0%R with (0 + 0)%R; auto with real. (* Goal: Rle (IZR Z0) (Rplus (FtoRradix p) (FtoRradix q)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) apply Rplus_le_reg_l with (r := (- p)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix p)) (IZR Z0)) (Rplus (Ropp (FtoRradix p)) (Rplus (FtoRradix p) (FtoRradix q))) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) replace (- p + 0)%R with (- p)%R; [ idtac | ring ]. (* Goal: Rle (Ropp (FtoRradix p)) (Rplus (Ropp (FtoRradix p)) (Rplus (FtoRradix p) (FtoRradix q))) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) replace (- p + (p + q))%R with (FtoRradix q); [ idtac | ring ]. (* Goal: Rle (Ropp (FtoRradix p)) (FtoRradix q) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) rewrite <- (Faux.Rabsolu_left1 (FtoRradix p)); auto with real. (* Goal: Rle (Rabs (FtoRradix p)) (FtoRradix q) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) rewrite <- (Rabs_right (FtoRradix q)); auto with real. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) repeat rewrite Faux.Rabsolu_left1; auto with real. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Ropp (FtoRradix q))) (Ropp (FtoRradix pq)) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite <- (Fopp_correct 2%nat); auto. (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoR (Z.of_nat (S (S O))) (Fopp q))) (FtoR (Z.of_nat (S (S O))) (Fopp pq)) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply plusClosestLowerBoundAux1 with (q := Fopp p); auto. unfold FtoRradix in |- *; repeat rewrite Fopp_correct; rewrite Rabs_Ropp; rewrite <- Faux.Rabsolu_left1; auto with real. apply (ClosestCompatible b radix (- (p + q))%R (Fopp q + Fopp p)%R ( Fopp pq) (Fopp pq)); auto. (* Goal: Closest b radix (Ropp (Rplus (FtoRradix p) (FtoRradix q))) (Fopp pq) *) (* Goal: @eq R (Ropp (Rplus (FtoRradix p) (FtoRradix q))) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p))) *) (* Goal: Fbounded b (Fopp pq) *) (* Goal: Fbounded b (Fopp q) *) (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply ClosestOpp; auto. (* Goal: @eq R (Ropp (Rplus (FtoRradix p) (FtoRradix q))) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p))) *) (* Goal: Fbounded b (Fopp pq) *) (* Goal: Fbounded b (Fopp q) *) (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct; ring. (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply oppBounded; auto. (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply oppBounded; auto. (* Goal: Fbounded b (Fopp p) *) (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) apply oppBounded; auto. (* Goal: not (@eq R (FtoRradix (Fopp pq)) (Rplus (FtoRradix (Fopp q)) (FtoRradix (Fopp p)))) *) (* Goal: Rle (FtoRradix pq) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct; Contradict H'2. unfold FtoRradix in |- *; rewrite <- (Ropp_involutive (FtoR radix pq)); rewrite H'2; ring. unfold FtoRradix in |- *; apply RleRoundedLessR0 with (b := b) (precision := precision) (P := Closest b radix) (r := (p + q)%R); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. case (Rle_or_lt 0 p); intros Rl3; [ idtac | cut (p <= 0)%R; [ intros Rl3' | apply Rlt_le; auto ] ]; auto with real. (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) apply Rplus_le_reg_l with (r := (- q)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix q)) (Rplus (FtoRradix p) (FtoRradix q))) (Rplus (Ropp (FtoRradix q)) (IZR Z0)) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) replace (- q + 0)%R with (- q)%R; [ idtac | ring ]. (* Goal: Rle (Rplus (Ropp (FtoRradix q)) (Rplus (FtoRradix p) (FtoRradix q))) (Ropp (FtoRradix q)) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) replace (- q + (p + q))%R with (FtoRradix p); [ idtac | ring ]. (* Goal: Rle (FtoRradix p) (Ropp (FtoRradix q)) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) rewrite <- (Rabs_right (FtoRradix p)); auto with real. (* Goal: Rle (Rabs (FtoRradix p)) (Ropp (FtoRradix q)) *) (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) rewrite <- (Rabs_left (FtoRradix q)); auto with real. (* Goal: Rle (Rplus (FtoRradix p) (FtoRradix q)) (IZR Z0) *) replace 0%R with (0 + 0)%R; auto with real. Qed. Theorem plusClosestLowerBound : forall p q pq : float, Closest b radix (p + q) pq -> Fbounded b p -> Fbounded b q -> pq <> (p + q)%R :>R -> (/ radix * Rmax (Rabs p) (Rabs q) <= Rabs pq)%R. (* Goal: forall (p q pq : float) (_ : Closest b radix (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q) (_ : not (@eq R (FtoRradix pq) (Rplus (FtoRradix p) (FtoRradix q)))), Rle (Rmult (Rinv (IZR radix)) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) (Rabs (FtoRradix pq)) *) intros p q pq H' H'0 H'1 H'2. cut (Fbounded b pq); [ intros Fb0 | apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := (p + q)%R); auto; apply ClosestRoundedModeP with (precision := precision) ]; auto. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rmax (Rabs (FtoRradix p)) (Rabs (FtoRradix q)))) (Rabs (FtoRradix pq)) *) unfold Rmax in |- *. (* Goal: Rle (Rmult (Rinv (IZR radix)) (if Rle_dec (Rabs (FtoRradix p)) (Rabs (FtoRradix q)) then Rabs (FtoRradix q) else Rabs (FtoRradix p))) (Rabs (FtoRradix pq)) *) case (Rle_dec (Rabs p) (Rabs q)); intros Rl1. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix q))) (Rabs (FtoRradix pq)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix p))) (Rabs (FtoRradix pq)) *) apply plusClosestLowerBoundAux2 with (p := p); auto. (* Goal: Rle (Rmult (Rinv (IZR radix)) (Rabs (FtoRradix p))) (Rabs (FtoRradix pq)) *) apply plusClosestLowerBoundAux2 with (p := q); auto. (* Goal: Closest b radix (Rplus (FtoRradix q) (FtoRradix p)) pq *) (* Goal: not (@eq R (FtoRradix pq) (Rplus (FtoRradix q) (FtoRradix p))) *) (* Goal: Rle (Rabs (FtoRradix q)) (Rabs (FtoRradix p)) *) apply (ClosestCompatible b radix (p + q)%R (q + p)%R pq pq); auto; try ring. (* Goal: not (@eq R (FtoRradix pq) (Rplus (FtoRradix q) (FtoRradix p))) *) (* Goal: Rle (Rabs (FtoRradix q)) (Rabs (FtoRradix p)) *) rewrite Rplus_comm; auto. case (Rle_or_lt (Rabs q) (Rabs p)); auto; intros H'3; Contradict Rl1; (* Goal: Rle (FtoR radix q) (IZR Z0) *) (* Goal: @eq float (Fminus radix p (Fopp q)) (Fplus radix p q) *) (* Goal: Closest b radix (FtoR radix (Fplus radix p q)) pq *) (* Goal: not (@eq R (INR (S (S O))) (IZR Z0)) *) (* Goal: Rle (Rmult (Rinv (IZR radix)) (FtoRradix p)) (FtoRradix pq) *) apply Rlt_le; auto. Qed. End F2.
(**************************************************************************** IEEE754 : FroundPlus Laurent Thery ******************************************************************************) Require Export Finduct. Require Export FroundProp. Section FRoundP. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem plusExpMin : forall P, RoundedModeP b radix P -> forall p q pq : float, P (p + q)%R pq -> exists s : float, Fbounded b s /\ s = pq :>R /\ (Zmin (Fexp p) (Fexp q) <= Fexp s)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : P (Rplus (FtoRradix p) (FtoRradix q)) pq), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp s)))) *) intros P H' p q pq H'0. case (RoundedModeRep b radix precision) with (p := Fplus radix p q) (q := pq) (P := P); auto with float arith. (* Goal: P (FtoR radix (Fplus radix p q)) pq *) (* Goal: forall (x : Z) (_ : @eq R (FtoR radix pq) (FtoR radix (Float x (Fexp (Fplus radix p q))))), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp s)))) *) rewrite Fplus_correct; auto with float arith. (* Goal: forall (x : Z) (_ : @eq R (FtoR radix pq) (FtoR radix (Float x (Fexp (Fplus radix p q))))), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp s)))) *) simpl in |- *; intros x H'1. case (eqExpLess _ radixMoreThanOne b) with (p := pq) (q := Float x (Fexp (Fplus radix p q))); auto. (* Goal: Fbounded b pq *) (* Goal: forall (x0 : float) (_ : and (Fbounded b x0) (and (@eq R (FtoR radix x0) (FtoR radix (Float x (Fexp (Fplus radix p q))))) (Rle (IZR (Fexp (Float x (Fexp (Fplus radix p q))))) (IZR (Fexp x0))))), @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp s)))) *) apply (RoundedModeBounded b radix) with (P := P) (r := (p + q)%R); auto. simpl in |- *; intros x0 H'2; elim H'2; intros H'3 H'4; elim H'4; intros H'5 H'6; clear H'4 H'2. (* Goal: @ex float (fun s : float => and (Fbounded b s) (and (@eq R (FtoRradix s) (FtoRradix pq)) (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp s)))) *) exists x0; split; [ idtac | split ]; auto. (* Goal: @eq R (FtoRradix x0) (FtoRradix pq) *) (* Goal: Z.le (Z.min (Fexp p) (Fexp q)) (Fexp x0) *) unfold FtoRradix in |- *; rewrite H'5; auto. (* Goal: Z.le (Z.min (Fexp p) (Fexp q)) (Fexp x0) *) apply le_IZR; auto. Qed. Theorem plusExpUpperBound : forall P, RoundedModeP b radix P -> forall p q pq : float, P (p + q)%R pq -> Fbounded b p -> Fbounded b q -> exists r : float, Fbounded b r /\ r = pq :>R /\ (Fexp r <= Zsucc (Zmax (Fexp p) (Fexp q)))%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : P (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q), @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) intros P H' p q pq H'0 H'1 H'2. replace (Zsucc (Zmax (Fexp p) (Fexp q))) with (Fexp (Float (pPred (vNum b)) (Zsucc (Zmax (Fexp p) (Fexp q))))); [ idtac | simpl in |- *; auto ]. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (Z.le (Fexp r) (Fexp (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q)))))))) *) unfold FtoRradix in |- *; apply eqExpMax; auto. apply RoundedModeBounded with (radix := radix) (P := P) (r := (p + q)%R); auto with float arith. (* Goal: Fbounded b (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))) *) (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold pPred in |- *; apply maxFbounded; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Z.succ (Zmax (Fexp p) (Fexp q))) *) (* Goal: Rle (FtoR radix (Fabs pq)) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Zle_trans with (Fexp p); auto with float. (* Goal: Z.le (Fexp p) (Z.succ (Zmax (Fexp p) (Fexp q))) *) (* Goal: Rle (FtoR radix (Fabs pq)) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Zle_trans with (Zsucc (Fexp p)); auto with float zarith. replace (FtoR radix (Float (pPred (vNum b)) (Zsucc (Zmax (Fexp p) (Fexp q))))) with (radix * Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q)))%R. (* Goal: Rle (FtoR radix (Fabs pq)) (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) rewrite Fabs_correct; auto with zarith. unfold FtoRradix in |- *; apply RoundedModeMultAbs with (b := b) (precision := precision) (P := P) (r := (p + q)%R); auto. (* Goal: Fbounded b (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))) *) (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold pPred in |- *; apply maxFbounded; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Zmax (Fexp p) (Fexp q)) *) (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Zle_trans with (Fexp p); auto with float zarith. (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Rle_trans with (Rabs p + Rabs q)%R. (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rplus (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) *) (* Goal: Rle (Rplus (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Rabs_triang; auto. apply Rle_trans with (2%nat * FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))%R; auto. cut (forall r : R, (2%nat * r)%R = (r + r)%R); [ intros tmp; rewrite tmp; clear tmp | intros; simpl in |- *; ring ]. (* Goal: Rle (Rplus (Rabs (FtoRradix p)) (Rabs (FtoRradix q))) (Rplus (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q)))) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: Rle (Rmult (INR (S (S O))) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Rplus_le_compat; auto. rewrite <- (Fabs_correct radix); auto with arith; apply maxMax1; auto; apply ZmaxLe1. rewrite <- (Fabs_correct radix); auto with arith; apply maxMax1; auto; apply ZmaxLe2. (* Goal: Rle (Rmult (INR (S (S O))) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Rmult_le_compat; auto with real arith. (* Goal: Rle (IZR Z0) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q)))) *) (* Goal: Rle (INR (S (S O))) (IZR radix) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) replace 0%R with (INR 0); auto with real arith. apply LeFnumZERO; simpl in |- *; auto; replace 0%Z with (Z_of_nat 0); auto with zarith. (* Goal: Z.le (Z.of_nat O) (pPred (vNum b)) *) (* Goal: Rle (INR (S (S O))) (IZR radix) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold pPred in |- *; apply Zle_Zpred; auto with zarith. (* Goal: Rle (INR (S (S O))) (IZR radix) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) rewrite INR_IZR_INZ; apply Rle_IZR; simpl in |- *; auto with zarith. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) cut (1 < radix)%Z; auto with zarith;intros. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR radix) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Zmax (Fexp p) (Fexp q))))) (Rmult (IZR (pPred (vNum b))) (powerRZ (IZR radix) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) rewrite powerRZ_Zs; auto with real zarith; ring. Qed. Theorem plusExpBound : forall P, RoundedModeP b radix P -> forall p q pq : float, P (p + q)%R pq -> Fbounded b p -> Fbounded b q -> exists r : float, Fbounded b r /\ r = pq :>R /\ (Zmin (Fexp p) (Fexp q) <= Fexp r)%Z /\ (Fexp r <= Zsucc (Zmax (Fexp p) (Fexp q)))%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q pq : float) (_ : P (Rplus (FtoRradix p) (FtoRradix q)) pq) (_ : Fbounded b p) (_ : Fbounded b q), @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) intros P H' p q pq H'0 H'1 H'2. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) case (plusExpMin P H' _ _ _ H'0). intros r' H'3; elim H'3; intros H'4 H'5; elim H'5; intros H'6 H'7; clear H'5 H'3. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) case (Zle_or_lt (Fexp r') (Zsucc (Zmax (Fexp p) (Fexp q)))); intros Zl1. (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) exists r'; repeat (split; auto). (* Goal: @ex float (fun r : float => and (Fbounded b r) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp r)) (Z.le (Fexp r) (Z.succ (Zmax (Fexp p) (Fexp q))))))) *) case (plusExpUpperBound P H' _ _ _ H'0); auto. intros r'' H'3; elim H'3; intros H'5 H'8; elim H'8; intros H'9 H'10; clear H'8 H'3. exists (Fshift radix (Zabs_nat (Fexp r' - Zsucc (Zmax (Fexp p) (Fexp q)))) r'); (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) split. (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply FboundedShiftLess with (n := Zabs_nat (Fexp r' - Fexp r'')); auto. (* Goal: le (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply ZleLe; auto. (* Goal: Z.le (Z.of_nat (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q)))))) (Z.of_nat (Z.abs_nat (Z.sub (Fexp r') (Fexp r'')))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) repeat rewrite <- Zabs_absolu. (* Goal: Z.le (Z.abs (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) (Z.abs (Z.sub (Fexp r') (Fexp r''))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) repeat rewrite Zabs_eq; auto with zarith. (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) rewrite FshiftCorrectInv; auto. (* Goal: @eq R (FtoR radix r'') (FtoR radix r') *) (* Goal: Z.le (Fexp r'') (Fexp r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply trans_eq with (FtoRradix pq); auto. (* Goal: Z.le (Fexp r'') (Fexp r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Zle_trans with (1 := H'10); auto with zarith. (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) split. (* Goal: @eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq) *) (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) unfold FtoRradix in |- *; rewrite FshiftCorrect; auto. (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) split. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) simpl in |- *. (* Goal: Z.le (Z.sub (Fexp r') (Z.of_nat (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))))) (Z.succ (Zmax (Fexp p) (Fexp q))) *) repeat rewrite inj_abs; auto with zarith arith. (* Goal: Z.le (Z.min (Fexp p) (Fexp q)) (Z.sub (Fexp r') (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) apply Zle_trans with (Zmax (Fexp p) (Fexp q)); auto with zarith. (* Goal: Z.le (Z.min (Fexp p) (Fexp q)) (Zmax (Fexp p) (Fexp q)) *) (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) apply Zmin_Zmax; auto. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) simpl in |- *. (* Goal: Z.le (Z.sub (Fexp r') (Z.of_nat (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))))) (Z.succ (Zmax (Fexp p) (Fexp q))) *) repeat rewrite inj_abs; auto with zarith arith. Qed. Theorem minusRoundRep : forall P, RoundedModeP b radix P -> forall p q qmp qmmp : float, (0 <= p)%R -> (p <= q)%R -> P (q - p)%R qmp -> Fbounded b p -> Fbounded b q -> exists r : float, Fbounded b r /\ r = (q - qmp)%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q qmp _ : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : P (Rminus (FtoRradix q) (FtoRradix p)) qmp) (_ : Fbounded b p) (_ : Fbounded b q), @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) intros P H' p q qmp H'0 H'1 H'2 H'3 H'4 H'5. (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) case (Rle_or_lt (/ 2%nat * q) p); intros Rle1. (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) exists p; split; auto. (* Goal: @eq R (FtoRradix p) (Rminus (FtoRradix q) (FtoRradix qmp)) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) replace (FtoRradix qmp) with (FtoRradix (Fminus radix q p)). rewrite (Fminus_correct radix); auto with arith; unfold FtoRradix in |- *; (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) ring. (* Goal: @eq R (FtoRradix (Fminus radix q p)) (FtoRradix qmp) *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) apply (RoundedModeProjectorIdemEq b radix precision) with (P := P); auto. (* Goal: Fbounded b (Fminus radix q qmp) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite <- Fopp_Fminus. (* Goal: Fbounded b (Fopp (Fminus radix qmp q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply oppBounded; auto. (* Goal: Fbounded b (Fminus radix qmp q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Sterbenz; auto. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix q); auto with real. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rledouble; auto. (* Goal: Rle (IZR Z0) (FtoR radix q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix p); auto with real. cut (CompatibleP b radix P); [ intros Cp | apply RoundedModeP_inv2 with (1 := H'); auto ]. (* Goal: P (FtoR radix (Fminus radix q p)) qmp *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) apply (Cp (q - p)%R (Fminus radix q p) qmp); auto. (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix p)) (FtoRradix (Fminus radix q p)) *) (* Goal: Fbounded b qmp *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) rewrite (Fminus_correct radix); auto with arith. apply RoundedModeBounded with (radix := radix) (P := P) (r := (q - p)%R); auto; auto. (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) exists (Fminus radix q qmp); split. (* Goal: Fbounded b (Fminus radix q qmp) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite <- Fopp_Fminus. (* Goal: Fbounded b (Fopp (Fminus radix qmp q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply oppBounded; auto. (* Goal: Fbounded b (Fminus radix qmp q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Sterbenz; auto. apply RoundedModeBounded with (radix := radix) (P := P) (r := (q - p)%R); auto; auto. case MaxEx with (r := (/ 2%nat * FtoR radix q)%R) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) x), Rle (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) (FtoR radix qmp) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) intros max H'6. apply Rle_trans with (FtoRradix max); [ apply isMax_inv1 with (1 := H'6); auto | idtac ]. apply (RleBoundRoundl b radix precision) with (P := P) (r := (q - p)%R); auto; fold FtoRradix in |- *. (* Goal: Fbounded b max *) (* Goal: Rle (FtoRradix max) (Rminus (FtoRradix q) (FtoRradix p)) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) case H'6; auto. case MinEx with (r := (/ 2%nat * FtoR radix q)%R) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) x), Rle (FtoRradix max) (Rminus (FtoRradix q) (FtoRradix p)) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) intros min H'7. (* Goal: Rle (FtoRradix max) (Rminus (FtoRradix q) (FtoRradix p)) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) replace (FtoRradix max) with (q - min)%R. (* Goal: Rle (Rminus (FtoRradix q) (FtoRradix p)) (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rplus_le_reg_l with (r := (- q)%R). cut (forall p q : R, (- p + (p - q))%R = (- q)%R); [ intros tmp; repeat rewrite tmp; clear tmp | intros; ring ]. (* Goal: Rle (Ropp (FtoRradix min)) (Ropp (FtoRradix p)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Ropp_le_contravar. (* Goal: Rle (FtoRradix p) (FtoRradix min) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) case H'7. (* Goal: forall (_ : Fbounded b min) (_ : and (Rle (FtoR radix min) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q))) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q))), Rle (FtoR radix f) (FtoR radix min))), Rle (FtoRradix p) (FtoRradix min) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) intros H'8 H'9; elim H'9; intros H'10 H'11; apply H'11; clear H'9; auto. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rlt_le; auto. unfold FtoRradix in |- *; rewrite (div2IsBetween b radix precision) with (5 := H'7) (6 := H'6); auto. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) ring. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix q); auto with real. apply (RleBoundRoundr b radix precision) with (P := P) (r := (q - p)%R); auto; fold FtoRradix in |- *. (* Goal: Rle (Rminus (FtoRradix q) (FtoRradix p)) (FtoRradix q) *) (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rplus_le_reg_l with (r := (- q)%R). cut (forall p q : R, (- p + (p - q))%R = (- q)%R); [ intros tmp; repeat rewrite tmp; clear tmp | intros; ring ]. (* Goal: Rle (Ropp (FtoRradix p)) (Rplus (Ropp (FtoRradix q)) (FtoRradix q)) *) (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) replace (- q + q)%R with (-0)%R; [ auto with real | ring ]. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix q); auto with real. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rledouble; auto. (* Goal: Rle (IZR Z0) (FtoR radix q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix p); auto with real. (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply (Fminus_correct radix); auto with arith. Qed. Theorem radixRangeBoundExp : forall p q : float, Fcanonic radix b p -> Fcanonic radix b q -> (0 <= p)%R -> (p < q)%R -> (q < radix * p)%R -> Fexp p = Fexp q \/ Zsucc (Fexp p) = Fexp q. intros p q H' H'0 H'1 H'2 H'3. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := p) (q := q); auto with arith. 2: intros H'4; elim H'4; intros H'5 H'6; clear H'4; auto. intros H'4; right. Casec H'; intros H'. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := q) (q := Float (Fnum p) (Zsucc (Fexp p))); auto with arith. left. case H'; intros H1 H2. repeat split; simpl in |- *; auto with float. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Zmax (Fexp p) (Fexp q)) *) (* Goal: Rle (Rabs (Rplus (FtoRradix p) (FtoRradix q))) (Rmult (IZR radix) (FtoR radix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) *) (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) apply Zle_trans with (Fexp p); auto with float zarith. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (FtoRradix p); auto; apply Rlt_le; auto. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) unfold FtoR in |- *; simpl in |- *. rewrite powerRZ_Zs; auto with real zarith; auto. rewrite <- Rmult_assoc; rewrite (fun (x : R) (y : Z) => Rmult_comm x y); rewrite Rmult_assoc; auto. simpl in |- *; intros; apply Zle_antisym; auto with zarith. simpl in |- *; auto. intros H'5; elim H'5; intros H'6 H'7; auto. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := q) (q := Float (nNormMin radix precision) (Zsucc (Fexp p))); auto with arith. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) left; repeat split; simpl in |- *. rewrite Zabs_eq; auto with float zarith. apply ZltNormMinVnum; auto with zarith. apply Zlt_le_weak; auto with zarith. apply nNormPos; auto with zarith. case H'; auto with zarith float. rewrite (PosNormMin radix b precision); auto with zarith. apply Rle_trans with (1 := H'1); auto with real. apply Rlt_trans with (1 := H'3). (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) unfold FtoR in |- *; simpl in |- *. rewrite powerRZ_Zs; auto with real arith; auto. rewrite <- Rmult_assoc; rewrite (fun (x : R) (y : Z) => Rmult_comm x y); rewrite Rmult_assoc; auto. apply Rmult_lt_compat_l; auto with real arith. replace (Fexp p) with (- dExp b)%Z. change (p < firstNormalPos radix b precision)%R in |- *. apply (FsubnormalLtFirstNormalPos radix); auto with arith. case H'; intros Z1 (Z2, Z3); auto. auto with real zarith. simpl in |- *; auto. intros H; apply Zle_antisym; auto with zarith. intros H'5; elim H'5; intros H'6 H'7; rewrite H'6; clear H'5; auto. Qed. Theorem ExactMinusIntervalAux : forall P, RoundedModeP b radix P -> forall p q : float, (0 < p)%R -> (2%nat * p < q)%R -> Fcanonic radix b p -> Fcanonic radix b q -> (exists r : float, Fbounded b r /\ r = (q - p)%R :>R) -> forall r : float, Fcanonic radix b r -> (2%nat * p < r)%R -> (r <= q)%R -> exists r' : float, Fbounded b r' /\ r' = (r - p)%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : Fbounded b p) (_ : Fbounded b q) (_ : @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix p))))) (r : float) (_ : Fbounded b r) (_ : Rle (FtoRradix p) (FtoRradix r)) (_ : Rle (FtoRradix r) (FtoRradix q)), @ex float (fun r' : float => and (Fbounded b r') (@eq R (FtoRradix r') (Rminus (FtoRradix r) (FtoRradix p)))) *) intros P H' p q H'0 H'1 H'2 H'3 H'4 r H'5 H'6 H'7. cut (0 <= p)%R; [ intros Rle0 | apply Rlt_le; auto ]. cut (0 <= r)%R; [ intros Rle1 | apply Rle_trans with (2%nat * p)%R; auto ]. 2: apply Rle_trans with (FtoRradix p); auto with float arith. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) 2: apply Rledouble; auto. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) 2: apply Rlt_le; auto. generalize H'6; clear H'6; pattern r in |- *; apply (FinductNeg b radix precision) with (p := q); auto with arith. apply Rle_trans with (FtoRradix r); auto. intros q0 H'6 H'8 H'9 H'10 H'11. elim H'10; [ intros r' E; elim E; intros H'13 H'14; clear E H'10 | clear H'10 ]; auto. 2: apply Rlt_trans with (1 := H'11); auto; apply (FPredLt b radix precision); auto with arith. cut (0 <= Fnormalize radix b precision r')%R; [ intros Rle2 | idtac ]. 2: rewrite (FnormalizeCorrect radix); auto with arith. 2: unfold FtoRradix in H'14; rewrite H'14. 2: apply Rplus_le_reg_l with (r := FtoR radix p). 2: replace (FtoR radix p + 0)%R with (FtoR radix p); [ idtac | ring ]. 2: replace (FtoR radix p + (FtoR radix q0 - FtoR radix p))%R with (FtoR radix q0); [ idtac | ring ]. 2: apply Rle_trans with (2%nat * p)%R; auto. 2: apply Rledouble; auto with real arith. 2: apply Rlt_le; apply Rlt_trans with (1 := H'11); auto with float. 2: apply (FPredLt b radix precision); auto with arith. cut (Fnormalize radix b precision r' < q0)%R; [ intros Rle3 | idtac ]. 2: rewrite (FnormalizeCorrect radix); auto with arith. 2: unfold FtoRradix in H'14; rewrite H'14. 2: apply Rplus_lt_reg_l with (r := (- q0)%R). 2: replace (- q0 + (FtoR radix q0 - FtoR radix p))%R with (- p)%R; [ idtac | unfold FtoRradix in |- *; ring; ring ]. 2: replace (- q0 + q0)%R with (-0)%R; [ auto with real | ring ]. case radixRangeBoundExp with (p := Fnormalize radix b precision r') (q := q0); auto with float arith; fold FtoRradix in |- *. rewrite (FnormalizeCorrect radix); auto with arith. apply Rlt_le_trans with (2%nat * r')%R; auto. rewrite H'14. rewrite Rmult_minus_distr_l. pattern (FtoRradix q0) at 1 in |- *; (replace (FtoRradix q0) with (2%nat * q0 - q0)%R; [ idtac | simpl in |- *; ring ]). unfold Rminus in |- *; apply Rplus_lt_compat_l; apply Ropp_lt_contravar. apply Rlt_trans with (1 := H'11). apply (FPredLt b radix precision); auto with arith. apply Rmult_le_compat_r; auto with real arith. unfold FtoRradix in Rle2; rewrite (FnormalizeCorrect radix) in Rle2; auto with arith. rewrite INR_IZR_INZ; cut (2 <= radix)%Z; auto with real zarith. cut (1 < radix)%Z; auto with zarith. intros H'10. case (FcanonicLtPos _ radixMoreThanOne b precision) with (p := Fnormalize radix b precision r') (q := q0); auto with arith. apply FnormalizeCanonic; auto with arith. intros; Contradict H'10; auto with zarith. intros H'12; elim H'12; intros H'15 H'16; clear H'12. exists (Float (Zpred (Fnum (Fnormalize radix b precision r'))) (Fexp (Fnormalize radix b precision r'))). (* Goal: and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q)))) *) split. cut (Fbounded b (Fnormalize radix b precision r')); [ intros Fb0 | idtac ]. repeat split; simpl in |- *; auto with float. case Rle2; intros Z1. apply Zle_lt_trans with (Zabs (Fnum (Fnormalize radix b precision r'))); auto with float zarith. (* Goal: Z.le (Z.abs (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) (Z.abs (Z.sub (Fexp r') (Fexp r''))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) repeat rewrite Zabs_eq; auto with zarith. apply (LeR0Fnum radix); auto with zarith. apply Zle_Zpred; apply (LtR0Fnum radix); auto with zarith. replace (Fnum (Fnormalize radix b precision r')) with 0%Z; simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); auto with zarith. apply sym_equal; change (is_Fzero (Fnormalize radix b precision r')) in |- *; apply (is_Fzero_rep2 radix); auto with zarith. apply FcanonicBound with (radix := radix); auto. apply FnormalizeCanonic; auto with arith. replace (Float (Zpred (Fnum (Fnormalize radix b precision r'))) (Fexp (Fnormalize radix b precision r'))) with (Fminus radix (Fnormalize radix b precision r') (Fminus radix q0 (FPred b radix precision q0))). repeat rewrite (Fopp_correct radix); repeat rewrite (Fminus_correct radix); auto with arith. rewrite (FnormalizeCorrect radix); auto with arith. unfold FtoRradix in H'14; rewrite H'14. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) unfold FtoRradix in |- *; ring; ring. replace (FPred b radix precision q0) with (Float (Zpred (Fnum q0)) (Fexp q0)); auto. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) unfold Fminus, Fopp, Fplus in |- *; simpl in |- *. repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; simpl in |- *; auto. rewrite H. repeat rewrite Zmin_n_n; repeat rewrite <- Zminus_diag_reverse; simpl in |- *; auto. repeat rewrite Zmult_1_r. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply floatEq; simpl in |- *; auto; unfold Zpred in |- *; ring. case (Z_eq_dec (Fnum q0) (nNormMin radix precision)); intros Zeq2. case (Z_eq_dec (Fexp q0) (- dExp b)); intros Zeq1. rewrite Zeq1; rewrite Zeq2; rewrite <- (FPredSimpl3 b radix); auto with arith; rewrite <- Zeq1; rewrite <- Zeq2; auto. Contradict H'16. apply Zle_not_lt. rewrite Zeq2. rewrite <- (Zabs_eq (Fnum (Fnormalize radix b precision r'))); auto with zarith. apply pNormal_absolu_min with (b := b); auto with arith. cut (Fcanonic radix b (Fnormalize radix b precision r')); [ intros Ca1; case Ca1; auto | auto with float arith ]. intros H'12; case Zeq1; rewrite <- H. case H'12; auto. intros Hbis H0; case H0; auto. apply (LeR0Fnum radix); auto. rewrite FPredSimpl4; auto. Contradict H'16; rewrite H'16. apply Zle_not_lt. unfold pPred in |- *; rewrite Zopp_Zpred_Zs; apply Zlt_le_succ. apply Zlt_Zabs_inv1. cut (Fbounded b (Fnormalize radix b precision r')); [ auto with float | idtac ]. apply (FcanonicBound radix b); auto with float arith. intros H'10. case (Z_eq_dec (Fnum q0) (nNormMin radix precision)); intros Zeq2. exists (Float (Zpred (Fnum (Fnormalize radix b precision r'))) (Fexp (Fnormalize radix b precision r'))). cut (Fbounded b (Fnormalize radix b precision r')); [ intros Fb1 | idtac ]. repeat split; simpl in |- *; auto with float. case Rle2; intros Z1. apply Zlt_trans with (Zabs (Fnum (Fnormalize radix b precision r'))). (* Goal: Z.le (Z.abs (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) (Z.abs (Z.sub (Fexp r') (Fexp r''))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) repeat rewrite Zabs_eq; auto with zarith. apply (LeR0Fnum radix); auto. apply Zle_Zpred; apply (LtR0Fnum radix); auto. case Fb1; auto. replace (Fnum (Fnormalize radix b precision r')) with 0%Z. simpl in |- *; apply (vNumbMoreThanOne radix) with (precision := precision); auto with zarith. apply sym_equal; change (is_Fzero (Fnormalize radix b precision r')) in |- *; apply (is_Fzero_rep2 radix); auto with zarith. rewrite FPredSimpl2; auto with zarith. rewrite <- H'10. cut (forall z : Z, Zpred (Zsucc z) = z); [ intros tmp; rewrite tmp; clear tmp | intros; unfold Zsucc, Zpred in |- *; ring ]. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. cut (forall x : Z, Zpred x = (x - 1%nat)%Z); [ intros tmp; rewrite tmp; clear tmp | intros; unfold Zpred in |- *; simpl in |- *; ring ]. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. rewrite <- Z_R_minus; auto. rewrite (fun x y => Rmult_comm (x - y)); rewrite Rmult_minus_distr_l; repeat rewrite (fun x y => Rmult_comm (powerRZ x y)). replace (Fnum (Fnormalize radix b precision r') * powerRZ radix (Fexp (Fnormalize radix b precision r')))%R with (FtoRradix (Fnormalize radix b precision r')). rewrite (FnormalizeCorrect radix); auto. unfold FtoRradix in H'14; rewrite H'14. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) unfold FtoR in |- *; simpl in |- *. pattern (Fexp q0) at 1 in |- *; rewrite <- H'10. rewrite Zeq2; rewrite powerRZ_Zs; auto with real zarith. rewrite <- Rmult_assoc. replace (nNormMin radix precision * radix)%R with (powerRZ radix precision). unfold pPred, nNormMin, Zpred in |- *; rewrite pGivesBound. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite plus_IZR; repeat rewrite Zpower_nat_Z_powerRZ; simpl in |- *; try ring. rewrite <- Zpower_nat_Z_powerRZ; auto with zarith; rewrite <- Rmult_IZR; rewrite Zmult_comm; rewrite <- (PosNormMin radix b precision); auto with real zarith. auto. red in |- *; intros H'12; absurd (- dExp b <= Fexp (Fnormalize radix b precision r'))%Z; auto with float. apply Zlt_not_le. rewrite <- H'12; rewrite <- H'10; unfold Zsucc in |- *; auto with float zarith. apply (FcanonicBound radix b); auto with arith. apply FnormalizeCanonic; auto with arith. exists (Float (Fnum (Fnormalize radix b precision r') - radix) (Fexp (Fnormalize radix b precision r'))). cut (Fbounded b (Fnormalize radix b precision r')); [ intros Fb1 | idtac ]. repeat split; simpl in |- *; auto with float. case (Zle_or_lt (Fnum (Fnormalize radix b precision r')) radix); intros Z1. apply Zle_lt_trans with radix. rewrite Zabs_eq_opp; auto with zarith. cut (0 <= Fnum (Fnormalize radix b precision r'))%Z; auto with zarith. apply (LeR0Fnum radix); auto. rewrite <- (Zpower_nat_1 radix); rewrite pGivesBound; auto with zarith. apply Zle_lt_trans with (Zabs (Fnum (Fnormalize radix b precision r'))). (* Goal: Z.le (Z.abs (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) (Z.abs (Z.sub (Fexp r') (Fexp r''))) *) (* Goal: Fbounded b (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Fexp r''))) r') *) (* Goal: and (@eq R (FtoRradix (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (FtoRradix pq)) (and (Z.le (Z.min (Fexp p) (Fexp q)) (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r'))) (Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) repeat rewrite Zabs_eq; auto with zarith. case Fb1; auto. rewrite FPredSimpl4; auto with arith. rewrite <- H'10. (* Goal: @eq R (Rmult (IZR radix) (FtoRradix (Float (pPred (vNum b)) (Zmax (Fexp p) (Fexp q))))) (FtoR radix (Float (pPred (vNum b)) (Z.succ (Zmax (Fexp p) (Fexp q))))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. cut (forall x : Z, Zpred x = (x - 1%nat)%Z); [ intros tmp; rewrite tmp; clear tmp | intros; unfold Zpred in |- *; simpl in |- *; ring ]. repeat rewrite <- Z_R_minus; auto. repeat rewrite (fun x y => Rmult_comm (x - y)); repeat rewrite Rmult_minus_distr_l; repeat rewrite (fun x y => Rmult_comm (powerRZ x y)). replace (Fnum (Fnormalize radix b precision r') * powerRZ radix (Fexp (Fnormalize radix b precision r')))%R with (FtoRradix (Fnormalize radix b precision r')). rewrite (FnormalizeCorrect radix); auto. unfold FtoRradix in H'14; rewrite H'14. (* Goal: Z.le (Fexp (Fshift radix (Z.abs_nat (Z.sub (Fexp r') (Z.succ (Zmax (Fexp p) (Fexp q))))) r')) (Z.succ (Zmax (Fexp p) (Fexp q))) *) unfold FtoR in |- *; simpl in |- *. rewrite <- H'10. repeat rewrite powerRZ_Zs; auto with real arith. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) ring. auto with real zarith. unfold FtoR in |- *; simpl in |- *; auto. red in |- *; intros H'12; absurd (0 <= Fnum q0)%Z; auto. apply Zlt_not_le. rewrite H'12. replace 0%Z with (- 0%nat)%Z; [ apply Zlt_Zopp | simpl in |- *; auto ]. unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *; auto with zarith. apply (vNumbMoreThanOne radix) with (precision := precision); auto with zarith. apply (LeR0Fnum radix); auto. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rlt_le; auto. apply (FcanonicBound radix b); auto with arith. apply FnormalizeCanonic; auto with arith. Qed. Theorem ExactMinusIntervalAux1 : forall P, RoundedModeP b radix P -> forall p q : float, (0 <= p)%R -> (p <= q)%R -> Fcanonic radix b p -> Fcanonic radix b q -> (exists r : float, Fbounded b r /\ r = (q - p)%R :>R) -> forall r : float, Fcanonic radix b r -> (p <= r)%R -> (r <= q)%R -> exists r' : float, Fbounded b r' /\ r' = (r - p)%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : Fbounded b p) (_ : Fbounded b q) (_ : @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix p))))) (r : float) (_ : Fbounded b r) (_ : Rle (FtoRradix p) (FtoRradix r)) (_ : Rle (FtoRradix r) (FtoRradix q)), @ex float (fun r' : float => and (Fbounded b r') (@eq R (FtoRradix r') (Rminus (FtoRradix r) (FtoRradix p)))) *) intros P H' p q H'0 H'1 H'2 H'3 H'4 r H'5 H'6 H'7. Casec H'0; intros H'0. case (Rle_or_lt q (2%nat * p)); intros Rl1. exists (Fminus radix r p); split; auto. (* Goal: Fbounded b (Fminus radix q qmp) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite <- Fopp_Fminus. apply oppBounded. (* Goal: Fbounded b (Fminus radix qmp q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Sterbenz; auto. apply (FcanonicBound radix b); auto with arith. apply (FcanonicBound radix b); auto with arith. apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real arith; rewrite Rmult_1_l; auto. apply Rle_trans with (1 := H'7); auto. apply Rle_trans with (1 := H'6); auto. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rledouble; auto. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (2 := H'6); apply Rlt_le; auto. (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix p)) (FtoRradix (Fminus radix q p)) *) (* Goal: Fbounded b qmp *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) rewrite (Fminus_correct radix); auto with arith. case (Rle_or_lt r (2%nat * p)); intros Rl2. exists (Fminus radix r p); split; auto. (* Goal: Fbounded b (Fminus radix q qmp) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite <- Fopp_Fminus. apply oppBounded. (* Goal: Fbounded b (Fminus radix qmp q) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Sterbenz; auto. apply (FcanonicBound radix b); auto with arith. apply (FcanonicBound radix b); auto with arith. apply Rmult_le_reg_l with (r := INR 2); auto with real. rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real arith; rewrite Rmult_1_l; auto. apply Rle_trans with (1 := H'6); auto. (* Goal: Rle (FtoRradix q) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rledouble; auto. (* Goal: Rle (FtoR radix p) (Rmult (Rinv (INR (S (S O)))) (FtoR radix q)) *) (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix min)) (FtoRradix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) apply Rle_trans with (2 := H'6); apply Rlt_le; auto. (* Goal: @eq R (Rminus (FtoRradix q) (FtoRradix p)) (FtoRradix (Fminus radix q p)) *) (* Goal: Fbounded b qmp *) (* Goal: @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix qmp)))) *) rewrite (Fminus_correct radix); auto with arith. apply ExactMinusIntervalAux with (P := P) (q := q); auto. exists r; split; auto. apply (FcanonicBound radix b); auto with arith. (* Goal: @eq R (Rminus (Rplus (FtoR radix min) (FtoR radix max)) (FtoR radix min)) (FtoR radix max) *) (* Goal: Rle (FtoR radix qmp) (Rmult (INR (S (S O))) (FtoR radix q)) *) (* Goal: @eq R (FtoRradix (Fminus radix q qmp)) (Rminus (FtoRradix q) (FtoRradix qmp)) *) rewrite <- H'0; ring. Qed. Theorem ExactMinusInterval : forall P, RoundedModeP b radix P -> forall p q : float, (0 <= p)%R -> (p <= q)%R -> Fbounded b p -> Fbounded b q -> (exists r : float, Fbounded b r /\ r = (q - p)%R :>R) -> forall r : float, Fbounded b r -> (p <= r)%R -> (r <= q)%R -> exists r' : float, Fbounded b r' /\ r' = (r - p)%R :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (p q : float) (_ : Rle (IZR Z0) (FtoRradix p)) (_ : Rle (FtoRradix p) (FtoRradix q)) (_ : Fbounded b p) (_ : Fbounded b q) (_ : @ex float (fun r : float => and (Fbounded b r) (@eq R (FtoRradix r) (Rminus (FtoRradix q) (FtoRradix p))))) (r : float) (_ : Fbounded b r) (_ : Rle (FtoRradix p) (FtoRradix r)) (_ : Rle (FtoRradix r) (FtoRradix q)), @ex float (fun r' : float => and (Fbounded b r') (@eq R (FtoRradix r') (Rminus (FtoRradix r) (FtoRradix p)))) *) intros P H' p q H'0 H'1 H'2 H'3 H'4 r H'5 H'6 H'7. replace (FtoRradix r) with (FtoRradix (Fnormalize radix b precision r)); [ idtac | apply (FnormalizeCorrect radix) ]; auto. replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)); [ idtac | apply (FnormalizeCorrect radix) ]; auto. apply ExactMinusIntervalAux1 with (P := P) (q := Fnormalize radix b precision q); auto; try repeat rewrite (FnormalizeCorrect radix); auto; apply FnormalizeCanonic; auto with arith. Qed. (* Properties concerning LSB MSB *) Theorem MSBroundLSB : forall P : R -> float -> Prop, RoundedModeP b radix P -> forall f1 f2 : float, P f1 f2 -> ~ is_Fzero (Fminus radix f1 f2) -> (MSB radix (Fminus radix f1 f2) < LSB radix f2)%Z. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP b radix P) (f1 f2 : float) (_ : P (FtoRradix f1) f2) (_ : not (is_Fzero (Fminus radix f1 f2))), Z.lt (MSB radix (Fminus radix f1 f2)) (LSB radix f2) *) intros P H' f1 f2 H'0 HZ. apply (oneExp_Zlt radix); auto. (* Goal: Rlt (FtoR radix (Float (Z.of_nat (S O)) (MSB radix (Fminus radix f1 f2)))) (FtoR radix (Float (Z.of_nat (S O)) (LSB radix f2))) *) apply Rlt_le_trans with (Fulp b radix precision f2). (* Goal: Rlt (FtoR radix (Float (Z.of_nat (S O)) (MSB radix (Fminus radix f1 f2)))) (Fulp b radix precision f2) *) (* Goal: Rle (Fulp b radix precision f2) (FtoR radix (Float (Z.of_nat (S O)) (LSB radix f2))) *) apply Rle_lt_trans with (FtoRradix (Fabs (Fminus radix f1 f2))). unfold FtoRradix in |- *; apply MSB_le_abs; auto. unfold FtoRradix in |- *; rewrite Fabs_correct; auto with arith; rewrite Fminus_correct; auto with arith. apply RoundedModeUlp with (4 := H'); auto. apply FUlp_Le_LSigB; auto. apply RoundedModeBounded with (1 := H') (2 := H'0); auto. Qed. Theorem LSBMinus : forall p q : float, ~ is_Fzero (Fminus radix p q) -> (Zmin (LSB radix p) (LSB radix q) <= LSB radix (Fminus radix p q))%Z. (* Goal: forall (p q : float) (_ : not (is_Fzero (Fminus radix p q))), Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fminus radix p q)) *) intros p q H'1. (* Goal: Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fminus radix p q)) *) elim (LSB_rep_min radix) with (p := p); auto; intros z E. (* Goal: Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fminus radix p q)) *) elim (LSB_rep_min radix) with (p := q); auto; intros z0 E0. replace (LSB radix (Fminus radix p q)) with (LSB radix (Fminus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))). replace (Zmin (LSB radix p) (LSB radix q)) with (Fexp (Fminus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))); [ idtac | simpl in |- *; auto ]. apply Fexp_le_LSB; auto. apply sym_equal; apply LSB_comp; auto. (* Goal: @eq R (FtoR radix (Fminus radix p q)) (FtoR radix (Fminus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))) *) repeat rewrite Fminus_correct; auto with arith. unfold FtoRradix in E; unfold FtoRradix in E0; rewrite E; rewrite E0; auto. Qed. Theorem LSBPlus : forall p q : float, ~ is_Fzero (Fplus radix p q) -> (Zmin (LSB radix p) (LSB radix q) <= LSB radix (Fplus radix p q))%Z. (* Goal: forall (p q : float) (_ : not (is_Fzero (Fplus radix p q))), Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fplus radix p q)) *) intros p q H'. (* Goal: Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fplus radix p q)) *) elim (LSB_rep_min _ radixMoreThanOne p); intros z E. (* Goal: Z.le (Z.min (LSB radix p) (LSB radix q)) (LSB radix (Fplus radix p q)) *) elim (LSB_rep_min _ radixMoreThanOne q); intros z0 E0. replace (LSB radix (Fplus radix p q)) with (LSB radix (Fplus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))). replace (Zmin (LSB radix p) (LSB radix q)) with (Fexp (Fplus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))); [ idtac | simpl in |- *; auto ]. apply Fexp_le_LSB; auto. apply sym_equal; apply LSB_comp; auto. (* Goal: @eq R (FtoR radix (Fplus radix p q)) (FtoR radix (Fplus radix (Float z (LSB radix p)) (Float z0 (LSB radix q)))) *) repeat rewrite Fplus_correct; auto with arith. unfold FtoRradix in E; unfold FtoRradix in E0; rewrite E; rewrite E0; auto. Qed. End FRoundP.
(**************************************************************************** IEEE754 : Fodd Laurent Thery ******************************************************************************) Require Export Fmin. Section FOdd. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. (* We define the parity predicates*) Definition Even (z : Z) : Prop := exists z1 : _, z = (2 * z1)%Z. Definition Odd (z : Z) : Prop := exists z1 : _, z = (2 * z1 + 1)%Z. Theorem OddSEven : forall n : Z, Odd n -> Even (Zsucc n). (* Goal: forall (n : Z) (_ : Odd n), Even (Z.succ n) *) intros n H'; case H'; intros m H'1; exists (Zsucc m). (* Goal: @eq Z (Z.succ n) (Z.add (Z.mul (Zpos (xO xH)) m) (Zpos xH)) *) rewrite H'1; unfold Zsucc in |- *; ring. Qed. Theorem EvenSOdd : forall n : Z, Even n -> Odd (Zsucc n). (* Goal: forall (n : Z) (_ : Odd (Z.succ n)), Even n *) intros n H'; case H'; intros m H'1; exists m. (* Goal: @eq Z (Z.succ n) (Z.add (Z.mul (Zpos (xO xH)) m) (Zpos xH)) *) rewrite H'1; unfold Zsucc in |- *; ring. Qed. Hint Resolve OddSEven EvenSOdd: zarith. Theorem OddSEvenInv : forall n : Z, Odd (Zsucc n) -> Even n. (* Goal: forall (n : Z) (_ : Odd (Z.succ n)), Even n *) intros n H'; case H'; intros m H'1; exists m. (* Goal: @eq Z n (Z.mul (Zpos (xO xH)) m) *) apply Zsucc_inj; rewrite H'1; (unfold Zsucc in |- *; ring). Qed. Theorem EvenSOddInv : forall n : Z, Even (Zsucc n) -> Odd n. (* Goal: forall (n : Z) (_ : Even (Z.succ n)), Odd n *) intros n H'; case H'; intros m H'1; exists (Zpred m). (* Goal: @eq Z n (Z.add (Z.mul (Zpos (xO xH)) (Z.pred m)) (Zpos xH)) *) apply Zsucc_inj; rewrite H'1; (unfold Zsucc, Zpred in |- *; ring). Qed. Theorem EvenO : Even 0. (* Goal: Odd (Zpos xH) *) exists 0%Z; simpl in |- *; auto. Qed. Hint Resolve EvenO: zarith. Theorem Odd1 : Odd 1. (* Goal: Odd (Zpos xH) *) exists 0%Z; simpl in |- *; auto. Qed. Hint Resolve Odd1: zarith. Theorem OddOpp : forall z : Z, Odd z -> Odd (- z). (* Goal: forall (z : Z) (_ : Odd z), Odd (Z.opp z) *) intros z H; case H; intros z1 H1; exists (- Zsucc z1)%Z; rewrite H1. (* Goal: @eq Z (Z.opp (Z.add (Z.mul (Zpos (xO xH)) z1) (Zpos xH))) (Z.add (Z.mul (Zpos (xO xH)) (Z.opp (Z.succ z1))) (Zpos xH)) *) unfold Zsucc in |- *; ring. Qed. Theorem EvenOpp : forall z : Z, Even z -> Even (- z). (* Goal: forall (z : Z) (_ : Even z), Even (Z.opp z) *) intros z H; case H; intros z1 H1; exists (- z1)%Z; rewrite H1; ring. Qed. Hint Resolve OddOpp EvenOpp: zarith. Theorem OddEvenDec : forall n : Z, {Odd n} + {Even n}. (* Goal: forall n : Z, sumbool (Odd n) (Even n) *) intros z; case z; simpl in |- *; auto with zarith. (* Goal: forall p : positive, sumbool (Odd (Zpos p)) (Even (Zpos p)) *) (* Goal: forall p : positive, sumbool (Odd (Zneg p)) (Even (Zneg p)) *) intros p; case p; simpl in |- *; auto with zarith. intros p1; left; exists (Zpos p1); rewrite Zplus_comm; simpl in |- *; auto. (* Goal: forall p : positive, sumbool (Odd (Zpos (xO p))) (Even (Zpos (xO p))) *) (* Goal: forall p : positive, sumbool (Odd (Zneg p)) (Even (Zneg p)) *) intros p1; right; exists (Zpos p1); simpl in |- *; auto. change (forall p : positive, {Odd (- Zpos p)} + {Even (- Zpos p)}) in |- *. (* Goal: forall p : positive, sumbool (Odd (Z.opp (Zpos p))) (Even (Z.opp (Zpos p))) *) intros p; case p; auto with zarith. intros p1; left; apply OddOpp; exists (Zpos p1); rewrite Zplus_comm; simpl in |- *; auto. (* Goal: forall p : positive, sumbool (Odd (Z.opp (Zpos (xO p)))) (Even (Z.opp (Zpos (xO p)))) *) intros p1; right; apply EvenOpp; exists (Zpos p1); simpl in |- *; auto. Qed. Theorem OddNEven : forall n : Z, Odd n -> ~ Even n. (* Goal: forall (n : Z) (_ : Even n), not (Odd n) *) intros n H1; red in |- *; intros H2; case H1; case H2; intros z1 Hz1 z2 Hz2. (* Goal: False *) absurd (n = n); auto. pattern n at 1 in |- *; rewrite Hz1; rewrite Hz2; repeat rewrite (fun x => Zplus_comm x 1). case z1; case z2; simpl in |- *; try (intros; red in |- *; intros; discriminate). intros p p0; case p; simpl in |- *; try (intros; red in |- *; intros; discriminate). Qed. Theorem EvenNOdd : forall n : Z, Even n -> ~ Odd n. (* Goal: forall (n : Z) (_ : Even n), not (Odd n) *) intros n H1; red in |- *; intros H2; case H1; case H2; intros z1 Hz1 z2 Hz2. (* Goal: False *) absurd (n = n); auto. pattern n at 1 in |- *; rewrite Hz1; rewrite Hz2; repeat rewrite (fun x => Zplus_comm x 1). case z1; case z2; simpl in |- *; try (intros; red in |- *; intros; discriminate). intros p p0; case p0; simpl in |- *; try (intros; red in |- *; intros; discriminate). Qed. Hint Resolve OddNEven EvenNOdd: zarith. Theorem EvenPlus1 : forall n m : Z, Even n -> Even m -> Even (n + m). (* Goal: forall (n m : Z) (_ : Even n) (_ : Odd m), Odd (Z.add n m) *) intros n m H H0; case H; case H0; intros z1 Hz1 z2 Hz2. (* Goal: Odd (Z.add n m) *) exists (z2 + z1)%Z; try rewrite Hz1; try rewrite Hz2; ring. Qed. Theorem EvenPlus2 : forall n m : Z, Odd n -> Odd m -> Even (n + m). (* Goal: forall (n m : Z) (_ : Even n) (_ : Odd m), Odd (Z.add n m) *) intros n m H H0; case H; case H0; intros z1 Hz1 z2 Hz2. (* Goal: Even (Z.add n m) *) exists (z2 + z1 + 1)%Z; try rewrite Hz1; try rewrite Hz2; ring. Qed. Theorem OddPlus1 : forall n m : Z, Odd n -> Even m -> Odd (n + m). (* Goal: forall (n m : Z) (_ : Even n) (_ : Odd m), Odd (Z.add n m) *) intros n m H H0; case H; case H0; intros z1 Hz1 z2 Hz2. (* Goal: Odd (Z.add n m) *) exists (z2 + z1)%Z; try rewrite Hz1; try rewrite Hz2; ring. Qed. Theorem OddPlus2 : forall n m : Z, Even n -> Odd m -> Odd (n + m). (* Goal: forall (n m : Z) (_ : Even n) (_ : Odd m), Odd (Z.add n m) *) intros n m H H0; case H; case H0; intros z1 Hz1 z2 Hz2. (* Goal: Odd (Z.add n m) *) exists (z2 + z1)%Z; try rewrite Hz1; try rewrite Hz2; ring. Qed. Hint Resolve EvenPlus1 EvenPlus2 OddPlus1 OddPlus2: zarith. Theorem EvenPlusInv1 : forall n m : Z, Even (n + m) -> Even n -> Even m. (* Goal: forall (n m : Z) (_ : Even (Z.add n m)) (_ : Odd n), Odd m *) intros n m H H0; replace m with (n + m + - n)%Z; auto with zarith. Qed. Theorem EvenPlusInv2 : forall n m : Z, Even (n + m) -> Odd n -> Odd m. (* Goal: forall (n m : Z) (_ : Even (Z.add n m)) (_ : Odd n), Odd m *) intros n m H H0; replace m with (n + m + - n)%Z; auto with zarith. Qed. Theorem OddPlusInv1 : forall n m : Z, Odd (n + m) -> Odd m -> Even n. (* Goal: forall (n m : Z) (_ : Odd (Z.add n m)) (_ : Even m), Odd n *) intros n m H H0; replace n with (n + m + - m)%Z; auto with zarith. Qed. Theorem OddPlusInv2 : forall n m : Z, Odd (n + m) -> Even m -> Odd n. (* Goal: forall (n m : Z) (_ : Odd (Z.add n m)) (_ : Even m), Odd n *) intros n m H H0; replace n with (n + m + - m)%Z; auto with zarith. Qed. Theorem EvenMult1 : forall n m : Z, Even n -> Even (n * m). (* Goal: forall (n m : Z) (_ : Even n), Even (Z.mul n m) *) intros n m H; case H; intros z1 Hz1; exists (z1 * m)%Z; rewrite Hz1; ring. Qed. Theorem EvenMult2 : forall n m : Z, Even m -> Even (n * m). (* Goal: forall (n m : Z) (_ : Even m), Even (Z.mul n m) *) intros n m H; case H; intros z1 Hz1; exists (z1 * n)%Z; rewrite Hz1; ring. Qed. Hint Resolve EvenMult1 EvenMult2: zarith. Theorem OddMult : forall n m : Z, Odd n -> Odd m -> Odd (n * m). intros n m H1 H2; case H1; case H2; intros z1 Hz1 z2 Hz2; exists (2 * z1 * z2 + z1 + z2)%Z; rewrite Hz1; rewrite Hz2; ring. Qed. Hint Resolve OddMult: zarith. Theorem EvenMultInv : forall n m : Z, Even (n * m) -> Odd n -> Even m. (* Goal: forall (n m : Z) (_ : Even (Z.mul n m)) (_ : Odd n), Even m *) intros n m H H0; case (OddEvenDec m); auto; intros Z1. (* Goal: Odd n *) Contradict H; auto with zarith. Qed. Theorem OddMultInv : forall n m : Z, Odd (n * m) -> Odd n. (* Goal: forall (n m : Z) (_ : Odd (Z.mul n m)), Odd n *) intros n m H; case (OddEvenDec n); auto; intros Z1. (* Goal: Odd n *) Contradict H; auto with zarith. Qed. Theorem EvenExp : forall (n : Z) (m : nat), Even n -> Even (Zpower_nat n (S m)). (* Goal: forall (n : Z) (m : nat) (_ : Even n), Even (Zpower_nat n (S m)) *) intros n m; elim m. (* Goal: forall _ : Even n, Even (Zpower_nat n (S O)) *) (* Goal: forall (n0 : nat) (_ : forall _ : Even n, Even (Zpower_nat n (S n0))) (_ : Even n), Even (Zpower_nat n (S (S n0))) *) rewrite Zpower_nat_1; simpl in |- *; auto with zarith. (* Goal: forall (n0 : nat) (_ : forall _ : Even n, Even (Zpower_nat n (S n0))) (_ : Even n), Even (Zpower_nat n (S (S n0))) *) intros n0 H H0; replace (S (S n0)) with (1 + S n0); auto with arith. rewrite Zpower_nat_is_exp; rewrite Zpower_nat_1; simpl in |- *; (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) auto with zarith. Qed. Theorem OddExp : forall (n : Z) (m : nat), Odd n -> Odd (Zpower_nat n m). (* Goal: forall (n : Z) (m : nat) (_ : Odd n), Odd (Zpower_nat n m) *) intros n m; elim m; simpl in |- *. auto with zarith. (* Goal: forall (n0 : nat) (_ : forall _ : Odd n, Odd (Zpower_nat n n0)) (_ : Odd n), Odd (Z.mul n (Zpower_nat n n0)) *) intros n0 H H0; replace (S n0) with (1 + n0); auto with arith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) auto with zarith. Qed. Hint Resolve OddExp EvenExp: zarith. Definition Feven (p : float) := Even (Fnum p). Definition Fodd (p : float) := Odd (Fnum p). Theorem FevenO : forall p : float, is_Fzero p -> Feven p. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros p H'; red in |- *; rewrite H'; simpl in |- *; auto with zarith. Qed. Theorem FevenOrFodd : forall p : float, Feven p \/ Fodd p. (* Goal: forall p : float, or (Feven p) (Fodd p) *) intros p; case (OddEvenDec (Fnum p)); auto. Qed. Theorem FevenSucProp : forall p : float, (Fodd p -> Feven (FSucc b radix precision p)) /\ (Feven p -> Fodd (FSucc b radix precision p)). (* Goal: forall p : float, and (forall _ : Fodd p, Feven (FSucc b radix precision p)) (forall _ : Feven p, Fodd (FSucc b radix precision p)) *) intros p; unfold FSucc, Fodd, Feven in |- *. generalize (Z_eq_bool_correct (Fnum p) (pPred (vNum b))); case (Z_eq_bool (Fnum p) (pPred (vNum b))); intros H'1. (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (Float (nNormMin radix precision) (Z.succ (Fexp p))))) (forall _ : Even (Fnum p), Odd (Fnum (Float (nNormMin radix precision) (Z.succ (Fexp p))))) *) (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) (forall _ : Even (Fnum p), Odd (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) *) rewrite H'1; simpl in |- *; auto. (* Goal: and (forall _ : Odd (pPred (vNum b)), Even (nNormMin radix precision)) (forall _ : Even (pPred (vNum b)), Odd (nNormMin radix precision)) *) (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) (forall _ : Even (Fnum p), Odd (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) *) unfold pPred in |- *; rewrite pGivesBound; unfold nNormMin in |- *. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) case (OddEvenDec radix); auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros H'; split; intros H'0; auto with zarith. (* Goal: Even (Zpower_nat radix (Init.Nat.pred precision)) *) (* Goal: forall _ : Even radix, and (forall _ : Odd (Z.pred (Zpower_nat radix precision)), Even (Zpower_nat radix (Init.Nat.pred precision))) (forall _ : Even (Z.pred (Zpower_nat radix precision)), Odd (Zpower_nat radix (Init.Nat.pred precision))) *) (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) (forall _ : Even (Fnum p), Odd (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) *) apply EvenMultInv with (n := radix); auto. pattern radix at 1 in |- *; rewrite <- Zpower_nat_1; rewrite <- Zpower_nat_is_exp. replace (1 + pred precision) with precision; [ idtac | inversion precisionGreaterThanOne; auto ]. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) rewrite (Zsucc_pred (Zpower_nat radix precision)); auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros H'; split; intros H'0; auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) replace (pred precision) with (S (pred (pred precision))); auto with zarith. (* Goal: Odd (Zpower_nat radix (Init.Nat.pred precision)) *) (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) (forall _ : Even (Fnum p), Odd (Fnum (if Z_eq_bool (Fnum p) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp p) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum p)) (Fexp p) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp p)) else Float (Z.succ (Fnum p)) (Fexp p)))) *) Contradict H'0; apply OddNEven. replace (Zpred (Zpower_nat radix precision)) with (Zpower_nat radix precision + - (1))%Z; [ idtac | unfold Zpred in |- *; simpl in |- *; auto ]. replace precision with (S (pred precision)); [ auto with zarith | inversion precisionGreaterThanOne; auto ]. generalize (Z_eq_bool_correct (Fnum p) (- nNormMin radix precision)); case (Z_eq_bool (Fnum p) (- nNormMin radix precision)); intros H'2. generalize (Z_eq_bool_correct (Fexp p) (- dExp b)); case (Z_eq_bool (Fexp p) (- dExp b)); intros H'3. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) simpl in |- *; auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) simpl in |- *; auto with zarith. (* Goal: and (forall _ : Odd (Fnum p), Even (Z.opp (pPred (vNum b)))) (forall _ : Even (Fnum p), Odd (Z.opp (pPred (vNum b)))) *) (* Goal: and (forall _ : Odd (Fnum p), Even (Fnum (Float (Z.succ (Fnum p)) (Fexp p)))) (forall _ : Even (Fnum p), Odd (Fnum (Float (Z.succ (Fnum p)) (Fexp p)))) *) rewrite H'2; unfold pPred, nNormMin in |- *; rewrite pGivesBound. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) case (OddEvenDec radix); auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros H'; split; intros H'0; auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) apply EvenOpp; apply OddSEvenInv; rewrite <- Zsucc_pred; auto with zarith. Contradict H'0; replace precision with (S (pred precision)); [ auto with zarith | inversion precisionGreaterThanOne; auto ]. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros H'; split; intros H'0; auto with zarith. Contradict H'0; replace (pred precision) with (S (pred (pred precision))); [ auto with zarith | auto with zarith ]. replace precision with (S (pred precision)); [ auto with zarith | inversion precisionGreaterThanOne; auto ]. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) apply OddOpp; apply EvenSOddInv; rewrite <- Zsucc_pred; auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) simpl in |- *; auto with zarith. Qed. Theorem FoddSuc : forall p : float, Fodd p -> Feven (FSucc b radix precision p). (* Goal: forall (p : float) (_ : Feven p), Fodd (FSucc b radix precision p) *) intros p H'; case (FevenSucProp p); auto. Qed. Theorem FevenSuc : forall p : float, Feven p -> Fodd (FSucc b radix precision p). (* Goal: forall (p : float) (_ : Feven p), Fodd (FSucc b radix precision p) *) intros p H'; case (FevenSucProp p); auto. Qed. Theorem FevenFop : forall p : float, Feven p -> Feven (Fopp p). (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros p; unfold Feven, Fopp in |- *; simpl in |- *; auto with zarith. Qed. Theorem FoddFop : forall p : float, Fodd p -> Fodd (Fopp p). (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) intros p; unfold Fodd, Fopp in |- *; simpl in |- *; auto with zarith. Qed. Theorem FevenPred : forall p : float, Fodd p -> Feven (FPred b radix precision p). (* Goal: forall (p : float) (_ : Feven p), Fodd (FPred b radix precision p) *) intros p H'; rewrite FPredFopFSucc; auto with arith. (* Goal: Feven (Fopp p) *) apply FevenFop; auto. (* Goal: Feven (FSucc b radix precision (Fopp p)) *) apply FoddSuc; auto. (* Goal: Fodd (Fopp p) *) apply FoddFop; auto with arith. Qed. Theorem FoddPred : forall p : float, Feven p -> Fodd (FPred b radix precision p). (* Goal: forall (p : float) (_ : Feven p), Fodd (FPred b radix precision p) *) intros p H'; rewrite FPredFopFSucc; auto with arith. (* Goal: Fodd (Fopp (FSucc b radix precision (Fopp p))) *) apply FoddFop; auto. (* Goal: Fodd (FSucc b radix precision (Fnormalize radix b precision p)) *) apply FevenSuc; auto. (* Goal: Feven (Fopp p) *) apply FevenFop; auto. Qed. Definition FNodd (p : float) := Fodd (Fnormalize radix b precision p). Definition FNeven (p : float) := Feven (Fnormalize radix b precision p). Theorem FNoddEq : forall f1 f2 : float, Fbounded b f1 -> Fbounded b f2 -> f1 = f2 :>R -> FNodd f1 -> FNodd f2. (* Goal: forall (f1 f2 : float) (_ : Fbounded b f1) (_ : Fbounded b f2) (_ : @eq R (FtoRradix f1) (FtoRradix f2)) (_ : FNeven f1), FNeven f2 *) intros f1 f2 H' H'0 H'1 H'2; red in |- *. rewrite FcanonicUnique with (3 := pGivesBound) (p := Fnormalize radix b precision f2) (q := Fnormalize radix b precision f1); auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision f2)) (FtoR radix (Fnormalize radix b precision f1)) *) repeat rewrite FnormalizeCorrect; auto. Qed. Theorem FNevenEq : forall f1 f2 : float, Fbounded b f1 -> Fbounded b f2 -> f1 = f2 :>R -> FNeven f1 -> FNeven f2. (* Goal: forall (f1 f2 : float) (_ : Fbounded b f1) (_ : Fbounded b f2) (_ : @eq R (FtoRradix f1) (FtoRradix f2)) (_ : FNeven f1), FNeven f2 *) intros f1 f2 H' H'0 H'1 H'2; red in |- *. rewrite FcanonicUnique with (3 := pGivesBound) (p := Fnormalize radix b precision f2) (q := Fnormalize radix b precision f1); auto with float arith. (* Goal: @eq R (FtoR radix (Fnormalize radix b precision f2)) (FtoR radix (Fnormalize radix b precision f1)) *) repeat rewrite FnormalizeCorrect; auto. Qed. Theorem FNevenFop : forall p : float, FNeven p -> FNeven (Fopp p). (* Goal: forall (p : float) (_ : FNeven p), FNeven (Fopp p) *) intros p; unfold FNeven in |- *. (* Goal: forall _ : Fodd (Fnormalize radix b precision p), Fodd (Fnormalize radix b precision (Fopp p)) *) rewrite Fnormalize_Fopp; auto with arith. (* Goal: Feven (Fopp p) *) intros; apply FevenFop; auto. Qed. Theorem FNoddFop : forall p : float, FNodd p -> FNodd (Fopp p). (* Goal: forall (p : float) (_ : FNodd p), FNodd (Fopp p) *) intros p; unfold FNodd in |- *. (* Goal: forall _ : Fodd (Fnormalize radix b precision p), Fodd (Fnormalize radix b precision (Fopp p)) *) rewrite Fnormalize_Fopp; auto with arith. (* Goal: Fodd (Fopp (FSucc b radix precision (Fopp p))) *) intros; apply FoddFop; auto. Qed. Theorem FNoddSuc : forall p : float, Fbounded b p -> FNodd p -> FNeven (FNSucc b radix precision p). (* Goal: forall (p : float) (_ : Fbounded b p) (_ : FNeven p), FNodd (FNSucc b radix precision p) *) unfold FNodd, FNeven, FNSucc in |- *. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Feven (Fnormalize radix b precision p)), Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) intros p H' H'0. (* Goal: Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: Feven (FSucc b radix precision (Fnormalize radix b precision p)) *) apply FoddSuc; auto with float arith. Qed. Theorem FNevenSuc : forall p : float, Fbounded b p -> FNeven p -> FNodd (FNSucc b radix precision p). (* Goal: forall (p : float) (_ : Fbounded b p) (_ : FNeven p), FNodd (FNSucc b radix precision p) *) unfold FNodd, FNeven, FNSucc in |- *. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Feven (Fnormalize radix b precision p)), Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) intros p H' H'0. (* Goal: Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: Fodd (FSucc b radix precision (Fnormalize radix b precision p)) *) apply FevenSuc; auto. Qed. Theorem FNevenPred : forall p : float, Fbounded b p -> FNodd p -> FNeven (FNPred b radix precision p). (* Goal: forall (p : float) (_ : Fbounded b p) (_ : FNeven p), FNodd (FNPred b radix precision p) *) unfold FNodd, FNeven, FNPred in |- *. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Feven (Fnormalize radix b precision p)), Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) intros p H' H'0. (* Goal: Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: Feven (FPred b radix precision (Fnormalize radix b precision p)) *) apply FevenPred; auto. Qed. Theorem FNoddPred : forall p : float, Fbounded b p -> FNeven p -> FNodd (FNPred b radix precision p). (* Goal: forall (p : float) (_ : Fbounded b p) (_ : FNeven p), FNodd (FNPred b radix precision p) *) unfold FNodd, FNeven, FNPred in |- *. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Feven (Fnormalize radix b precision p)), Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) intros p H' H'0. (* Goal: Fodd (Fnormalize radix b precision (FPred b radix precision (Fnormalize radix b precision p))) *) rewrite FcanonicFnormalizeEq; auto with float arith. (* Goal: Fodd (FPred b radix precision (Fnormalize radix b precision p)) *) apply FoddPred; auto. Qed. Theorem FNevenOrFNodd : forall p : float, FNeven p \/ FNodd p. (* Goal: forall p : float, or (FNeven p) (FNodd p) *) intros p; unfold FNeven, FNodd in |- *; apply FevenOrFodd. Qed. Theorem FnOddNEven : forall n : float, FNodd n -> ~ FNeven n. (* Goal: forall (n : float) (_ : FNodd n), not (FNeven n) *) intros n H'; unfold FNeven, Feven in |- *; apply OddNEven; auto. Qed. Theorem FEvenD : forall p : float, Fbounded b p -> Feven p -> exists q : float, Fbounded b q /\ p = (2%nat * q)%R :>R. (* Goal: forall (p : float) (_ : Fbounded b p) (_ : Feven p), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix q)))) *) intros p H H0; case H0. (* Goal: forall (x : Z) (_ : @eq Z (Fnum p) (Z.mul (Zpos (xO xH)) x)), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix q)))) *) intros z Hz; exists (Float z (Fexp p)); split; auto. (* Goal: Fbounded b (Float z (Fexp p)) *) (* Goal: @eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix (Float z (Fexp p)))) *) repeat split; simpl in |- *; auto with float. (* Goal: Z.lt (Z.abs z) (Zpos (vNum b)) *) (* Goal: @eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix (Float z (Fexp p)))) *) apply Zle_lt_trans with (Zabs (Fnum p)); auto with float zarith. rewrite Hz; rewrite Zabs_Zmult; replace (Zabs 2 * Zabs z)%Z with (Zabs z + Zabs z)%Z; auto with zarith arith. pattern (Zabs z) at 1 in |- *; replace (Zabs z) with (0 + Zabs z)%Z; (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) auto with zarith. (* Goal: Odd (Z.mul n (Zpower_nat n n0)) *) rewrite (Zabs_eq 2); auto with zarith. (* Goal: @eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix (Float z (Fexp p)))) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Fnum p)) (powerRZ (IZR radix) (Fexp p))) (Rmult (Rplus (IZR (Zpos xH)) (IZR (Zpos xH))) (Rmult (IZR z) (powerRZ (IZR radix) (Fexp p)))) *) rewrite Hz; rewrite Rmult_IZR; simpl in |- *; ring. Qed. Theorem FNEvenD : forall p : float, Fbounded b p -> FNeven p -> exists q : float, Fbounded b q /\ p = (2%nat * q)%R :>R. intros p H' H'0; case (FEvenD (Fnormalize radix b precision p)); auto with float zarith arith. (* Goal: forall (x : float) (_ : and (Fbounded b x) (@eq R (FtoRradix (Fnormalize radix b precision p)) (Rmult (INR (S (S O))) (FtoRradix x)))), @ex float (fun q : float => and (Fbounded b q) (@eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix q)))) *) intros x H'1; elim H'1; intros H'2 H'3; clear H'1; exists x; split; auto. (* Goal: @eq R (FtoRradix p) (Rmult (INR (S (S O))) (FtoRradix x)) *) apply sym_eq. (* Goal: @eq R (Rmult (INR (S (S O))) (FtoRradix x)) (FtoRradix p) *) rewrite <- H'3; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision p)) (FtoRradix p) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. Qed. End FOdd. Hint Resolve FevenO FoddSuc FevenSuc FevenFop FoddFop FevenPred FoddPred FNevenFop FNoddFop FNoddSuc FNevenSuc FNevenPred FNoddPred: float.
(**************************************************************************** IEEE754 : ClosestMult Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export FroundMult. Require Export ClosestProp. Section FRoundP. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem closestLessMultPos : forall (p : float) (r : R), Closest b radix r p -> (0 <= r)%R -> (p <= 2%nat * r)%R. (* Goal: forall (p : float) (r : R) (_ : Closest b radix r p) (_ : Rle r (IZR Z0)), Rle (Rmult (INR (S (S O))) r) (FtoRradix p) *) intros p r H' H'0. (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) case ClosestMinOrMax with (1 := H'); intros H'3. (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) apply Rle_trans with r; auto with real. (* Goal: Rle (FtoRradix p) r *) (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) apply isMin_inv1 with (1 := H'3). (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) case (MinEx b radix precision) with (r := r); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) intros min Hmin. (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) apply Rle_trans with (min + p)%R; auto with real. (* Goal: Rle (FtoRradix p) (Rplus (FtoRradix min) (FtoRradix p)) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix p)) (Rmult (INR (S (S O))) r) *) apply Rplus_le_reg_l with (r := (- p)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix p)) (FtoRradix p)) (Rplus (Ropp (FtoRradix p)) (Rplus (FtoRradix min) (FtoRradix p))) *) (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix p)) (Rmult (INR (S (S O))) r) *) replace (- p + p)%R with 0%R; [ idtac | ring ]. replace (- p + (min + p))%R with (FtoRradix min); [ apply (RleMinR0 b radix precision) with (r := r); auto | ring ]. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix p)) (Rmult (INR (S (S O))) r) *) apply Rplus_le_reg_l with (r := (- r)%R). (* Goal: Rle (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p))) (Rplus (Ropp r) (Rmult (INR (S (S O))) r)) *) apply Rplus_le_reg_l with (r := (- min)%R). (* Goal: Rle (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) replace (- min + (- r + (min + p)))%R with (Rabs (p - r)). (* Goal: Rle (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) replace (- min + (- r + 2%nat * r))%R with (Rabs (min - r)). (* Goal: Rle (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix min) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) case H'. (* Goal: forall (_ : Fbounded b p) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix f) r))), Rle (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix min) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) intros H'1 H'2; apply H'2; auto. (* Goal: Fbounded b min *) (* Goal: @eq R (Rabs (Rminus (FtoRradix min) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) case Hmin; auto. (* Goal: @eq R (Rabs (Rminus (FtoRradix min) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rmult (INR (S (S O))) r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) rewrite Faux.Rabsolu_left1; simpl in |- *. (* Goal: @eq R (Rminus (FtoRradix p) r) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) (* Goal: Rge (Rminus (FtoRradix p) r) (IZR Z0) *) ring; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) apply Rle_minus; apply isMin_inv1 with (1 := Hmin). (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) rewrite Rabs_right; simpl in |- *. (* Goal: @eq R (Rminus (FtoRradix p) r) (Rplus (Ropp (FtoRradix min)) (Rplus (Ropp r) (Rplus (FtoRradix min) (FtoRradix p)))) *) (* Goal: Rge (Rminus (FtoRradix p) r) (IZR Z0) *) ring; auto. (* Goal: Rge (Rminus (FtoRradix p) r) (IZR Z0) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (IZR Z0)) (Rplus r (Rminus (FtoRradix p) r)) *) replace (r + 0)%R with r; [ idtac | ring ]. replace (r + (p - r))%R with (FtoRradix p); [ apply isMax_inv1 with (1 := H'3) | ring ]. Qed. Theorem closestLessMultNeg : forall (p : float) (r : R), Closest b radix r p -> (r <= 0)%R -> (2%nat * r <= p)%R. (* Goal: forall (p : float) (r : R) (_ : Closest b radix r p) (_ : Rle r (IZR Z0)), Rle (Rmult (INR (S (S O))) r) (FtoRradix p) *) intros p r H' H'0. (* Goal: Rle (Rmult (INR (S (S O))) r) (FtoRradix p) *) replace (2%nat * r)%R with (- (2%nat * - r))%R; [ idtac | ring ]. replace (FtoRradix p) with (- - p)%R; [ unfold FtoRradix in |- *; rewrite <- Fopp_correct | ring ]. (* Goal: Rle (Ropp (Rmult (INR (S (S O))) (Ropp r))) (Ropp (FtoR radix (Fopp p))) *) apply Ropp_le_contravar. (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) apply closestLessMultPos; auto. (* Goal: Closest b radix (Ropp r) (Fopp p) *) (* Goal: Rle (IZR Z0) (Ropp r) *) apply ClosestOpp; auto. (* Goal: Rle (IZR Z0) (Ropp r) *) replace 0%R with (-0)%R; [ auto with real | ring ]. Qed. Theorem closestLessMultAbs : forall (p : float) (r : R), Closest b radix r p -> (Rabs p <= 2%nat * Rabs r)%R. (* Goal: forall (p : float) (r : R) (_ : Closest b radix r p), Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) intros p r H'; case (Rle_or_lt 0 r); intros H'1. (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle (FtoRradix p) (Rmult (INR (S (S O))) r) *) (* Goal: Rge (FtoRradix p) (IZR Z0) *) (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) apply closestLessMultPos; auto. apply Rle_ge; apply (RleRoundedR0 b radix precision) with (P := Closest b radix) (r := r); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle r (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: Rle (Rabs (FtoRradix p)) (Rmult (INR (S (S O))) (Rabs r)) *) repeat rewrite Faux.Rabsolu_left1; auto. replace (2%nat * - r)%R with (- (2%nat * r))%R; [ apply Ropp_le_contravar | ring ]. (* Goal: Rle (Rmult (INR (S (S O))) r) (FtoRradix p) *) (* Goal: Rle r (IZR Z0) *) (* Goal: Rle (FtoRradix p) (IZR Z0) *) apply closestLessMultNeg; auto. (* Goal: Rle r (IZR Z0) *) apply Rlt_le; auto. (* Goal: Rle r (IZR Z0) *) apply Rlt_le; auto. apply (RleRoundedLessR0 b radix precision) with (P := Closest b radix) (r := r); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Rle r (IZR Z0) *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: Rle r (IZR Z0) *) apply Rlt_le; auto. Qed. Theorem errorBoundedMultClosest_aux : forall p q pq : float, Fbounded b p -> Fbounded b q -> Closest b radix (p * q) pq -> (- dExp b <= Fexp p + Fexp q)%Z -> (p * q - pq)%R <> 0%R :>R -> ex (fun r : float => ex (fun s : float => Fcanonic radix b r /\ Fbounded b r /\ Fbounded b s /\ r = pq :>R /\ s = (p * q - r)%R :>R /\ Fexp s = (Fexp p + Fexp q)%Z :>Z /\ (Fexp s <= Fexp r)%Z /\ (Fexp r <= precision + (Fexp p + Fexp q))%Z)). (* Goal: forall (p q pq : float) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix (Rmult (FtoRradix p) (FtoRradix q)) pq) (_ : Z.le (Z.opp (Z.of_N (dExp b))) (Z.add (Fexp p) (Fexp q))) (_ : not (@eq R (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix pq)) (IZR Z0))), @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b r) (and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))))))))))) *) intros p q pq Hp Hq H1 H2 H3. cut (RoundedModeP b radix (Closest b radix)); [ intros H4 | apply ClosestRoundedModeP with precision; auto ]. lapply (errorBoundedMultExp b radix precision); [ intros H'2; lapply H'2; [ intros H'3; lapply H'3; [ intros H'4; lapply (H'4 (Closest b radix)); [ intros H'7; elim (H'7 p q pq); [ intros r E; elim E; intros s E0; elim E0; intros H'15 H'16; elim H'16; intros H'17 H'18; elim H'18; intros H'19 H'20; elim H'20; intros H'21 H'22; elim H'22; intros H'23 H'24; elim H'24; intros H'25 H'26; clear H'24 H'22 H'20 H'18 H'16 E0 E H'3 H'2 | clear H'3 H'2 | clear H'3 H'2 | clear H'3 H'2 | clear H'3 H'2 ] | clear H'3 H'2 ] | clear H'3 H'2 ] | clear H'2 ] | idtac]; auto. (* Goal: @ex float (fun r : float => @ex float (fun s : float => and (Fcanonic radix b r) (and (Fbounded b r) (and (Fbounded b s) (and (@eq R (FtoRradix r) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix r))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp r)) (Z.le (Fexp r) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))))))))))) *) exists (Fnormalize radix b precision r); exists s. cut (Fbounded b (Fnormalize radix b precision r)); [ intros H5 | apply FnormalizeBounded; auto with arith ]. (* Goal: and (Fcanonic radix b (Fnormalize radix b precision r)) (and (Fbounded b (Fnormalize radix b precision r)) (and (Fbounded b s) (and (@eq R (FtoRradix (Fnormalize radix b precision r)) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fnormalize radix b precision r)))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp (Fnormalize radix b precision r))) (Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q)))))))))) *) split; [ apply FnormalizeCanonic; auto with arith | idtac ]. (* Goal: and (Fbounded b (Fnormalize radix b precision r)) (and (Fbounded b s) (and (@eq R (FtoRradix (Fnormalize radix b precision r)) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fnormalize radix b precision r)))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp (Fnormalize radix b precision r))) (Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))) *) repeat (split; auto). unfold FtoRradix in |- *; rewrite <- H'19; unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. (* Goal: @eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fnormalize radix b precision r))) *) (* Goal: Z.le (Fexp s) (Fexp (Fnormalize radix b precision r)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))) *) unfold FtoRradix in |- *; rewrite FnormalizeCorrect; auto with arith. (* Goal: Z.le (Fexp s) (Fexp (Fnormalize radix b precision r)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))) *) apply Zlt_le_weak. apply RoundedModeErrorExpStrict with b radix precision (Closest b radix) (p * q)%R; auto with arith. (* Goal: Closest b radix (Rmult (FtoRradix p) (FtoRradix q)) (Fnormalize radix b precision r) *) (* Goal: @eq R (FtoR radix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoR radix (Fnormalize radix b precision r))) *) (* Goal: not (@eq R (FtoR radix s) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))) *) generalize ClosestCompatible; unfold CompatibleP in |- *; intros H6. generalize (H6 b radix (FtoRradix p * FtoRradix q)%R (FtoRradix p * FtoRradix q)%R pq); intros H9; apply H9; auto. (* Goal: @eq R (FtoR radix r) (FtoR radix (Fnormalize radix b precision r)) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision r) *) rewrite FnormalizeCorrect; auto with real arith. (* Goal: @eq R (FtoR radix r) (FtoR radix (Fnormalize radix b precision r)) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision r) *) rewrite FnormalizeCorrect; auto with real arith. (* Goal: not (@eq R (FtoR radix s) (IZR Z0)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))) *) rewrite H'21; rewrite H'19; auto. (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))) *) apply Zle_trans with (Fexp r); auto. (* Goal: Z.le (Fexp (Fnormalize radix b precision r)) (Fexp r) *) apply FcanonicLeastExp with radix b precision; auto with arith. (* Goal: @eq R (FtoR radix r) (FtoR radix (Fnormalize radix b precision r)) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision r) *) rewrite FnormalizeCorrect; auto with real arith. (* Goal: Fcanonic radix b (Fnormalize radix b precision r) *) apply FnormalizeCanonic; auto with arith. Qed. Theorem errorBoundedMultClosest : forall p q pq : float, Fbounded b p -> Fbounded b q -> Closest b radix (p * q) pq -> (- dExp b <= Fexp p + Fexp q)%Z -> (- dExp b <= Fexp (Fnormalize radix b precision pq) - precision)%Z -> ex (fun r : float => ex (fun s : float => Fcanonic radix b r /\ Fbounded b r /\ Fbounded b s /\ r = pq :>R /\ s = (p * q - r)%R :>R /\ Fexp s = (Fexp r - precision)%Z :>Z)). intros. cut (RoundedModeP b radix (Closest b radix)); [ intros G1 | apply ClosestRoundedModeP with precision; auto ]. case (Req_dec (p * q - pq) 0); intros U. exists (Fnormalize radix b precision pq); exists (Fzero (Fexp (Fnormalize radix b precision pq) - precision)). cut (Fbounded b pq); [ intros G2 | apply RoundedModeBounded with radix (Closest b radix) (p * q)%R; auto ]. cut (Fcanonic radix b (Fnormalize radix b precision pq)); [ intros G3 | apply FnormalizeCanonic; auto with arith ]. cut (Fbounded b (Fnormalize radix b precision pq)); [ intros G4 | apply FnormalizeBounded; auto with arith ]. cut (Fnormalize radix b precision pq = pq :>R); [ intros G5 | unfold FtoRradix in |- *; apply FnormalizeCorrect; auto with arith ]. (* Goal: and (Fbounded b (Fnormalize radix b precision r)) (and (Fbounded b s) (and (@eq R (FtoRradix (Fnormalize radix b precision r)) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fnormalize radix b precision r)))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp (Fnormalize radix b precision r))) (Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))) *) repeat (split; auto). rewrite G5; unfold FtoRradix in |- *; rewrite FzeroisReallyZero; auto with real. lapply (errorBoundedMultClosest_aux p q pq); auto; intros H5. lapply H5; auto; intros H6; clear H5. lapply H6; auto; intros H5; clear H6. lapply H5; auto; intros H6; clear H5. lapply H6; auto; intros H5; clear H6. elim H5; intros r H6; clear H5. elim H6; intros s H5; clear H6. elim H5; intros H7 H6; clear H5. elim H6; intros H8 H9; clear H6. elim H9; intros H6 H10; clear H9. elim H10; intros H9 H11; clear H10. elim H11; intros H10 H12; clear H11. elim H12; intros H11 H13; clear H12. elim H13; intros H12 H14; clear H13. cut (ex (fun m : Z => s = Float m (Fexp r - precision) :>R /\ (Zabs m <= pPred (vNum b))%Z)). intros H13; elim H13; intros m H15; elim H15; intros H16 H17; clear H15 H13. exists r; exists (Float m (Fexp r - precision)). split; auto. split; auto. split. (* Goal: and (Fbounded b (Fnormalize radix b precision r)) (and (Fbounded b s) (and (@eq R (FtoRradix (Fnormalize radix b precision r)) (FtoRradix pq)) (and (@eq R (FtoRradix s) (Rminus (Rmult (FtoRradix p) (FtoRradix q)) (FtoRradix (Fnormalize radix b precision r)))) (and (@eq Z (Fexp s) (Z.add (Fexp p) (Fexp q))) (and (Z.le (Fexp s) (Fexp (Fnormalize radix b precision r))) (Z.le (Fexp (Fnormalize radix b precision r)) (Z.add (Z.of_nat precision) (Z.add (Fexp p) (Fexp q))))))))) *) 2: repeat (split; auto). 2: rewrite <- H16; auto. split; simpl in |- *. generalize H17; unfold pPred in |- *; apply Zle_Zpred_inv. replace r with (Fnormalize radix b precision pq); auto with zarith. apply FcanonicUnique with radix b precision; auto with zarith. apply FnormalizeCanonic; auto with zarith; elim H1; auto. rewrite FnormalizeCorrect; auto with real zarith. cut (radix <> 0%Z :>Z); [ intros V | auto with arith real zarith ]. cut (0 < radix)%Z; [ intros V2 | auto with arith real zarith ]. rewrite H10; unfold FtoRradix in |- *; rewrite <- Fmult_correct; auto. rewrite <- Fminus_correct; fold FtoRradix in |- *; auto. unfold Fmult in |- *; unfold Fminus in |- *; unfold Fopp in |- *; unfold Fplus in |- *; simpl in |- *. unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *. rewrite Zmin_le1; auto with zarith. replace (Fnum p * Fnum q * Zpower_nat radix (Zabs_nat (Fexp p + Fexp q - (Fexp p + Fexp q))))%Z with (Fnum p * Fnum q)%Z. 2: replace (Fexp p + Fexp q - (Fexp p + Fexp q))%Z with 0%Z; auto with zarith arith; simpl in |- *. 2: auto with zarith. exists ((Fnum p * Fnum q + - Fnum r * Zpower_nat radix (Zabs_nat (Fexp r - (Fexp p + Fexp q)))) * Zpower_nat radix (Zabs_nat (Fexp p + Fexp q + (precision - Fexp r))))%Z; split. rewrite plus_IZR. repeat rewrite Rmult_IZR. rewrite plus_IZR. repeat rewrite Rmult_IZR. rewrite (Zpower_nat_powerRZ_absolu radix (Fexp r - (Fexp p + Fexp q))). 2: auto with zarith arith. rewrite (Zpower_nat_powerRZ_absolu radix (Fexp p + Fexp q + (precision - Fexp r))) . 2: auto with zarith arith. cut (radix <> 0%R :>R); [ intros W | auto with real arith zarith ]. unfold Zminus in |- *. repeat rewrite powerRZ_add; try rewrite <- INR_IZR_INZ; auto. apply trans_eq with ((Fnum p * Fnum q + (- Fnum r)%Z * (powerRZ radix (Fexp r) * powerRZ radix (- (Fexp p + Fexp q)))) * (powerRZ radix (Fexp p) * powerRZ radix (Fexp q)))%R. ring; ring. apply trans_eq with ((Fnum p * Fnum q + (- Fnum r)%Z * (powerRZ radix (Fexp r) * powerRZ radix (- (Fexp p + Fexp q)))) * (powerRZ radix (Fexp p) * powerRZ radix (Fexp q) * (powerRZ radix precision * powerRZ radix (- precision))) * (powerRZ radix (Fexp r) * powerRZ radix (- Fexp r)))%R. 2: ring; ring. replace (powerRZ radix precision * powerRZ radix (- precision))%R with 1%R. replace (powerRZ radix (Fexp r) * powerRZ radix (- Fexp r))%R with 1%R; try ring. rewrite <- powerRZ_add; try rewrite <- INR_IZR_INZ; auto. rewrite Zplus_opp_r; simpl in |- *; auto. rewrite <- powerRZ_add; try rewrite <- INR_IZR_INZ; auto. rewrite Zplus_opp_r; simpl in |- *; auto. apply le_IZR; rewrite <- Faux.Rabsolu_Zabs. rewrite Rmult_IZR; rewrite plus_IZR. repeat rewrite Rmult_IZR. rewrite (Zpower_nat_powerRZ_absolu radix (Fexp p + Fexp q + (precision - Fexp r))) . 2: auto with zarith arith. rewrite (Zpower_nat_powerRZ_absolu radix (Fexp r - (Fexp p + Fexp q))). 2: auto with zarith arith. rewrite powerRZ_add; try rewrite <- INR_IZR_INZ; auto with real arith. replace ((Fnum p * Fnum q + (- Fnum r)%Z * powerRZ radix (Fexp r - (Fexp p + Fexp q))) * (powerRZ radix (Fexp p + Fexp q) * powerRZ radix (precision - Fexp r)))%R with ((Fnum p * Fnum q + (- Fnum r)%Z * powerRZ radix (Fexp r - (Fexp p + Fexp q))) * powerRZ radix (Fexp p + Fexp q) * powerRZ radix (precision - Fexp r))%R; [ idtac | ring; ring ]. rewrite Rabs_mult. rewrite (Rabs_right (powerRZ radix (precision - Fexp r))). 2: apply Rle_ge; apply powerRZ_le; auto with real zarith. apply Rmult_le_reg_l with (powerRZ radix (Fexp r - precision)). apply powerRZ_lt; auto with real arith. rewrite Rmult_comm; rewrite Rmult_assoc; rewrite <- powerRZ_add. 2: auto with zarith arith real. replace (precision - Fexp r + (Fexp r - precision))%Z with 0%Z; [ simpl in |- * | ring ]. apply Rle_trans with (Rabs ((Fnum p * Fnum q + (- Fnum r)%Z * powerRZ radix (Fexp r - (Fexp p + Fexp q))) * powerRZ radix (Fexp p + Fexp q))); [ right; ring | idtac ]. replace ((Fnum p * Fnum q + (- Fnum r)%Z * powerRZ radix (Fexp r - (Fexp p + Fexp q))) * powerRZ radix (Fexp p + Fexp q))%R with (p * q - r)%R. 2: unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *; unfold Rminus in |- *. 2: unfold Zminus in |- *; repeat rewrite Ropp_Ropp_IZR. 2: repeat rewrite powerRZ_add; auto with real arith. 2: apply trans_eq with (Fnum p * Fnum q * (powerRZ radix (Fexp p) * powerRZ radix (Fexp q)) + - Fnum r * (powerRZ radix (Fexp r) * (powerRZ radix (- (Fexp p + Fexp q)) * (powerRZ radix (Fexp p) * powerRZ radix (Fexp q)))))%R; [ idtac | ring ]. 2: replace (powerRZ radix (- (Fexp p + Fexp q)) * (powerRZ radix (Fexp p) * powerRZ radix (Fexp q)))%R with 1%R; try ring. 2: repeat rewrite <- powerRZ_add; auto with real arith. 2: replace (- (Fexp p + Fexp q) + (Fexp p + Fexp q))%Z with 0%Z; simpl in |- *; simpl; ring. apply Rle_trans with (powerRZ radix (Fexp r) * / 2%nat)%R. rewrite <- H10; replace (powerRZ radix (Fexp r)) with (FtoRradix (Float 1%nat (Fexp r))); unfold FtoRradix in |- *; [ idtac | unfold FtoR in |- *; simpl in |- *; ring ]. apply ClosestErrorBound with b precision (p * q)%R; auto. apply (ClosestCompatible b radix (p * q)%R (p * q)%R pq); auto. unfold Zminus in |- *; rewrite powerRZ_add; auto with real arith. rewrite Rmult_assoc; apply Rmult_le_compat_l. apply powerRZ_le; auto with real arith. unfold pPred, Zpred in |- *; rewrite pGivesBound. rewrite plus_IZR; rewrite Zpower_nat_Z_powerRZ. replace (powerRZ radix (- precision) * (powerRZ radix precision + (-1)%Z))%R with (1 + - powerRZ radix (- precision))%R. apply Rle_trans with (1 + - powerRZ radix (- 1%nat))%R. simpl in |- *. replace (radix * 1)%R with (IZR radix); [ idtac | ring ]. replace (/ (1 + 1))%R with (1 + - / 2)%R. (* Goal: Rle (Ropp (Rmult (INR (S (S O))) (Ropp r))) (Ropp (FtoR radix (Fopp p))) *) apply Rplus_le_compat_l; apply Ropp_le_contravar. apply Rle_Rinv; auto with real arith zarith. replace 2%R with (1 + 1)%R; auto with real arith zarith. cut ((1 + 1)%R <> 0%R :>R); [ intros | idtac ]. 2: replace 2%R with (INR 2); auto with real arith zarith. apply Rmult_eq_reg_l with (1 + 1)%R; auto. rewrite Rmult_plus_distr_l. simpl. rewrite (Rmult_comm (1 + 1) (- / (1 + 1))). rewrite Ropp_mult_distr_l_reverse. rewrite (Rmult_comm (/ (1 + 1)) (1 + 1)). rewrite Rinv_r; auto with real; ring. (* Goal: Rle (Ropp (Rmult (INR (S (S O))) (Ropp r))) (Ropp (FtoR radix (Fopp p))) *) apply Rplus_le_compat_l; apply Ropp_le_contravar. apply Rle_powerRZ; auto with real arith zarith. rewrite Rmult_plus_distr_l. rewrite <- powerRZ_add; auto with real arith. replace (- precision + precision)%Z with 0%Z; simpl in |- *; ring. Qed. End FRoundP.
(**************************************************************************** IEEE754 : Fprop Laurent Thery ******************************************************************************) Require Export Fbound. Section Fprop. Variable radix : Z. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Variable b : Fbound. Theorem SterbenzAux : forall x y : float, Fbounded b x -> Fbounded b y -> (y <= x)%R -> (x <= 2%nat * y)%R -> Fbounded b (Fminus radix x y). (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix y)) (FtoRradix x)) (_ : Rle (FtoRradix x) (Rmult (INR (S (S O))) (FtoRradix y))), Fbounded b (Fminus radix x y) *) intros x y H' H'0 H'1 H'2. (* Goal: Fbounded b (Fminus radix x y) *) cut (0 <= Fminus radix x y)%R; [ intros Rle1 | idtac ]. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) cut (Fminus radix x y <= y)%R; [ intros Rle2 | idtac ]. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) case (Zle_or_lt (Fexp x) (Fexp y)); intros Zle1. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat split. (* Goal: Z.lt (Z.abs (Fnum (Fminus radix x y))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Zle_lt_trans with (Zabs (Fnum x)); auto with float. (* Goal: Z.le (Z.abs (Fnum (Fminus radix x y))) (Z.abs (Fnum x)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) change (Fnum (Fabs (Fminus radix x y)) <= Fnum (Fabs x))%Z in |- *. (* Goal: Z.le (Fnum (Fabs (Fminus radix x y))) (Fnum (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix (Fabs (Fminus radix x y))) (FtoR radix (Fabs y)) *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat rewrite Fabs_correct. (* Goal: Rle (Rabs (FtoR radix (Fminus radix x y))) (Rabs (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat rewrite Rabs_pos_eq; auto. (* Goal: Rle (IZR Z0) (FtoR radix x) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs x)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_trans with (2 := H'1); auto. (* Goal: Rle (IZR Z0) (FtoR radix x) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs x)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_trans with (2 := H'1); auto. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_trans with (2 := Rle2); auto. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs x)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) unfold Fminus in |- *; simpl in |- *; apply Zmin_le1; auto. (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) unfold Fminus in |- *; simpl in |- *; rewrite Zmin_le1; auto with float. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat split. (* Goal: Z.lt (Z.abs (Fnum (Fminus radix x y))) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Zle_lt_trans with (Zabs (Fnum y)); auto with float. (* Goal: Z.le (Z.abs (Fnum (Fminus radix x y))) (Z.abs (Fnum y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) change (Fnum (Fabs (Fminus radix x y)) <= Fnum (Fabs y))%Z in |- *. (* Goal: Z.le (Fnum (Fabs (Fminus radix x y))) (Fnum (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with arith. (* Goal: Rle (FtoR radix (Fabs (Fminus radix x y))) (FtoR radix (Fabs y)) *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat rewrite Fabs_correct. (* Goal: Rle (Rabs (FtoR radix (Fminus radix x y))) (Rabs (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) repeat rewrite Rabs_pos_eq; auto. (* Goal: Rle (IZR Z0) (FtoR radix y) *) (* Goal: Z.lt Z0 radix *) (* Goal: Z.lt Z0 radix *) (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) apply Rle_trans with (2 := Rle2); auto. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. (* Goal: @eq Z (Fexp (Fabs (Fminus radix x y))) (Fexp (Fabs y)) *) (* Goal: Z.le (Z.opp (Z.of_N (dExp b))) (Fexp (Fminus radix x y)) *) (* Goal: Rle (FtoRradix (Fminus radix x y)) (FtoRradix y) *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) unfold Fminus in |- *; simpl in |- *; apply Zmin_le2; auto with zarith. unfold Fminus in |- *; simpl in |- *; rewrite Zmin_le2; auto with float zarith. (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) rewrite (Fminus_correct radix); auto with arith; fold FtoRradix in |- *. (* Goal: Rle (IZR Z0) (Rminus (FtoRradix x) (FtoRradix y)) *) (* Goal: Z.lt Z0 radix *) apply Rplus_le_reg_l with (r := FtoRradix y); auto. (* Goal: Rle (Rplus (FtoRradix y) (IZR Z0)) (Rplus (FtoRradix y) (Rminus (FtoRradix x) (FtoRradix y))) *) (* Goal: Z.lt Z0 radix *) replace (y + (x - y))%R with (FtoRradix x); [ idtac | ring ]. (* Goal: Rle (FtoRradix x) (Rplus (FtoRradix y) (FtoRradix y)) *) (* Goal: Z.lt Z0 radix *) (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) replace (y + y)%R with (2%nat * y)%R; [ auto | simpl in |- *; ring ]. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. (* Goal: Rle (IZR Z0) (FtoRradix (Fminus radix x y)) *) rewrite (Fminus_correct radix); auto with arith; fold FtoRradix in |- *. (* Goal: Rle (IZR Z0) (Rminus (FtoRradix x) (FtoRradix y)) *) (* Goal: Z.lt Z0 radix *) apply Rplus_le_reg_l with (r := FtoRradix y); auto. (* Goal: Rle (Rplus (FtoRradix y) (IZR Z0)) (Rplus (FtoRradix y) (Rminus (FtoRradix x) (FtoRradix y))) *) (* Goal: Z.lt Z0 radix *) replace (y + (x - y))%R with (FtoRradix x); [ idtac | ring ]. (* Goal: Rle (Rplus (FtoRradix y) (IZR Z0)) (FtoRradix x) *) (* Goal: Z.lt Z0 radix *) replace (y + 0)%R with (FtoRradix y); [ auto | simpl in |- *; ring ]. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. Qed. Theorem Sterbenz : forall x y : float, Fbounded b x -> Fbounded b y -> (/ 2%nat * y <= x)%R -> (x <= 2%nat * y)%R -> Fbounded b (Fminus radix x y). (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix y)) (FtoRradix x)) (_ : Rle (FtoRradix x) (Rmult (INR (S (S O))) (FtoRradix y))), Fbounded b (Fminus radix x y) *) intros x y H' H'0 H'1 H'2. (* Goal: Fbounded b (Fminus radix x y) *) cut (y <= 2%nat * x)%R; [ intros Le1 | idtac ]. (* Goal: Fbounded b (Fminus radix x y) *) case (Rle_or_lt x y); intros Le2; auto. (* Goal: Fbounded b (Fminus radix x y) *) apply oppBoundedInv; auto. (* Goal: Fbounded b (Fopp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) rewrite Fopp_Fminus. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix y) (Rmult (INR (S (S O))) (FtoRradix x)) *) apply SterbenzAux; auto with real. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Rle (FtoRradix y) (Rmult (INR (S (S O))) (FtoRradix x)) *) apply SterbenzAux; auto with real. (* Goal: Rle (FtoRradix y) (Rmult (INR (S (S O))) (FtoRradix x)) *) apply Rmult_le_reg_l with (r := (/ 2%nat)%R). (* Goal: Rlt (IZR Z0) (Rinv (INR (S (S O)))) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix y)) (Rmult (Rinv (INR (S (S O)))) (Rmult (INR (S (S O))) (FtoRradix x))) *) apply Rinv_0_lt_compat; auto with real. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix y)) (Rmult (Rinv (INR (S (S O)))) (Rmult (INR (S (S O))) (FtoRradix x))) *) rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix y)) (Rmult (IZR (Zpos xH)) (FtoRradix x)) *) rewrite Rmult_1_l; auto. Qed. Theorem BminusSameExpAux : forall x y : float, Fbounded b x -> Fbounded b y -> (0 <= y)%R -> (y <= x)%R -> Fexp x = Fexp y -> Fbounded b (Fminus radix x y). (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (FtoRradix x) (IZR Z0)) (_ : Rle (FtoRradix y) (IZR Z0)) (_ : @eq Z (Fexp x) (Fexp y)), Fbounded b (Fminus radix x y) *) intros x y H' H'0 H'1 H'2 H'3. (* Goal: Fbounded b (Fminus radix x y) *) cut (0 < radix)%Z; [ intros Z1 | idtac ]. (* Goal: Fbounded b (Fminus radix x y) *) (* Goal: Z.lt Z0 radix *) rewrite minusSameExp; auto. (* Goal: Fbounded b (Float (Z.sub (Fnum x) (Fnum y)) (Fexp x)) *) (* Goal: Z.lt Z0 radix *) repeat split; simpl in |- *; auto with float. (* Goal: Z.lt (Z.abs (Z.sub (Fnum x) (Fnum y))) (Zpos (vNum b)) *) (* Goal: Z.lt Z0 radix *) apply Zle_lt_trans with (Zabs (Fnum x)); auto with float zarith. change (Fnum (Fabs (Float (Fnum x - Fnum y) (Fexp x))) <= Fnum (Fabs x))%Z in |- *. (* Goal: Z.le (Fnum (Fabs (Float (Z.sub (Fnum x) (Fnum y)) (Fexp x)))) (Fnum (Fabs x)) *) (* Goal: Z.lt Z0 radix *) apply Rle_Fexp_eq_Zle with (radix := radix); auto with zarith. (* Goal: Rle (FtoR radix (Fabs (Float (Z.sub (Fnum x) (Fnum y)) (Fexp x)))) (FtoR radix (Fabs x)) *) (* Goal: Z.lt Z0 radix *) rewrite <- (minusSameExp radix); auto. repeat rewrite (Fabs_correct radix); try rewrite Fminus_correct; auto with zarith. (* Goal: Rle (Rabs (Rminus (FtoR radix x) (FtoR radix y))) (Rabs (FtoR radix x)) *) (* Goal: Z.lt Z0 radix *) repeat rewrite Rabs_pos_eq; auto with real. (* Goal: Rle (Rminus (FtoR radix x) (FtoR radix y)) (FtoR radix x) *) (* Goal: Rle (IZR Z0) (FtoR radix x) *) (* Goal: Rle (IZR Z0) (Rminus (FtoR radix x) (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) apply Rle_trans with (x - 0)%R; auto with real. (* Goal: Rle (Rminus (FtoRradix x) (FtoRradix x)) (Rminus (FtoR radix x) (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) unfold Rminus in |- *; auto with real. (* Goal: Rle (IZR Z0) (FtoR radix x) *) (* Goal: Rle (IZR Z0) (Rminus (FtoR radix x) (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) apply Rle_trans with (FtoRradix y); auto with real. (* Goal: Rle (IZR Z0) (Rminus (FtoR radix x) (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) replace 0%R with (x - x)%R; auto with real. (* Goal: Rle (Rminus (FtoRradix x) (FtoRradix x)) (Rminus (FtoR radix x) (FtoR radix y)) *) (* Goal: Z.lt Z0 radix *) unfold Rminus in |- *; auto with real. (* Goal: Z.lt Z0 radix *) apply Zlt_trans with (2 := radixMoreThanOne); auto with zarith. Qed. Theorem BminusSameExp : forall x y : float, Fbounded b x -> Fbounded b y -> (0 <= x)%R -> (0 <= y)%R -> Fexp x = Fexp y -> Fbounded b (Fminus radix x y). (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (FtoRradix x) (IZR Z0)) (_ : Rle (FtoRradix y) (IZR Z0)) (_ : @eq Z (Fexp x) (Fexp y)), Fbounded b (Fminus radix x y) *) intros x y H' H'0 H'1 H'2 H'3. (* Goal: Fbounded b (Fminus radix x y) *) case (Rle_or_lt x y); intros Le2; auto. (* Goal: Fbounded b (Fminus radix x y) *) apply oppBoundedInv; auto. (* Goal: Fbounded b (Fopp (Fminus radix x y)) *) (* Goal: Fbounded b (Fminus radix x y) *) rewrite Fopp_Fminus. (* Goal: Fbounded b (Fminus radix y x) *) (* Goal: Fbounded b (Fminus radix x y) *) apply BminusSameExpAux; auto. (* Goal: Fbounded b (Fminus radix x y) *) apply BminusSameExpAux; auto with real. Qed. Theorem BminusSameExpNeg : forall x y : float, Fbounded b x -> Fbounded b y -> (x <= 0)%R -> (y <= 0)%R -> Fexp x = Fexp y -> Fbounded b (Fminus radix x y). (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rle (FtoRradix x) (IZR Z0)) (_ : Rle (FtoRradix y) (IZR Z0)) (_ : @eq Z (Fexp x) (Fexp y)), Fbounded b (Fminus radix x y) *) intros x y H' H'0 H'1 H'2 H'3. (* Goal: Fbounded b (Fminus radix x y) *) apply oppBoundedInv; auto. (* Goal: Fbounded b (Fopp (Fminus radix x y)) *) rewrite Fopp_Fminus_dist. (* Goal: Fbounded b (Fminus radix (Fopp x) (Fopp y)) *) apply BminusSameExp; auto with float. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp y)) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (IZR Z0) (Ropp (FtoR radix y)) *) replace 0%R with (-0)%R; auto with real. (* Goal: Rle (IZR Z0) (FtoRradix (Fopp y)) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: Rle (IZR Z0) (Ropp (FtoR radix y)) *) replace 0%R with (-0)%R; auto with real. Qed. End Fprop. Hint Resolve Sterbenz BminusSameExp BminusSameExpNeg: float.
(**************************************************************************** IEEE754 : Digit Laurent Thery ***************************************************************************** Gives the number of digits necessary to write a number in a given base *) Require Export ZArithRing. Require Export Omega. Require Export Faux. Section Pdigit. (* n is the base *) Variable n : Z. (* and it is greater or equal to 2 *) Hypothesis nMoreThan1 : (1 < n)%Z. Let nMoreThanOne := Zlt_1_O _ (Zlt_le_weak _ _ nMoreThan1). Hint Resolve nMoreThanOne: zarith. Theorem Zpower_nat_less : forall q : nat, (0 < Zpower_nat n q)%Z. intros q; elim q; simpl in |- *; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. Qed. Hint Resolve Zpower_nat_less: zarith. Theorem Zpower_nat_monotone_S : forall p : nat, (Zpower_nat n p < Zpower_nat n (S p))%Z. intros p; rewrite <- (Zmult_1_l (Zpower_nat n p)); replace (S p) with (1 + p); [ rewrite Zpower_nat_is_exp | auto with zarith ]. (* Goal: Z.lt (Z.mul (Zpos xH) (Zpower_nat n p)) (Z.mul (Zpower_nat n (S O)) (Zpower_nat n p)) *) rewrite Zpower_nat_1; auto with zarith. (* Goal: Z.lt (Z.mul (Zpos xH) (Zpower_nat n p)) (Z.mul n (Zpower_nat n p)) *) apply Zmult_gt_0_lt_compat_r; auto with zarith. (* Goal: Z.gt (Zpower_nat n p) Z0 *) apply Zlt_gt; auto with zarith. Qed. Theorem Zpower_nat_monotone_lt : forall p q : nat, p < q -> (Zpower_nat n p < Zpower_nat n q)%Z. (* Goal: forall (p q : nat) (_ : lt p q), Z.lt (Zpower_nat n p) (Zpower_nat n q) *) intros p q H'; elim H'; simpl in |- *; auto. (* Goal: Z.lt (Zpower_nat n m) (Z.mul n (Zpower_nat n m)) *) apply Zpower_nat_monotone_S. (* Goal: forall (m : nat) (_ : le (S p) m) (_ : Z.lt (Zpower_nat n p) (Zpower_nat n m)), Z.lt (Zpower_nat n p) (Z.mul n (Zpower_nat n m)) *) intros m H H0; apply Zlt_trans with (1 := H0). (* Goal: Z.lt (Zpower_nat n m) (Z.mul n (Zpower_nat n m)) *) apply Zpower_nat_monotone_S. Qed. Hint Resolve Zpower_nat_monotone_lt: zarith. Theorem Zpower_nat_anti_monotone_lt : forall p q : nat, (Zpower_nat n p < Zpower_nat n q)%Z -> p < q. (* Goal: forall (p q : nat) (_ : Z.lt (Zpower_nat n p) (Zpower_nat n q)), lt p q *) intros p q H'. (* Goal: lt p q *) case (le_or_lt q p); auto; (intros H'1; generalize H'; case H'1). (* Goal: forall _ : Z.lt (Zpower_nat n q) (Zpower_nat n q), lt q q *) (* Goal: forall (m : nat) (_ : le q m) (_ : Z.lt (Zpower_nat n (S m)) (Zpower_nat n q)), lt (S m) q *) intros H'0; Contradict H'0; auto with zarith. (* Goal: forall (m : nat) (_ : le q m) (_ : Z.lt (Zpower_nat n (S m)) (Zpower_nat n q)), lt (S m) q *) intros m H'0 H'2; Contradict H'2; auto with zarith. Qed. Theorem Zpower_nat_monotone_le : forall p q : nat, p <= q -> (Zpower_nat n p <= Zpower_nat n q)%Z. (* Goal: forall (p q : nat) (_ : le p q), Z.le (Zpower_nat n p) (Zpower_nat n q) *) intros p q H'; case (le_lt_or_eq _ _ H'); auto with zarith. (* Goal: forall _ : @eq nat p q, Z.le (Zpower_nat n p) (Zpower_nat n q) *) intros H1; rewrite H1; auto with zarith. Qed. Theorem Zpower_nat_anti_monotone_le : forall p q : nat, (Zpower_nat n p <= Zpower_nat n q)%Z -> p <= q. (* Goal: forall (p q : nat) (_ : Z.le (Zpower_nat n p) (Zpower_nat n q)), le p q *) intros p q H'; case (le_or_lt p q); intros H'0; auto with arith. (* Goal: le p q *) Contradict H'; auto with zarith. Qed. Theorem Zpower_nat_anti_eq : forall p q : nat, Zpower_nat n p = Zpower_nat n q -> p = q. intros p q H'; apply le_antisym; apply Zpower_nat_anti_monotone_le; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) rewrite H'; auto with zarith. Qed. (* To compute the number of digits structurally, we suppose that we know already an upper bound q. So we start from q down to 0 to find the bigger exponent r such that n^(r-1) < v *) Fixpoint digitAux (v r : Z) (q : positive) {struct q} : nat := match q with | xH => 0 | xI q' => match (n * r)%Z with | r' => match (r ?= v)%Z with | Datatypes.Gt => 0 | _ => S (digitAux v r' q') end end | xO q' => match (n * r)%Z with | r' => match (r ?= v)%Z with | Datatypes.Gt => 0 | _ => S (digitAux v r' q') end end end. (* As we know that log_n q < log_2 q we can define our function digit*) Definition digit (q : Z) := match q with | Z0 => 0 | Zpos q' => digitAux (Zabs q) 1 (xO q') | Zneg q' => digitAux (Zabs q) 1 (xO q') end. Hint Unfold digit. Theorem digitAux1 : forall p r, (Zpower_nat n (S p) * r)%Z = (Zpower_nat n p * (n * r))%Z. intros p r; replace (S p) with (1 + p); [ rewrite Zpower_nat_is_exp | auto with arith ]. (* Goal: @eq Z (Z.mul (Z.mul (Zpower_nat n (S O)) (Zpower_nat n p)) r) (Z.mul (Zpower_nat n p) (Z.mul n r)) *) rewrite Zpower_nat_1; ring. Qed. Theorem Zcompare_correct : forall p q : Z, match (p ?= q)%Z with | Datatypes.Gt => (q < p)%Z | Datatypes.Lt => (p < q)%Z | Datatypes.Eq => p = q end. intros p q; unfold Zlt in |- *; generalize (Zcompare_EGAL p q); (CaseEq (p ?= q)%Z; simpl in |- *; auto). (* Goal: forall (_ : @eq comparison (Z.compare p q) Gt) (_ : forall _ : @eq comparison Gt Eq, @eq Z p q), @eq comparison (Z.compare q p) Lt *) intros H H0; case (Zcompare_Gt_Lt_antisym p q); auto. Qed. Theorem digitAuxLess : forall (v r : Z) (q : positive), match digitAux v r q with | S r' => (Zpower_nat n r' * r <= v)%Z | O => True end. (* Goal: forall (v r : Z) (q : positive), match digitAux v r q with | O => True | S r' => Z.le (Z.mul (Zpower_nat n r') r) v end *) intros v r q; generalize r; elim q; clear r q; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : forall r : Z, match digitAux v r p with | O => True | S r' => Z.le (Z.mul (Zpower_nat n r') r) v end) (r : Z), match match Z.compare r v with | Eq => S (digitAux v (Z.mul n r) p) | Lt => S (digitAux v (Z.mul n r) p) | Gt => O end with | O => True | S r' => Z.le (Z.mul (Zpower_nat n r') r) v end *) intros q' Rec r; generalize (Zcompare_correct r v); case (r ?= v)%Z; auto. (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros H1; generalize (Rec (n * r)%Z); case (digitAux v (n * r) q'). (* Goal: forall _ : True, Z.le (Z.mul (Zpower_nat n O) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros; rewrite H1; rewrite Zpower_nat_O; auto with zarith. (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros r'; rewrite digitAux1; auto. (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros H1; generalize (Rec (n * r)%Z); case (digitAux v (n * r) q'). (* Goal: forall _ : True, Z.le (Z.mul (Zpower_nat n O) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros; rewrite Zpower_nat_O; auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (S O)) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) apply Zle_trans with (m := r); auto with zarith. (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros r'; rewrite digitAux1; auto. (* Goal: forall (p : positive) (_ : forall r : Z, match digitAux v r p with | O => True | S r' => Z.le (Z.mul (Zpower_nat n r') r) v end) (r : Z), match match Z.compare r v with | Eq => S (digitAux v (Z.mul n r) p) | Lt => S (digitAux v (Z.mul n r) p) | Gt => O end with | O => True | S r' => Z.le (Z.mul (Zpower_nat n r') r) v end *) intros q' Rec r; generalize (Zcompare_correct r v); case (r ?= v)%Z; auto. (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros H1; generalize (Rec (n * r)%Z); case (digitAux v (n * r) q'). (* Goal: forall _ : True, Z.le (Z.mul (Zpower_nat n O) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros; rewrite H1; rewrite Zpower_nat_O; auto with zarith. (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros r'; rewrite digitAux1; auto. (* Goal: forall _ : Z.lt r v, Z.le (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) q')) r) v *) intros H1; generalize (Rec (n * r)%Z); case (digitAux v (n * r) q'). (* Goal: forall _ : True, Z.le (Z.mul (Zpower_nat n O) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros; rewrite Zpower_nat_O; auto with zarith. (* Goal: Z.le (Z.mul (Z.of_nat (S O)) r) v *) (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) apply Zle_trans with (m := r); auto with zarith. (* Goal: forall (n0 : nat) (_ : Z.le (Z.mul (Zpower_nat n n0) (Z.mul n r)) v), Z.le (Z.mul (Zpower_nat n (S n0)) r) v *) intros r'; rewrite digitAux1; auto. Qed. (* digit is correct (first part) *) Theorem digitLess : forall q : Z, q <> 0%Z -> (Zpower_nat n (pred (digit q)) <= Zabs q)%Z. (* Goal: forall q : Z, Z.lt (Z.abs q) (Zpower_nat n (digit q)) *) intros q; case q. (* Goal: forall _ : not (@eq Z Z0 Z0), Z.le (Zpower_nat n (Init.Nat.pred (digit Z0))) (Z.abs Z0) *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zpos p) Z0)), Z.le (Zpower_nat n (Init.Nat.pred (digit (Zpos p)))) (Z.abs (Zpos p)) *) (* Goal: forall (p : positive) (_ : not (@eq Z (Zneg p) Z0)), Z.le (Zpower_nat n (Init.Nat.pred (digit (Zneg p)))) (Z.abs (Zneg p)) *) intros H; Contradict H; auto with zarith. intros p H; unfold digit in |- *; generalize (digitAuxLess (Zabs (Zpos p)) 1 (xO p)); case (digitAux (Zabs (Zpos p)) 1 (xO p)); simpl in |- *; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. intros p H; unfold digit in |- *; generalize (digitAuxLess (Zabs (Zneg p)) 1 (xO p)); case (digitAux (Zabs (Zneg p)) 1 (xO p)); simpl in |- *; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. Qed. Hint Resolve digitLess: zarith. Hint Resolve Zmult_gt_0_lt_compat_r Zmult_gt_0_lt_compat_l: zarith. Fixpoint pos_length (p : positive) : nat := match p with | xH => 0 | xO p' => S (pos_length p') | xI p' => S (pos_length p') end. Theorem digitAuxMore : forall (v r : Z) (q : positive), (0 < r)%Z -> (v < Zpower_nat n (pos_length q) * r)%Z -> (v < Zpower_nat n (digitAux v r q) * r)%Z. (* Goal: forall (v r : Z) (q : positive) (_ : Z.lt Z0 r) (_ : Z.lt v (Z.mul (Zpower_nat n (pos_length q)) r)), Z.lt v (Z.mul (Zpower_nat n (digitAux v r q)) r) *) intros v r q; generalize r; elim q; clear r q; simpl in |- *. (* Goal: forall (p : positive) (_ : forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v (Z.mul (Zpower_nat n (pos_length p)) r)), Z.lt v (Z.mul (Zpower_nat n (digitAux v r p)) r)) (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n match Z.compare r v with | Eq => S (digitAux v (Z.mul n r) p) | Lt => S (digitAux v (Z.mul n r) p) | Gt => O end) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros p Rec r Hr; generalize (Zcompare_correct r v); case (r ?= v)%Z; auto. (* Goal: forall (_ : @eq Z r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros H1 H2; rewrite <- H1. (* Goal: Z.lt r (Z.mul (Zpower_nat n (S (digitAux r (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Zle_lt_trans with (Zpower_nat n 0 * r)%Z; auto with zarith arith. (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite Zpower_nat_O; rewrite Zmult_1_l; auto with zarith. (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros H1 H2; rewrite digitAux1. (* Goal: Z.lt v (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Rec. (* Goal: Z.lt Z0 (Z.mul n r) *) (* Goal: Z.lt v (Z.mul (Zpower_nat n (pos_length p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Zlt_mult_ZERO; auto with zarith. (* Goal: Z.lt v (Z.mul (Zpower_nat n (pos_length p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite <- digitAux1; auto. (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite Zpower_nat_O; rewrite Zmult_1_l; auto with zarith. (* Goal: forall (p : positive) (_ : forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v (Z.mul (Zpower_nat n (pos_length p)) r)), Z.lt v (Z.mul (Zpower_nat n (digitAux v r p)) r)) (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n match Z.compare r v with | Eq => S (digitAux v (Z.mul n r) p) | Lt => S (digitAux v (Z.mul n r) p) | Gt => O end) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros p Rec r Hr; generalize (Zcompare_correct r v); case (r ?= v)%Z; auto. (* Goal: forall (_ : @eq Z r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros H1 H2; rewrite <- H1. (* Goal: Z.lt r (Z.mul (Zpower_nat n (S (digitAux r (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Zle_lt_trans with (Zpower_nat n 0 * r)%Z; auto with zarith arith. (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite Zpower_nat_O; rewrite Zmult_1_l; auto with zarith. (* Goal: forall (_ : Z.lt r v) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n (S (digitAux v (Z.mul n r) p))) r) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros H1 H2; rewrite digitAux1. (* Goal: Z.lt v (Z.mul (Zpower_nat n (digitAux v (Z.mul n r) p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Rec. (* Goal: Z.lt Z0 (Z.mul n r) *) (* Goal: Z.lt v (Z.mul (Zpower_nat n (pos_length p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Zlt_mult_ZERO; auto with zarith. (* Goal: Z.lt v (Z.mul (Zpower_nat n (pos_length p)) (Z.mul n r)) *) (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite <- digitAux1; auto. (* Goal: forall (_ : Z.lt v r) (_ : Z.lt v (Z.mul (Z.mul n (Zpower_nat n (pos_length p))) r)), Z.lt v (Z.mul (Zpower_nat n O) r) *) (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) rewrite Zpower_nat_O; rewrite Zmult_1_l; auto with zarith. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) auto. Qed. Theorem pos_length_pow : forall p : positive, (Zpos p < Zpower_nat n (S (pos_length p)))%Z. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros p; elim p; simpl in |- *; auto. (* Goal: forall (p : positive) (_ : Z.lt (Zpos p) (Z.mul n (Zpower_nat n (pos_length p)))), Z.lt (Zpos (xI p)) (Z.mul n (Z.mul n (Zpower_nat n (pos_length p)))) *) (* Goal: forall (p : positive) (_ : Z.lt (Zpos p) (Z.mul n (Zpower_nat n (pos_length p)))), Z.lt (Zpos (xO p)) (Z.mul n (Z.mul n (Zpower_nat n (pos_length p)))) *) (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) intros p0 H; rewrite Zpos_xI. apply Zlt_le_trans with (2 * (n * Zpower_nat n (pos_length p0)))%Z; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. (* Goal: forall (p : positive) (_ : Z.lt (Zpos p) (Z.mul n (Zpower_nat n (pos_length p)))), Z.lt (Zpos (xO p)) (Z.mul n (Z.mul n (Zpower_nat n (pos_length p)))) *) (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) intros p0 H; rewrite Zpos_xO. apply Zlt_le_trans with (2 * (n * Zpower_nat n (pos_length p0)))%Z; (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. Qed. (* digit is correct (second part) *) Theorem digitMore : forall q : Z, (Zabs q < Zpower_nat n (digit q))%Z. (* Goal: forall q : Z, Z.lt (Z.abs q) (Zpower_nat n (digit q)) *) intros q; case q. (* Goal: Z.lt (Z.abs Z0) (Zpower_nat n (digit Z0)) *) (* Goal: forall p : positive, Z.lt (Z.abs (Zpos p)) (Zpower_nat n (digit (Zpos p))) *) (* Goal: forall p : positive, Z.lt (Z.abs (Zneg p)) (Zpower_nat n (digit (Zneg p))) *) easy. (* Goal: forall p : positive, Z.lt (Z.abs (Zpos p)) (Zpower_nat n (digit (Zpos p))) *) (* Goal: forall p : positive, Z.lt (Z.abs (Zneg p)) (Zpower_nat n (digit (Zneg p))) *) intros q'; rewrite <- (Zmult_1_r (Zpower_nat n (digit (Zpos q')))). (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) unfold digit in |- *; apply digitAuxMore; auto with zarith. (* Goal: Z.lt (Z.abs (Zneg q')) (Z.mul (Zpower_nat n (pos_length (xO q'))) (Zpos xH)) *) rewrite Zmult_1_r. (* Goal: Z.lt (Z.abs (Zneg q')) (Zpower_nat n (pos_length (xO q'))) *) simpl in |- *; apply pos_length_pow. (* Goal: forall p : positive, Z.lt (Z.abs (Zneg p)) (Zpower_nat n (digit (Zneg p))) *) intros q'; rewrite <- (Zmult_1_r (Zpower_nat n (digit (Zneg q')))). (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) unfold digit in |- *; apply digitAuxMore; auto with zarith. (* Goal: Z.lt (Z.abs (Zneg q')) (Z.mul (Zpower_nat n (pos_length (xO q'))) (Zpos xH)) *) rewrite Zmult_1_r. (* Goal: Z.lt (Z.abs (Zneg q')) (Zpower_nat n (pos_length (xO q'))) *) simpl in |- *; apply pos_length_pow. Qed. Hint Resolve digitMore: zarith. (* if we find an r such that n^(r-1) =< q < n^r then r is the number of digits *) Theorem digitInv : forall (q : Z) (r : nat), (Zpower_nat n (pred r) <= Zabs q)%Z -> (Zabs q < Zpower_nat n r)%Z -> digit q = r. (* Goal: forall (q : Z) (r : nat) (_ : Z.le (Zpower_nat n (Init.Nat.pred r)) (Z.abs q)) (_ : Z.lt (Z.abs q) (Zpower_nat n r)), @eq nat (digit q) r *) intros q r H' H'0; case (le_or_lt (digit q) r). (* Goal: forall _ : le (digit q) r, @eq nat (digit q) r *) (* Goal: forall _ : lt r (digit q), @eq nat (digit q) r *) intros H'1; case (le_lt_or_eq _ _ H'1); auto; intros H'2. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) absurd (Zabs q < Zpower_nat n (digit q))%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) apply Zle_not_lt; auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) apply Zle_trans with (m := Zpower_nat n (pred r)); auto with zarith. (* Goal: Z.le (Zpower_nat n r) (Zpower_nat n (Init.Nat.pred (digit q))) *) (* Goal: Z.le (Zpower_nat n (Init.Nat.pred (digit q))) (Z.abs q) *) apply Zpower_nat_monotone_le. (* Goal: le (digit q) (Init.Nat.pred r) *) (* Goal: forall _ : lt r (digit q), @eq nat (digit q) r *) generalize H'2; case r; auto with arith. (* Goal: forall _ : lt r (digit q), @eq nat (digit q) r *) intros H'1. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) absurd (Zpower_nat n (pred (digit q)) <= Zabs q)%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) apply Zlt_not_le; auto with zarith. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) apply Zlt_le_trans with (m := Zpower_nat n r); auto. (* Goal: Z.le (Zpower_nat n r) (Zpower_nat n (Init.Nat.pred (digit q))) *) (* Goal: Z.le (Zpower_nat n (Init.Nat.pred (digit q))) (Z.abs q) *) apply Zpower_nat_monotone_le. (* Goal: le r (Init.Nat.pred (digit q)) *) (* Goal: Z.le (Zpower_nat n (Init.Nat.pred (digit q))) (Z.abs q) *) generalize H'1; case (digit q); auto with arith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) apply digitLess; auto with zarith. generalize H'1; case q; unfold digit in |- *; intros tmp; intros; red in |- *; intros; try discriminate; Contradict tmp; auto with arith. Qed. Theorem digitO : digit 0 = 0. (* Goal: @eq nat (digit Z0) O *) unfold digit in |- *; simpl in |- *; auto with arith. Qed. Theorem digit1 : digit 1 = 1. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) unfold digit in |- *; simpl in |- *; auto. Qed. (* digit is monotone *) Theorem digit_monotone : forall p q : Z, (Zabs p <= Zabs q)%Z -> digit p <= digit q. intros p q H; case (le_or_lt (digit p) (digit q)); auto; intros H1; Contradict H. (* Goal: not (Z.le (Z.abs p) (Z.abs q)) *) apply Zlt_not_le. (* Goal: Z.lt (Z.abs q) (Z.abs p) *) cut (p <> 0%Z); [ intros H2 | idtac ]. (* Goal: Z.lt (Z.abs q) (Z.abs p) *) (* Goal: not (@eq Z p Z0) *) apply Zlt_le_trans with (2 := digitLess p H2). (* Goal: Z.lt (Z.abs q) (Zpower_nat n (Init.Nat.pred (digit p))) *) (* Goal: not (@eq Z p Z0) *) cut (digit q <= pred (digit p)); [ intros H3 | idtac ]. apply Zlt_le_trans with (2 := Zpower_nat_monotone_le _ _ H3); (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) auto with zarith. (* Goal: le (digit q) (Init.Nat.pred (digit p)) *) (* Goal: not (@eq Z p Z0) *) generalize H1; case (digit p); simpl in |- *; auto with arith. generalize H1; case p; simpl in |- *; intros tmp; intros; red in |- *; intros; try discriminate; Contradict tmp; auto with arith. Qed. Hint Resolve digit_monotone: arith. (* if the number is not null so is the number of digits *) Theorem digitNotZero : forall q : Z, q <> 0%Z -> 0 < digit q. (* Goal: forall (q : Z) (_ : not (@eq Z q Z0)), lt O (digit q) *) intros q H'. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) apply lt_le_trans with (m := digit 1); auto with zarith. (* Goal: le (digit (Zpos xH)) (digit q) *) apply digit_monotone. generalize H'; case q; simpl in |- *; auto with zarith; intros q'; case q'; simpl in |- *; auto with zarith arith; intros; red in |- *; simpl in |- *; red in |- *; intros; discriminate. Qed. Hint Resolve Zlt_gt: zarith. Theorem digitAdd : forall (q : Z) (r : nat), q <> 0%Z -> digit (q * Zpower_nat n r) = digit q + r. (* Goal: forall (q : Z) (r : nat) (_ : not (@eq Z q Z0)), @eq nat (digit (Z.mul q (Zpower_nat n r))) (Init.Nat.add (digit q) r) *) intros q r H0. (* Goal: @eq nat (digit (Z.mul q (Zpower_nat n r))) (Init.Nat.add (digit q) r) *) apply digitInv. (* Goal: Z.le (Zpower_nat n (Init.Nat.pred (Init.Nat.add (digit q) r))) (Z.abs (Z.mul q (Zpower_nat n r))) *) (* Goal: Z.lt (Z.abs (Z.mul q (Zpower_nat n r))) (Zpower_nat n (Init.Nat.add (digit q) r)) *) replace (pred (digit q + r)) with (pred (digit q) + r). rewrite Zpower_nat_is_exp; rewrite Zabs_Zmult; rewrite (fun x => Zabs_eq (Zpower_nat n x)); auto with zarith arith. (* Goal: @eq nat (Init.Nat.add (Init.Nat.pred (digit q)) r) (Init.Nat.pred (Init.Nat.add (digit q) r)) *) (* Goal: Z.lt (Z.abs (Z.mul q (Zpower_nat n r))) (Zpower_nat n (Init.Nat.add (digit q) r)) *) generalize (digitNotZero _ H0); case (digit q); auto with arith. (* Goal: forall _ : lt O O, @eq nat (Init.Nat.add (Init.Nat.pred O) r) (Init.Nat.pred (Init.Nat.add O r)) *) (* Goal: Z.lt (Z.abs (Z.mul q (Zpower_nat n r))) (Zpower_nat n (Init.Nat.add (digit q) r)) *) intros H'; Contradict H'; auto with arith. rewrite Zpower_nat_is_exp; rewrite Zabs_Zmult; rewrite (fun x => Zabs_eq (Zpower_nat n x)); auto with zarith arith. Qed. Theorem digit_minus1 : forall p : nat, digit (Zpower_nat n p - 1) = p. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros p; case p; auto. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros n0; apply digitInv; auto. (* Goal: Z.le (Zpower_nat n (Init.Nat.pred (S n0))) (Z.abs (Z.sub (Zpower_nat n (S n0)) (Zpos xH))) *) (* Goal: Z.lt (Z.abs (Z.sub (Zpower_nat n (S n0)) (Zpos xH))) (Zpower_nat n (S n0)) *) rewrite Zabs_eq. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) cut (Zpower_nat n (pred (S n0)) < Zpower_nat n (S n0))%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) cut (0 < Zpower_nat n (S n0))%Z; auto with zarith. (* Goal: Z.lt (Zpos xH) (Z.mul n (Zpos xH)) *) rewrite Zabs_eq; auto with zarith. Qed. Theorem digit_bound : forall (x y z : Z) (n : nat), (Zabs x <= Zabs y)%Z -> (Zabs y <= Zabs z)%Z -> digit x = n -> digit z = n -> digit y = n. (* Goal: forall (x y z : Z) (n : nat) (_ : Z.le (Z.abs x) (Z.abs y)) (_ : Z.le (Z.abs y) (Z.abs z)) (_ : @eq nat (digit x) n) (_ : @eq nat (digit z) n), @eq nat (digit y) n *) intros x y z n0 H' H'0 H'1 H'2; apply le_antisym. (* Goal: le (digit y) n0 *) (* Goal: le n0 (digit y) *) rewrite <- H'2; auto with arith. (* Goal: le n0 (digit y) *) rewrite <- H'1; auto with arith. Qed. Theorem digit_abs : forall p : Z, digit (Zabs p) = digit p. (* Goal: forall (r : Z) (_ : Z.lt Z0 r) (_ : Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end), Z.lt v match r with | Z0 => Z0 | Zpos y' => Zpos y' | Zneg y' => Zneg y' end *) intros p; case p; simpl in |- *; auto. Qed. (* Strict comparison on the number of digits gives comparison on the numbers *) Theorem digit_anti_monotone_lt : (1 < n)%Z -> forall p q : Z, digit p < digit q -> (Zabs p < Zabs q)%Z. (* Goal: forall (_ : Z.lt (Zpos xH) n) (p q : Z) (_ : lt (digit p) (digit q)), Z.lt (Z.abs p) (Z.abs q) *) intros H' p q H'0. (* Goal: forall _ : lt r (digit q), @eq nat (digit q) r *) case (Zle_or_lt (Zabs q) (Zabs p)); auto; intros H'1. (* Goal: Z.lt (Z.abs p) (Z.abs q) *) Contradict H'0. (* Goal: not (lt (digit p) (digit q)) *) case (Zle_lt_or_eq _ _ H'1); intros H'2. (* Goal: not (lt (digit p) (digit q)) *) (* Goal: not (lt (digit p) (digit q)) *) apply le_not_lt; auto with arith. rewrite <- (digit_abs p); rewrite <- (digit_abs q); rewrite H'2; auto with arith. Qed. End Pdigit. Hint Resolve Zpower_nat_less: zarith. Hint Resolve Zpower_nat_monotone_lt: zarith. Hint Resolve Zpower_nat_monotone_le: zarith. Hint Unfold digit. Hint Resolve digitLess: zarith. Hint Resolve digitMore: zarith. Hint Resolve digit_monotone: arith.
(**************************************************************************** IEEE754 : Rpow Laurent Thery ***************************************************************************** Definition of an exponential function over relative numbers *) Require Export Omega. Require Export Digit. (* We have already an exponential over natural number, we prove some basic properties for this function *) Theorem pow_O : forall e : R, (e ^ 0)%R = 1%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem pow_1 : forall e : R, (e ^ 1)%R = e. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem pow_NR0 : forall (e : R) (n : nat), e <> 0%R -> (e ^ n)%R <> 0%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. Qed. Theorem pow_add : forall (e : R) (n m : nat), (e ^ (n + m))%R = (e ^ n * e ^ m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall m : nat, @eq R (pow e (Init.Nat.add n m)) (Rmult (pow e n) (pow e m))) (m : nat), @eq R (Rmult e (pow e (Init.Nat.add n m))) (Rmult (Rmult e (pow e n)) (pow e m)) *) intros n0 H' m; rewrite H'; auto with real. Qed. Hint Resolve pow_O pow_1 pow_NR0 pow_add: real. Theorem pow_RN_plus : forall (e : R) (n m : nat), e <> 0%R -> (e ^ n)%R = (e ^ (n + m) * / e ^ m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall (m : nat) (_ : not (@eq R e (IZR Z0))), @eq R (pow e n) (Rmult (pow e (Init.Nat.add n m)) (Rinv (pow e m)))) (m : nat) (_ : not (@eq R e (IZR Z0))), @eq R (Rmult e (pow e n)) (Rmult (Rmult e (pow e (Init.Nat.add n m))) (Rinv (pow e m))) *) intros n0 H' m H'0. (* Goal: @eq R (Rmult e (pow e n0)) (Rmult (Rmult e (pow e (Init.Nat.add n0 m))) (Rinv (pow e m))) *) rewrite Rmult_assoc; rewrite <- H'; auto. Qed. Theorem pow_lt : forall (e : R) (n : nat), (0 < e)%R -> (0 < e ^ n)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (n : nat) (_ : forall _ : Rlt (IZR Z0) e, Rlt (IZR Z0) (pow e n)) (_ : Rlt (IZR Z0) e), Rlt (IZR Z0) (Rmult e (pow e n)) *) intros n0 H' H'0; replace 0%R with (e * 0)%R; auto with real. Qed. Hint Resolve pow_lt: real. Theorem Rlt_pow_R1 : forall (e : R) (n : nat), (1 < e)%R -> 0 < n -> (1 < e ^ n)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n; elim n; simpl in |- *; auto with real. (* Goal: forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O O), Rlt (IZR (Zpos xH)) (IZR (Zpos xH)) *) (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O n), Rlt (IZR (Zpos xH)) (pow e n)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (Rmult e (pow e n)) *) intros H' H'0; Contradict H'0; auto with arith. (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O n), Rlt (IZR (Zpos xH)) (pow e n)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (Rmult e (pow e n)) *) intros n0; case n0. (* Goal: forall (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O O), Rlt (IZR (Zpos xH)) (pow e O)) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S O)), Rlt (IZR (Zpos xH)) (Rmult e (pow e O)) *) (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (pow e (S n))) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S (S n))), Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n))) *) simpl in |- *; rewrite Rmult_1_r; auto. (* Goal: forall (n : nat) (_ : forall (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S n)), Rlt (IZR (Zpos xH)) (pow e (S n))) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt O (S (S n))), Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n))) *) intros n1 H' H'0 H'1. (* Goal: Rlt (IZR (Zpos xH)) (Rmult e (pow e (S n1))) *) replace 1%R with (1 * 1)%R; auto with real. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (IZR (Zpos xH))) (Rmult e (pow e (S n1))) *) apply Rlt_trans with (r2 := (e * 1)%R); auto with real. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (Rmult (pow e n) (IZR Z0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rmult_lt_compat_l; auto with real. (* Goal: Rlt (IZR Z0) e *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_trans with (r2 := 1%R); auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (S n1)) *) apply H'; auto with arith. Qed. Hint Resolve Rlt_pow_R1: real. Theorem Rlt_pow : forall (e : R) (n m : nat), (1 < e)%R -> n < m -> (e ^ n < e ^ m)%R. (* Goal: forall (e : R) (n m : nat) (_ : Rlt (IZR (Zpos xH)) e) (_ : lt n m), Rlt (pow e n) (pow e m) *) intros e n m H' H'0; replace m with (m - n + n). (* Goal: Rlt (pow e n) (pow e (Init.Nat.add (Init.Nat.sub m n) n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite pow_add. pattern (e ^ n)%R at 1 in |- *; replace (e ^ n)%R with (1 * e ^ n)%R; auto with real. (* Goal: Rlt (Rmult (IZR (Zpos xH)) (pow e n)) (Rmult (pow e (Init.Nat.sub m n)) (pow e n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rminus_lt. repeat rewrite (fun x : R => Rmult_comm x (e ^ n)); rewrite <- Rmult_minus_distr_l. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) replace 0%R with (e ^ n * 0)%R; auto with real. (* Goal: Rlt (Rmult (pow e n) (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)))) (Rmult (pow e n) (IZR Z0)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rmult_lt_compat_l; auto with real. (* Goal: Rlt (IZR Z0) (pow e n) *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply pow_lt; auto with real. (* Goal: Rlt (IZR Z0) e *) (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_trans with (r2 := 1%R); auto with real. (* Goal: Rlt (Rminus (IZR (Zpos xH)) (pow e (Init.Nat.sub m n))) (IZR Z0) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_minus; auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (Init.Nat.sub m n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply Rlt_pow_R1; auto with arith. (* Goal: lt O (Init.Nat.sub m n) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) apply plus_lt_reg_l with (p := n); auto with arith. (* Goal: lt (Init.Nat.add n O) (Init.Nat.add n (Init.Nat.sub m n)) *) (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite le_plus_minus_r; auto with arith; rewrite <- plus_n_O; auto. (* Goal: @eq nat (Init.Nat.add (Init.Nat.sub m n) n) m *) rewrite plus_comm; auto with arith. Qed. Hint Resolve Rlt_pow: real. Theorem pow_R1 : forall (r : R) (n : nat), (r ^ n)%R = 1%R -> Rabs r = 1%R \/ n = 0. intros r n H'. case (Req_dec (Rabs r) 1); auto; intros H'1. case (Rdichotomy _ _ H'1); intros H'2. generalize H'; case n; auto. intros n0 H'0. cut (r <> 0%R); [ intros Eq1 | idtac ]. 2: Contradict H'0; auto with arith. 2: simpl in |- *; rewrite H'0; rewrite Rmult_0_l; auto with real. cut (Rabs r <> 0%R); [ intros Eq2 | apply Rabs_no_R0 ]; auto. absurd (Rabs (/ r) ^ 0 < Rabs (/ r) ^ S n0)%R; auto. replace (Rabs (/ r) ^ S n0)%R with 1%R. simpl in |- *; apply Rlt_irrefl; auto. rewrite Rabs_Rinv; auto. rewrite <- Rinv_pow; auto. rewrite RPow_abs; auto. rewrite H'0; rewrite Rabs_right; auto with real. apply Rlt_pow; auto with arith. rewrite Rabs_Rinv; auto. apply Rmult_lt_reg_l with (r := Rabs r). case (Rabs_pos r); auto. intros H'3; case Eq2; auto. rewrite Rmult_1_r; rewrite Rinv_r; auto with real. generalize H'; case n; auto. intros n0 H'0. cut (r <> 0%R); [ intros Eq1 | auto with real ]. 2: Contradict H'0; simpl in |- *; rewrite H'0; rewrite Rmult_0_l; auto with real. cut (Rabs r <> 0%R); [ intros Eq2 | apply Rabs_no_R0 ]; auto. absurd (Rabs r ^ 0 < Rabs r ^ S n0)%R; auto with real arith. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) repeat rewrite RPow_abs; rewrite H'0; simpl in |- *; auto with real. Qed. Theorem Zpower_NR0 : forall (e : Z) (n : nat), (0 <= e)%Z -> (0 <= Zpower_nat e n)%Z. intros e n; elim n; unfold Zpower_nat in |- *; simpl in |- *; (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. Theorem Zpower_NR1 : forall (e : Z) (n : nat), (1 <= e)%Z -> (1 <= Zpower_nat e n)%Z. intros e n; elim n; unfold Zpower_nat in |- *; simpl in |- *; (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. Hint Resolve Zpower_NR0 Zpower_NR1: zarith. (* To define exponential over relative number, we simply do a case analysis on the sign of the number *) (*Definition powerRZ := [e : R] [n : Z] Cases n of ZERO => R1 | (POS p) => (pow e (convert p)) | (NEG p) => (Rinv (pow e (convert p))) end.*) (* we now prove some basic properties of our exponential *) Theorem powerRZ_O : forall e : R, powerRZ e 0 = 1%R. (* Goal: forall e : R, @eq R (powerRZ e Z0) (IZR (Zpos xH)) *) simpl in |- *; auto. Qed. Theorem powerRZ_1 : forall e : R, powerRZ e (Zsucc 0) = e. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) simpl in |- *; auto with real. Qed. Theorem powerRZ_NOR : forall (e : R) (z : Z), e <> 0%R -> powerRZ e z <> 0%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z; case z; simpl in |- *; auto with real. Qed. Hint Resolve powerRZ_O powerRZ_1 powerRZ_NOR: real. Theorem powerRZ_add : forall (e : R) (n m : Z), e <> 0%R -> powerRZ e (n + m) = (powerRZ e n * powerRZ e m)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e n m; case n; case m; simpl in |- *; auto with real. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1; rewrite nat_of_P_plus_morphism; auto with real. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1. rewrite Z.pos_sub_spec; unfold Pos.compare. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) CaseEq (Pcompare m1 n1 Datatypes.Eq); simpl in |- *; auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Eq) (_ : not (@eq R e (IZR Z0))), @eq R (IZR (Zpos xH)) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite Pcompare_Eq_eq with (1 := H'); auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (nat_of_P_minus_morphism n1 m1); auto with real. rewrite (pow_RN_plus e (nat_of_P n1 - nat_of_P m1) (nat_of_P m1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1))))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: le (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_mult_distr; auto with real. (* Goal: @eq R (Rmult (Rinv (pow e (Pos.to_nat n1))) (Rinv (Rinv (pow e (Pos.to_nat m1))))) (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1)))) *) (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: @eq comparison (Pos.compare_cont Eq n1 m1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq m1 n1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub m1 n1))) (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1)))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_involutive; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply ZC2; auto. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (nat_of_P_minus_morphism m1 n1); auto with real. rewrite (pow_RN_plus e (nat_of_P m1 - nat_of_P n1) (nat_of_P n1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) change (nat_of_P m1 > nat_of_P n1) in |- *. (* Goal: gt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply nat_of_P_gt_Gt_compare_morphism; auto. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.pos_sub p p0)) (Rmult (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1. rewrite Z.pos_sub_spec; unfold Pos.compare. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) CaseEq (Pcompare n1 m1 Datatypes.Eq); simpl in |- *; auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Eq) (_ : not (@eq R e (IZR Z0))), @eq R (IZR (Zpos xH)) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite Pcompare_Eq_eq with (1 := H'); auto with real. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Lt) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.sub m1 n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (nat_of_P_minus_morphism m1 n1); auto with real. rewrite (pow_RN_plus e (nat_of_P m1 - nat_of_P n1) (nat_of_P n1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (Rinv (pow e (Pos.to_nat n1))))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: le (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite Rinv_mult_distr; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: @eq comparison (Pos.compare_cont Eq m1 n1) Gt *) (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply ZC2; auto. (* Goal: forall (_ : @eq comparison (Pos.compare_cont Eq n1 m1) Gt) (_ : not (@eq R e (IZR Z0))), @eq R (pow e (Pos.to_nat (Pos.sub n1 m1))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros H' H'0; rewrite (nat_of_P_minus_morphism n1 m1); auto with real. rewrite (pow_RN_plus e (nat_of_P n1 - nat_of_P m1) (nat_of_P m1)); auto with real. (* Goal: @eq R (Rmult (pow e (Init.Nat.add (Init.Nat.sub (Pos.to_nat n1) (Pos.to_nat m1)) (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat m1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (pow e (Pos.to_nat n1))) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) rewrite plus_comm; rewrite le_plus_minus_r; auto with real. (* Goal: le (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply lt_le_weak. (* Goal: lt (Pos.to_nat m1) (Pos.to_nat n1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) change (nat_of_P n1 > nat_of_P m1) in |- *. (* Goal: gt (Pos.to_nat n1) (Pos.to_nat m1) *) (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) apply nat_of_P_gt_Gt_compare_morphism; auto. (* Goal: forall (p p0 : positive) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (pow e (Pos.to_nat (Pos.add p0 p)))) (Rmult (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p)))) *) intros n1 m1; rewrite nat_of_P_plus_morphism; auto with real. (* Goal: forall _ : not (@eq R e (IZR Z0)), @eq R (Rinv (pow e (Init.Nat.add (Pos.to_nat m1) (Pos.to_nat n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat n1)))) *) intros H'; rewrite pow_add; auto with real. (* Goal: @eq R (Rinv (Rmult (pow e (Pos.to_nat m1)) (pow e (Pos.to_nat n1)))) (Rmult (Rinv (pow e (Pos.to_nat m1))) (Rinv (pow e (Pos.to_nat n1)))) *) apply Rinv_mult_distr; auto. (* Goal: not (@eq R (pow e (Pos.to_nat n1)) (IZR Z0)) *) apply pow_NR0; auto. (* Goal: not (@eq R (pow e (Pos.to_nat n1)) (IZR Z0)) *) apply pow_NR0; auto. Qed. Hint Resolve powerRZ_O powerRZ_1 powerRZ_NOR powerRZ_add: real. Theorem powerRZ_Zopp : forall (e : R) (z : Z), e <> 0%R -> powerRZ e (- z) = (/ powerRZ e z)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z H; case z; simpl in |- *; auto with real. (* Goal: forall p : positive, @eq R (pow e (Pos.to_nat p)) (Rinv (Rinv (pow e (Pos.to_nat p)))) *) intros p; apply sym_eq; apply Rinv_involutive. (* Goal: not (@eq R (pow e (Pos.to_nat p)) (IZR Z0)) *) apply pow_nonzero; auto. Qed. Theorem powerRZ_Zs : forall (e : R) (n : Z), e <> 0%R -> powerRZ e (Zsucc n) = (e * powerRZ e n)%R. (* Goal: forall (e : R) (n : Z) (_ : not (@eq R e (IZR Z0))), @eq R (powerRZ e (Z.succ n)) (Rmult e (powerRZ e n)) *) intros e n H'0. (* Goal: @eq R (powerRZ e (Z.succ n)) (Rmult e (powerRZ e n)) *) replace (Zsucc n) with (n + Zsucc 0)%Z. (* Goal: @eq R (powerRZ e (Z.add n (Z.succ Z0))) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite powerRZ_add; auto. (* Goal: @eq R (Rmult (powerRZ e n) (powerRZ e (Z.succ Z0))) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite powerRZ_1. (* Goal: @eq R (Rmult (powerRZ e n) e) (Rmult e (powerRZ e n)) *) (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) rewrite Rmult_comm; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) auto with zarith. Qed. (* Conversion theorem between relative numbers and reals *) Theorem Zpower_nat_Z_powerRZ : forall (n : Z) (m : nat), IZR (Zpower_nat n m) = powerRZ (IZR n) (Z_of_nat m). (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros n m; elim m; simpl in |- *; auto with real. (* Goal: forall (n0 : nat) (_ : @eq R (IZR (Zpower_nat n n0)) (powerRZ (IZR n) (Z.of_nat n0))), @eq R (IZR (Z.mul n (Zpower_nat n n0))) (pow (IZR n) (Pos.to_nat (Pos.of_succ_nat n0))) *) intros m1 H'; rewrite nat_of_P_o_P_of_succ_nat_eq_succ; simpl in |- *. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) replace (Zpower_nat n (S m1)) with (n * Zpower_nat n m1)%Z. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) rewrite Rmult_IZR; auto with real. (* Goal: @eq R (Rmult (IZR n) (IZR (Zpower_nat n m1))) (Rmult (IZR n) (pow (IZR n) m1)) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) rewrite H'; simpl in |- *. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) case m1; simpl in |- *; auto with real. (* Goal: forall n0 : nat, @eq R (Rmult (IZR n) (pow (IZR n) (Pos.to_nat (Pos.of_succ_nat n0)))) (Rmult (IZR n) (Rmult (IZR n) (pow (IZR n) n0))) *) (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) intros m2; rewrite nat_of_P_o_P_of_succ_nat_eq_succ; auto. (* Goal: @eq Z (Z.mul n (Zpower_nat n m1)) (Zpower_nat n (S m1)) *) unfold Zpower_nat in |- *; auto. Qed. Theorem powerRZ_lt : forall (e : R) (z : Z), (0 < e)%R -> (0 < powerRZ e z)%R. (* Goal: forall e : R, @eq R (powerRZ e (Z.succ Z0)) e *) intros e z; case z; simpl in |- *; auto with real. Qed. Hint Resolve powerRZ_lt: real. Theorem powerRZ_le : forall (e : R) (z : Z), (0 < e)%R -> (0 <= powerRZ e z)%R. (* Goal: forall (e : R) (z : Z) (_ : Rlt (IZR Z0) e), Rle (IZR Z0) (powerRZ e z) *) intros e z H'; apply Rlt_le; auto with real. Qed. Hint Resolve powerRZ_le: real. Theorem Rlt_powerRZ : forall (e : R) (n m : Z), (1 < e)%R -> (n < m)%Z -> (powerRZ e n < powerRZ e m)%R. intros e n m; case n; case m; simpl in |- *; try (unfold Zlt in |- *; intros; discriminate); auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zpos p0) (Zpos p)), Rlt (pow e (Pos.to_nat p0)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rlt_pow; auto with real. (* Goal: lt (Pos.to_nat p0) (Pos.to_nat p) *) (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply nat_of_P_lt_Lt_compare_morphism; auto. (* Goal: forall (p : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p) Z0), Rlt (Rinv (pow e (Pos.to_nat p))) (IZR (Zpos xH)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p H' H'0; replace 1%R with (/ 1)%R; auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zpos p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rlt_trans with (r2 := 1%R). (* Goal: Rlt (Rinv (pow e (Pos.to_nat p0))) (IZR (Zpos xH)) *) (* Goal: Rlt (IZR (Zpos xH)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) replace 1%R with (/ 1)%R; auto with real. (* Goal: Rlt (IZR (Zpos xH)) (pow e (Pos.to_nat p)) *) (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) apply Rlt_pow_R1; auto with real. (* Goal: forall (p p0 : positive) (_ : Rlt (IZR (Zpos xH)) e) (_ : Z.lt (Zneg p0) (Zneg p)), Rlt (Rinv (pow e (Pos.to_nat p0))) (Rinv (pow e (Pos.to_nat p))) *) intros p p0 H' H'0; apply Rinv_1_lt_contravar; auto with real. (* Goal: Rlt (pow e (Pos.to_nat p)) (pow e (Pos.to_nat p0)) *) apply Rlt_pow; auto with real. (* Goal: lt (Pos.to_nat p) (Pos.to_nat p0) *) apply nat_of_P_lt_Lt_compare_morphism; rewrite ZC4; auto. Qed. Hint Resolve Rlt_powerRZ: real. Theorem Rpow_R1 : forall (r : R) (z : Z), r <> 0%R -> powerRZ r z = 1%R -> Rabs r = 1%R \/ z = 0%Z. (* Goal: forall (r : R) (z : Z) (_ : not (@eq R r (IZR Z0))) (_ : @eq R (powerRZ r z) (IZR (Zpos xH))), or (@eq R (Rabs r) (IZR (Zpos xH))) (@eq Z z Z0) *) intros r z; case z; simpl in |- *; auto; intros p H' H'1; left. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) case (pow_R1 _ _ H'1); auto. (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0; Contradict H'0; auto with zarith; apply convert_not_O. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite Rinv_pow in H'1; auto. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) case (pow_R1 _ _ H'1); auto. (* Goal: forall _ : @eq R (Rabs (Rinv r)) (IZR (Zpos xH)), @eq R (Rabs r) (IZR (Zpos xH)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0. (* Goal: @eq R (Rabs r) (IZR (Zpos xH)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite <- H'0. (* Goal: @eq R (Rabs r) (Rabs (Rinv r)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) apply Rmult_eq_reg_l with (r := 1%R); auto with real. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (Rabs r)) (Rmult (IZR (Zpos xH)) (Rabs (Rinv r))) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) pattern 1%R at 1 in |- *; rewrite <- H'0; auto with real. pattern (Rabs (/ r)) at 1 in |- *; rewrite Rabs_Rinv; try rewrite Rinv_l; auto with real. (* Goal: @eq R (IZR (Zpos xH)) (Rmult (IZR (Zpos xH)) (Rabs (Rinv r))) *) (* Goal: not (@eq R (Rabs r) (IZR Z0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) rewrite H'0; auto with real. (* Goal: not (@eq R (Rabs r) (IZR Z0)) *) (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) apply Rabs_no_R0; auto. (* Goal: forall _ : @eq nat (Pos.to_nat p) O, @eq R (Rabs r) (IZR (Zpos xH)) *) intros H'0; Contradict H'0; auto with zarith; apply convert_not_O. Qed. Theorem Rpow_eq_inv : forall (r : R) (p q : Z), r <> 0%R -> Rabs r <> 1%R -> powerRZ r p = powerRZ r q -> p = q. (* Goal: forall (r : R) (p q : Z) (_ : not (@eq R r (IZR Z0))) (_ : not (@eq R (Rabs r) (IZR (Zpos xH)))) (_ : @eq R (powerRZ r p) (powerRZ r q)), @eq Z p q *) intros r p q H' H'0 H'1. (* Goal: @eq Z p q *) cut (powerRZ r (p - q) = 1%R); [ intros Eq0 | idtac ]. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) case (Rpow_R1 _ _ H' Eq0); auto with zarith. (* Goal: forall _ : @eq R (Rabs r) (IZR (Zpos xH)), @eq Z p q *) (* Goal: @eq R (powerRZ r (Z.sub p q)) (IZR (Zpos xH)) *) intros H'2; case H'0; auto. (* Goal: @eq R (powerRZ r (Z.sub p q)) (IZR (Zpos xH)) *) apply Rmult_eq_reg_l with (r := powerRZ r q); auto with real. (* Goal: @eq R (Rmult (powerRZ r q) (powerRZ r (Z.sub p q))) (Rmult (powerRZ r q) (IZR (Zpos xH))) *) rewrite <- powerRZ_add; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) replace (q + (p - q))%Z with p; auto with zarith. (* Goal: @eq R (powerRZ r p) (Rmult (powerRZ r q) (IZR (Zpos xH))) *) rewrite <- H'1; rewrite Rmult_1_r; auto with arith. Qed. Theorem Zpower_nat_powerRZ_absolu : forall n m : Z, (0 <= m)%Z -> IZR (Zpower_nat n (Zabs_nat m)) = powerRZ (IZR n) m. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros n m; case m; simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros p H'; elim (nat_of_P p); simpl in |- *; auto with zarith. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros n0 H'0; rewrite <- H'0; simpl in |- *; auto with zarith. (* Goal: @eq R (IZR (Z.mul n (Zpower_nat n n0))) (Rmult (IZR n) (IZR (Zpower_nat n n0))) *) (* Goal: forall (p : positive) (_ : Z.le Z0 (Zneg p)), @eq R (IZR (Zpower_nat n (Pos.to_nat p))) (Rinv (pow (IZR n) (Pos.to_nat p))) *) rewrite <- Rmult_IZR; auto. (* Goal: @eq Z (Z.add n (Z.succ Z0)) (Z.succ n) *) intros p H'; Contradict H'; auto with zarith. Qed. Theorem powerRZ_R1 : forall n : Z, powerRZ 1 n = 1%R. (* Goal: forall e : R, @eq R (powerRZ e Z0) (IZR (Zpos xH)) *) intros n; case n; simpl in |- *; auto. intros p; elim (nat_of_P p); simpl in |- *; auto; intros n0 H'; rewrite H'; ring. (* Goal: forall p : positive, @eq R (Rinv (pow (IZR (Zpos xH)) (Pos.to_nat p))) (IZR (Zpos xH)) *) intros p; elim (nat_of_P p); simpl in |- *. (* Goal: @eq R (Rinv (IZR (Zpos xH))) (IZR (Zpos xH)) *) (* Goal: forall (n : nat) (_ : @eq R (Rinv (pow (IZR (Zpos xH)) n)) (IZR (Zpos xH))), @eq R (Rinv (Rmult (IZR (Zpos xH)) (pow (IZR (Zpos xH)) n))) (IZR (Zpos xH)) *) exact Rinv_1. intros n1 H'; rewrite Rinv_mult_distr; try rewrite Rinv_1; try rewrite H'; auto with real. Qed. Theorem Rle_powerRZ : forall (e : R) (n m : Z), (1 <= e)%R -> (n <= m)%Z -> (powerRZ e n <= powerRZ e m)%R. (* Goal: forall (e : R) (n m : Z) (_ : Rlt (IZR (Zpos xH)) e) (_ : Rle (powerRZ e n) (powerRZ e m)), Z.le n m *) intros e n m H' H'0. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) case H'; intros E1. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) case (Zle_lt_or_eq _ _ H'0); intros E2. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) apply Rlt_le; auto with real. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) (* Goal: Rle (powerRZ e n) (powerRZ e m) *) rewrite <- E2; auto with real. (* Goal: Rle (powerRZ e n) (powerRZ e m) *) repeat rewrite <- E1; repeat rewrite powerRZ_R1; auto with real. Qed. Theorem Zlt_powerRZ : forall (e : R) (n m : Z), (1 <= e)%R -> (powerRZ e n < powerRZ e m)%R -> (n < m)%Z. (* Goal: forall (e : R) (n m : Z) (_ : Rlt (IZR (Zpos xH)) e) (_ : Rle (powerRZ e n) (powerRZ e m)), Z.le n m *) intros e n m H' H'0. (* Goal: Z.lt n m *) case (Zle_or_lt m n); auto; intros Z1. (* Goal: Z.lt n m *) Contradict H'0. (* Goal: not (Rlt (powerRZ e n) (powerRZ e m)) *) apply Rle_not_lt. (* Goal: Rle (powerRZ e m) (powerRZ e n) *) apply Rle_powerRZ; auto. Qed. Theorem Zle_powerRZ : forall (e : R) (n m : Z), (1 < e)%R -> (powerRZ e n <= powerRZ e m)%R -> (n <= m)%Z. (* Goal: forall (e : R) (n m : Z) (_ : Rlt (IZR (Zpos xH)) e) (_ : Rle (powerRZ e n) (powerRZ e m)), Z.le n m *) intros e n m H' H'0. (* Goal: Z.le n m *) case (Zle_or_lt n m); auto; intros Z1. (* Goal: Z.le n m *) absurd (powerRZ e n <= powerRZ e m)%R; auto. (* Goal: not (Rle (powerRZ e n) (powerRZ e m)) *) apply Rlt_not_le. (* Goal: Rlt (powerRZ e m) (powerRZ e n) *) apply Rlt_powerRZ; auto. Qed. Theorem Rinv_powerRZ : forall (e : R) (n : Z), e <> 0%R -> (/ powerRZ e n)%R = powerRZ e (- n). (* Goal: forall (e : R) (n : Z) (_ : not (@eq R e (IZR Z0))), @eq R (Rinv (powerRZ e n)) (powerRZ e (Z.opp n)) *) intros e n H. (* Goal: @eq R (Rinv (powerRZ e n)) (powerRZ e (Z.opp n)) *) apply Rmult_eq_reg_l with (powerRZ e n); auto with real zarith. (* Goal: @eq R (Rmult (powerRZ e n) (Rinv (powerRZ e n))) (Rmult (powerRZ e n) (powerRZ e (Z.opp n))) *) rewrite Rinv_r; auto with real zarith. (* Goal: @eq R (IZR (Zpos xH)) (Rmult (powerRZ e n) (powerRZ e (Z.opp n))) *) rewrite <- powerRZ_add; auto with real zarith. (* Goal: forall e : R, @eq R (powerRZ e Z0) (IZR (Zpos xH)) *) ring_simplify (n + - n)%Z; simpl in |- *; auto. Qed.
(**************************************************************************** IEEE754 : ClosestProp Laurent Thery, Sylvie Boldo ******************************************************************************) Require Export FroundProp. Require Export Closest. Section Fclosestp2. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Let radixMoreThanZERO := Zlt_1_O _ (Zlt_le_weak _ _ radixMoreThanOne). Hint Resolve radixMoreThanZERO: zarith. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Theorem ClosestOpp : forall (p : float) (r : R), Closest b radix r p -> Closest b radix (- r) (Fopp p). (* Goal: forall (p : float) (r : R) (_ : Closest b radix r p), Closest b radix (Ropp r) (Fopp p) *) intros p r H'; split. (* Goal: Fbounded b (Fopp p) *) (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) apply oppBounded; auto. (* Goal: Fbounded b p *) (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) case H'; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) intros f H'0. (* Goal: Rle (Rabs (Rminus (FtoR radix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) rewrite Fopp_correct. replace (- FtoR radix p - - r)%R with (- (FtoR radix p - r))%R; [ idtac | ring ]. replace (FtoR radix f - - r)%R with (- (- FtoR radix f - r))%R; [ idtac | ring ]. (* Goal: Rle (Rabs (Ropp (Rminus (FtoR radix p) r))) (Rabs (Ropp (Rminus (Ropp (FtoR radix f)) r))) *) rewrite <- Fopp_correct. (* Goal: Rle (Rabs (Ropp (Rminus (FtoR radix p) r))) (Rabs (Ropp (Rminus (FtoR radix (Fopp f)) r))) *) repeat rewrite Rabs_Ropp. (* Goal: Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix (Fopp f)) r)) *) case H'; auto with float. Qed. Theorem ClosestFabs : forall (p : float) (r : R), Closest b radix r p -> Closest b radix (Rabs r) (Fabs p). (* Goal: forall (p : float) (r : R) (_ : Closest b radix r p), Closest b radix (Rabs r) (Fabs p) *) intros p r H'; case (Rle_or_lt 0 r); intros Rl0. (* Goal: Closest b radix (Rabs r) (Fabs p) *) (* Goal: Closest b radix (Rabs r) (Fabs p) *) rewrite Rabs_right; auto with real. (* Goal: Closest b radix r (Fabs p) *) (* Goal: Closest b radix (Rabs r) (Fabs p) *) replace (Fabs p) with p; auto. (* Goal: @eq float (Fopp p) (Fabs p) *) (* Goal: Rle r (IZR Z0) *) unfold Fabs in |- *; apply floatEq; simpl in |- *; auto. (* Goal: @eq Z (Fnum p) (Z.abs (Fnum p)) *) (* Goal: Closest b radix (Rabs r) (Fabs p) *) cut (0 <= Fnum p)%Z. case (Fnum p); simpl in |- *; auto; intros p' H0; Contradict H0; apply Zlt_not_le; red in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le Z0 (Fnum p) *) (* Goal: Closest b radix (Rabs r) (Fabs p) *) apply LeR0Fnum with (radix := radix); auto. apply RleRoundedR0 with (b := b) (precision := precision) (P := Closest b radix) (r := r); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Closest b radix (Rabs r) (Fabs p) *) apply ClosestRoundedModeP with (precision := precision); auto with real. (* Goal: Closest b radix (Rabs r) (Fabs p) *) rewrite Faux.Rabsolu_left1; auto. (* Goal: Closest b radix (Ropp r) (Fabs p) *) (* Goal: Rle r (IZR Z0) *) replace (Fabs p) with (Fopp p). (* Goal: Closest b radix (Ropp r) (Fopp p) *) (* Goal: @eq float (Fopp p) (Fabs p) *) (* Goal: Rle r (IZR Z0) *) apply ClosestOpp; auto. (* Goal: @eq float (Fopp p) (Fabs p) *) (* Goal: Rle r (IZR Z0) *) unfold Fabs in |- *; apply floatEq; simpl in |- *; auto. (* Goal: @eq Z (Z.opp (Fnum p)) (Z.abs (Fnum p)) *) (* Goal: Rle r (IZR Z0) *) cut (Fnum p <= 0)%Z. case (Fnum p); simpl in |- *; auto; intros p' H0; Contradict H0; apply Zlt_not_le; red in |- *; simpl in |- *; auto with zarith. (* Goal: Z.le (Fnum p) Z0 *) (* Goal: Rle r (IZR Z0) *) apply R0LeFnum with (radix := radix); auto. apply RleRoundedLessR0 with (b := b) (precision := precision) (P := Closest b radix) (r := r); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b max *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) y *) (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rlt_le; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) y *) (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rlt_le; auto. Qed. Theorem ClosestUlp : forall (p : R) (q : float), Closest b radix p q -> (2%nat * Rabs (p - q) <= Fulp b radix precision q)%R. (* Goal: forall (p : R) (q : float) (_ : Closest b radix p q), Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (powerRZ (IZR radix) (Fexp q)) *) intros p q H'. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) case (Req_dec p q); intros Eqpq. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) rewrite Eqpq. replace (Rabs (q - q)) with 0%R; [ rewrite Rmult_0_r | replace (q - q)%R with 0%R; try ring; rewrite Rabs_right; auto with real ]. (* Goal: Rle (IZR Z0) (Fulp b radix precision q) *) (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) unfold Fulp in |- *; apply Rlt_le; auto with real arith. replace (2%nat * Rabs (p - q))%R with (Rabs (p - q) + Rabs (p - q))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) case ClosestMinOrMax with (1 := H'); intros H'1. (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) apply Rle_trans with (Rabs (p - q) + Rabs (FNSucc b radix precision q - p))%R. (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) apply Rplus_le_compat_l. (* Goal: Rle (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p))) (Fulp b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) rewrite <- (Rabs_Ropp (p - q)). (* Goal: Rle (Rabs (Ropp (Rminus p (FtoRradix q)))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p))) (Fulp b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) rewrite Ropp_minus_distr. (* Goal: Rle (Rabs (Rminus (FtoRradix q) p)) (Rabs (Rminus (FtoRradix (FNPred b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) elim H'; auto. (* Goal: forall (_ : Fbounded b q) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix q) p)) (Rabs (Rminus (FtoR radix f) p))), Rle (Rabs (Rminus (FtoRradix q) p)) (Rabs (Rminus (FtoRradix (FNPred b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) intros H'0 H'2; apply H'2; auto. (* Goal: Fbounded b (FNPred b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) apply FcanonicBound with (radix := radix); auto with float arith. (* Goal: Rle (Rplus (Rminus (FtoRradix q) p) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) rewrite Rabs_right. (* Goal: Rle (Rplus (Rminus (FtoRradix q) p) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) rewrite Rabs_right. replace (p - q + (FNSucc b radix precision q - p))%R with (FNSucc b radix precision q - q)%R; [ idtac | ring ]. (* Goal: Rle (Rminus (FtoRradix (FNSucc b radix precision q)) (FtoRradix q)) (Fulp b radix precision q) *) (* Goal: Rge (Rminus (FtoRradix (FNSucc b radix precision q)) p) (IZR Z0) *) (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) unfold FtoRradix in |- *; apply FulpSuc; auto. (* Goal: Fbounded b q *) (* Goal: Rge (Rminus p (FtoRradix (FNPred b radix precision q))) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) case H'1; auto. (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) apply Rge_minus; apply Rle_ge; auto with real float. (* Goal: Rle p (FtoRradix (FNSucc b radix precision q)) *) (* Goal: Rge (Rminus p (FtoRradix q)) (IZR Z0) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) case MinMax with (3 := pGivesBound) (r := p) (p := q); auto with arith. (* Goal: forall (_ : Fbounded b (FNPred b radix precision q)) (_ : and (Rle (FtoR radix (FNPred b radix precision q)) p) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) p), Rle (FtoR radix f) (FtoR radix (FNPred b radix precision q)))), Rle (FtoRradix (FNPred b radix precision q)) p *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) intros H'0 H'2; elim H'2; intros H'3 H'4; apply H'3; clear H'2; auto. (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) apply Rge_minus; apply Rle_ge; auto with real float. (* Goal: Rle (FtoRradix q) p *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) apply isMin_inv1 with (1 := H'1). (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) apply Rle_trans with (Rabs (p - q) + Rabs (p - FNPred b radix precision q))%R. (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) apply Rplus_le_compat_l. rewrite <- (Rabs_Ropp (p - q)); rewrite <- (Rabs_Ropp (p - FNPred b radix precision q)). (* Goal: Rle (Rabs (Ropp (Rminus p (FtoRradix q)))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p))) (Fulp b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) repeat rewrite Ropp_minus_distr. (* Goal: Rle (Rabs (Rminus (FtoRradix q) p)) (Rabs (Rminus (FtoRradix (FNPred b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) elim H'; auto. (* Goal: forall (_ : Fbounded b q) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoR radix q) p)) (Rabs (Rminus (FtoR radix f) p))), Rle (Rabs (Rminus (FtoRradix q) p)) (Rabs (Rminus (FtoRradix (FNPred b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) intros H'0 H'2; apply H'2; auto. (* Goal: Fbounded b (FNPred b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) apply FcanonicBound with (radix := radix); auto with float arith. (* Goal: Rle (Rabs (Ropp (Rminus p (FtoRradix q)))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus (FtoRradix (FNSucc b radix precision q)) p))) (Fulp b radix precision q) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) rewrite <- (Rabs_Ropp (p - q)); rewrite Ropp_minus_distr. (* Goal: Rle (Rplus (Rminus (FtoRradix q) p) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) rewrite Rabs_right. (* Goal: Rle (Rplus (Rminus (FtoRradix q) p) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) rewrite Rabs_right. replace (q - p + (p - FNPred b radix precision q))%R with (q - FNPred b radix precision q)%R; [ idtac | ring ]. (* Goal: Rle (Rminus (FtoRradix q) (FtoRradix (FNPred b radix precision q))) (Fulp b radix precision q) *) (* Goal: Rge (Rminus p (FtoRradix (FNPred b radix precision q))) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) unfold FtoRradix in |- *; apply FulpPred; auto. (* Goal: Fbounded b q *) (* Goal: Rge (Rminus p (FtoRradix (FNPred b radix precision q))) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) case H'1; auto. (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) apply Rge_minus; apply Rle_ge; auto with real float. (* Goal: Rle (FtoRradix (FNPred b radix precision q)) p *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) case MaxMin with (3 := pGivesBound) (r := p) (p := q); auto with arith. (* Goal: forall (_ : Fbounded b (FNPred b radix precision q)) (_ : and (Rle (FtoR radix (FNPred b radix precision q)) p) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) p), Rle (FtoR radix f) (FtoR radix (FNPred b radix precision q)))), Rle (FtoRradix (FNPred b radix precision q)) p *) (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) intros H'0 H'2; elim H'2; intros H'3 H'4; apply H'3; clear H'2; auto. (* Goal: Rge (Rminus (FtoRradix q) p) (IZR Z0) *) apply Rge_minus; apply Rle_ge; auto with real float. (* Goal: Rle p (FtoRradix q) *) apply isMax_inv1 with (1 := H'1). Qed. Theorem ClosestExp : forall (p : R) (q : float), Closest b radix p q -> (2%nat * Rabs (p - q) <= powerRZ radix (Fexp q))%R. (* Goal: forall (p : R) (q : float) (_ : Closest b radix p q), Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (powerRZ (IZR radix) (Fexp q)) *) intros p q H'. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (powerRZ (IZR radix) (Fexp q)) *) apply Rle_trans with (Fulp b radix precision q). (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus p (FtoRradix q)))) (Fulp b radix precision q) *) (* Goal: Rle (Fulp b radix precision q) (powerRZ (IZR radix) (Fexp q)) *) apply (ClosestUlp p q); auto. (* Goal: Rle (Fulp b radix precision q) (powerRZ (IZR radix) (Fexp q)) *) replace (powerRZ radix (Fexp q)) with (FtoRradix (Float 1%nat (Fexp q))). (* Goal: Rle (Fulp b radix precision q) (FtoRradix (Float (Z.of_nat (S O)) (Fexp q))) *) (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) apply (FulpLe b radix); auto. apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := p); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b max *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: @eq R (FtoRradix (Float (Z.of_nat (S O)) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) ring. Qed. Theorem ClosestErrorExpStrict : forall (p q : float) (x : R), Fbounded b p -> Fbounded b q -> Closest b radix x p -> q = (x - p)%R :>R -> q <> 0%R :>R -> (Fexp q < Fexp p)%Z. intros. case (Zle_or_lt (Fexp p) (Fexp q)); auto; intros Z1. absurd (powerRZ radix (Fexp p) <= powerRZ radix (Fexp q))%R. 2: apply Rle_powerRZ; auto with real arith. apply Rgt_not_le. red in |- *; apply Rlt_le_trans with (2%nat * powerRZ radix (Fexp q))%R. apply Rltdouble; auto with real arith. apply Rle_trans with (2%nat * Fabs q)%R. apply Rmult_le_compat_l; auto with real arith. replace 0%R with (INR 0); auto with real arith. replace (powerRZ radix (Fexp q)) with (FtoRradix (Float 1%nat (Fexp q))); auto. apply (Fop.RleFexpFabs radix); auto with real zarith. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) unfold FtoRradix, FtoR in |- *; simpl in |- *; ring. rewrite (Fabs_correct radix); auto with arith. replace (FtoR radix q) with (x - p)%R; auto. apply ClosestExp; auto. Qed. Theorem ClosestIdem : forall p q : float, Fbounded b p -> Closest b radix p q -> p = q :>R. (* Goal: forall (p q : float) (_ : Fbounded b p) (_ : Closest b radix (FtoRradix p) q), @eq R (FtoRradix p) (FtoRradix q) *) intros p q H' H'0. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) case (Rabs_pos (q - p)); intros H1. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) Contradict H1; apply Rle_not_lt. (* Goal: Rle (Rabs (Rminus (FtoRradix q) (FtoRradix p))) (IZR Z0) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) replace 0%R with (Rabs (p - p)); [ case H'0; auto | idtac ]. (* Goal: @eq R (Rabs (Rminus (FtoRradix p) (FtoRradix p))) (IZR Z0) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) replace (p - p)%R with 0%R; [ apply Rabs_R0; auto | ring ]. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply Rplus_eq_reg_l with (r := (- p)%R). (* Goal: @eq R (Rplus (Ropp (FtoRradix p)) (FtoRradix p)) (Rplus (Ropp (FtoRradix p)) (FtoRradix q)) *) apply trans_eq with 0%R; [ ring | idtac ]. (* Goal: @eq R (IZR Z0) (Rplus (Ropp (FtoRradix p)) (FtoRradix q)) *) apply trans_eq with (q - p)%R; [ idtac | ring ]. (* Goal: @eq R (IZR Z0) (Rminus (FtoRradix q) (FtoRradix p)) *) generalize H1; unfold Rabs in |- *; case (Rcase_abs (q - p)); auto. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) intros r H0; replace 0%R with (-0)%R; [ rewrite H0 | idtac ]; ring. Qed. Theorem ClosestM1 : forall (r1 r2 : R) (min max p q : float), isMin b radix r1 min -> isMax b radix r1 max -> (min + max < 2%nat * r2)%R -> Closest b radix r1 p -> Closest b radix r2 q -> (p <= q)%R. intros r1 r2 min max p q H' H'0 H'1 H'2 H'3. case (Rle_or_lt r2 max); intros H'4. 2: apply (ClosestMonotone b radix) with (p := r1) (q := r2); auto. 2: apply Rle_lt_trans with (FtoRradix max); auto. 2: apply isMax_inv1 with (1 := H'0). case H'4; clear H'4; intros H'4. 2: replace (FtoRradix q) with (FtoRradix max). 2: case ClosestMinOrMax with (1 := H'2); intros H'5. 2: replace (FtoRradix p) with (FtoRradix min). 2: apply Rle_trans with r1. 2: apply isMin_inv1 with (1 := H'). 2: apply isMax_inv1 with (1 := H'0). 2: apply MinEq with (1 := H'); auto. 2: replace (FtoRradix p) with (FtoRradix max); auto with real. 2: apply MaxEq with (1 := H'0); auto. 2: apply ClosestIdem; auto. 2: case H'0; auto. 2: rewrite <- H'4; auto. cut (min < r2)%R. 2: apply Rmult_lt_reg_l with (r := INR 2); auto with real. 2: replace (2%nat * min)%R with (min + min)%R; [ idtac | simpl in |- *; ring ]. 2: apply Rle_lt_trans with (2 := H'1). 2: apply Rplus_le_compat_l; auto with real. 2: apply Rle_trans with r1. 2: apply isMin_inv1 with (1 := H'). 2: apply isMax_inv1 with (1 := H'0). intros H'5. replace (FtoRradix q) with (FtoRradix max). case ClosestMinOrMax with (1 := H'2); intros H'6. replace (FtoRradix p) with (FtoRradix min). apply Rle_trans with r1. apply isMin_inv1 with (1 := H'). apply isMax_inv1 with (1 := H'0). apply MinEq with (1 := H'); auto. replace (FtoRradix p) with (FtoRradix max); auto with real. apply MaxEq with (1 := H'0); auto. (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply sym_eq. apply (ClosestMaxEq b radix) with (r := r2) (min := min); auto. apply isMinComp with (2 := H'0); auto. apply isMaxComp with (1 := H'); auto. Qed. Theorem FmultRadixInv : forall (x z : float) (y : R), Fbounded b x -> Closest b radix y z -> (/ 2%nat * x < y)%R -> (/ 2%nat * x <= z)%R. (* Goal: forall (x z : float) (y : R) (_ : Fbounded b x) (_ : Closest b radix y z) (_ : Rlt (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) y), Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) intros x z y H' H'0 H'1. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) case MinEx with (r := (/ 2%nat * x)%R) (3 := pGivesBound); auto with arith. (* Goal: forall (x0 : float) (_ : isMin b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) x0), Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) intros min isMin. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) case MaxEx with (r := (/ 2%nat * x)%R) (3 := pGivesBound); auto with arith. (* Goal: forall (x0 : float) (_ : isMax b radix (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) x0), Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) intros max isMax. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) case (Rle_or_lt y max); intros Rl1. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) case Rl1; clear Rl1; intros Rl1. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) replace (FtoRradix z) with (FtoRradix max). (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix max) *) (* Goal: Rle (FtoRradix max) (FtoRradix z) *) apply isMax_inv1 with (1 := isMax). (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply sym_eq. unfold FtoRradix in |- *; apply ClosestMaxEq with (b := b) (r := y) (min := min); auto. (* Goal: Fmin.isMin b radix y min *) (* Goal: Fmin.isMax b radix y max *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply isMinComp with (r1 := (/ 2%nat * x)%R) (max := max); auto. (* Goal: Rlt (FtoR radix min) y *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rle_lt_trans with (2 := H'1); auto. (* Goal: Rle (FtoR radix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply isMin_inv1 with (1 := isMin). (* Goal: Fmin.isMax b radix y max *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply isMaxComp with (r1 := (/ 2%nat * x)%R) (min := min); auto. (* Goal: Rlt (FtoR radix min) y *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rle_lt_trans with (2 := H'1); auto. (* Goal: Rle (FtoR radix min) (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) *) (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply isMin_inv1 with (1 := isMin). (* Goal: Rlt (Rplus (FtoR radix min) (FtoR radix max)) (Rmult (INR (S (S O))) y) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) replace (FtoR radix min + FtoR radix max)%R with (FtoRradix x). (* Goal: Rlt (FtoRradix x) (Rmult (INR (S (S O))) y) *) (* Goal: @eq R (FtoRradix x) (Rplus (FtoR radix min) (FtoR radix max)) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rmult_lt_reg_l with (r := (/ 2%nat)%R); auto with real. (* Goal: Rlt (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (Rmult (Rinv (INR (S (S O)))) (Rmult (INR (S (S O))) y)) *) (* Goal: @eq R (FtoRradix x) (Rplus (FtoR radix min) (FtoR radix max)) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) rewrite <- Rmult_assoc; rewrite Rinv_l; try rewrite Rmult_1_l; auto with real. (* Goal: @eq R (FtoRradix x) (Rplus (FtoR radix min) (FtoR radix max)) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) unfold FtoRradix in |- *; apply (div2IsBetween b radix precision); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) cut (Closest b radix max z); [ intros C0 | idtac ]. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) replace (FtoRradix z) with (FtoRradix max); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix max) *) (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) rewrite <- Rl1; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) y *) (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rlt_le; auto. (* Goal: @eq R (FtoRradix max) (FtoRradix z) *) (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply ClosestIdem; auto. (* Goal: Fbounded b max *) case isMax; auto. (* Goal: Closest b radix (FtoRradix max) z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply (ClosestCompatible b radix y max z z); auto. (* Goal: Fbounded b z *) (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) case H'0; auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix z) *) apply Rle_trans with (FtoRradix max); auto. (* Goal: Rle (Rmult (Rinv (INR (S (S O)))) (FtoRradix x)) (FtoRradix max) *) (* Goal: Rle (FtoRradix max) (FtoRradix z) *) apply isMax_inv1 with (1 := isMax). (* Goal: Rle (FtoRradix max) (FtoRradix z) *) apply (ClosestMonotone b radix (FtoRradix max) y); auto. (* Goal: Closest b radix (FtoRradix max) max *) apply (RoundedModeProjectorIdem b radix (Closest b radix)); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b max *) apply ClosestRoundedModeP with (precision := precision); auto. (* Goal: Fbounded b max *) case isMax; auto. Qed. Theorem ClosestErrorBound : forall (p q : float) (x : R), Fbounded b p -> Closest b radix x p -> q = (x - p)%R :>R -> (Rabs q <= Float 1%nat (Fexp p) * / 2%nat)%R. (* Goal: forall (p q : float) (x : R) (_ : Fbounded b p) (_ : Closest b radix x p) (_ : @eq R (FtoRradix q) (Rminus x (FtoRradix p))), Rle (Rabs (FtoRradix q)) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) intros p q x H H0 H1. (* Goal: Rle (Rabs (FtoRradix q)) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply Rle_trans with (Fulp b radix precision p * / 2%nat)%R. (* Goal: Rle (Rabs (FtoRradix q)) (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) rewrite H1. replace (Rabs (x - p)) with (2%nat * Rabs (x - p) * / 2%nat)%R; [ idtac | field; auto with real ]. (* Goal: Rle (Rmult (Rmult (INR (S (S O))) (Rabs (Rminus x (FtoRradix p)))) (Rinv (INR (S (S O))))) (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply Rmult_le_compat_r; auto with real. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus x (FtoRradix p)))) (Fulp b radix precision p) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply ClosestUlp; auto. (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply Rmult_le_compat_r. (* Goal: Rle (IZR Z0) (Rinv (INR (S (S O)))) *) (* Goal: Rle (Fulp b radix precision p) (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) *) apply Rlt_le. (* Goal: Rlt (IZR Z0) (Rinv (INR (S (S O)))) *) (* Goal: Rle (Fulp b radix precision p) (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) *) apply Rinv_0_lt_compat; auto with real. (* Goal: Rle (Fulp b radix precision p) (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) *) unfold FtoRradix in |- *; apply FulpLe; auto. Qed. Theorem ClosestErrorExp : forall (p q : float) (x : R), Fbounded b p -> Fbounded b q -> Closest b radix x p -> q = (x - p)%R :>R -> exists error : float, Fbounded b error /\ error = q :>R /\ (Fexp error <= Zmax (Fexp p - precision) (- dExp b))%Z. (* Goal: forall (p q : float) (x : R) (_ : Fbounded b p) (_ : Fbounded b q) (_ : Closest b radix x p) (_ : @eq R (FtoRradix q) (Rminus x (FtoRradix p))), @ex float (fun error : float => and (Fbounded b error) (and (@eq R (FtoRradix error) (FtoRradix q)) (Z.le (Fexp error) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))))) *) intros p q x H H0 H1 H2; exists (Fnormalize radix b precision q). cut (Fcanonic radix b (Fnormalize radix b precision q)); [ intros C1 | apply FnormalizeCanonic; auto with arith ]. (* Goal: and (@eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q)) (Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))) *) split. (* Goal: Fbounded b (Fnormalize radix b precision q) *) (* Goal: and (@eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q)) (Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))) *) apply FcanonicBound with (radix := radix); auto. (* Goal: and (@eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q)) (Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))) *) split. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply (FnormalizeCorrect radix); auto. (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) case C1; intros C2. (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zle_trans with (Fexp p - precision)%Z; auto with zarith. (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Z.sub (Fexp p) (Z.of_nat precision)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zplus_le_reg_l with (Z_of_nat precision). (* Goal: Z.le (Z.add (Z.of_nat precision) (Fexp (Fnormalize radix b precision q))) (Z.add (Z.of_nat precision) (Z.sub (Fexp p) (Z.of_nat precision))) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) replace (precision + (Fexp p - precision))%Z with (Fexp p); [ idtac | ring ]. replace (precision + Fexp (Fnormalize radix b precision q))%Z with (Zsucc (Zpred precision + Fexp (Fnormalize radix b precision q))); [ idtac | unfold Zpred, Zsucc in |- *; ring ]. (* Goal: Z.le (Z.succ (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (Fexp p) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zlt_le_succ. (* Goal: Z.lt (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q))) (Fexp p) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zlt_powerRZ with (IZR radix); auto with real zarith. (* Goal: Rlt (powerRZ (IZR radix) (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite powerRZ_add; auto with real zarith. apply Rle_lt_trans with (Zabs (Fnum (Fnormalize radix b precision q)) * powerRZ radix (Fexp (Fnormalize radix b precision q)))%R. (* Goal: Rle (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) *) (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Rmult_le_compat_r; auto with real zarith. replace (Zpred precision) with (Z_of_nat (pred (digit radix (Fnum (Fnormalize radix b precision q))))). (* Goal: Rle (powerRZ (IZR radix) (Z.of_nat (Init.Nat.pred (digit radix (Fnum (Fnormalize radix b precision q)))))) (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) *) (* Goal: @eq Z (Z.of_nat (Init.Nat.pred (digit radix (Fnum (Fnormalize radix b precision q))))) (Z.pred (Z.of_nat precision)) *) (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite <- Zpower_nat_Z_powerRZ. (* Goal: Rle (IZR (Zpower_nat radix (Init.Nat.pred (digit radix (Fnum (Fnormalize radix b precision q)))))) (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) *) (* Goal: @eq Z (Z.of_nat (Init.Nat.pred (digit radix (Fnum (Fnormalize radix b precision q))))) (Z.pred (Z.of_nat precision)) *) (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Rle_IZR; apply digitLess; auto with real zarith. change (~ is_Fzero (Fnormalize radix b precision q)) in |- *; apply (FnormalNotZero radix b); auto with float. change (Z_of_nat (pred (Fdigit radix (Fnormalize radix b precision q))) = Zpred precision) in |- *. rewrite FnormalPrecision with (precision := precision) (4 := C2); auto with zarith arith. (* Goal: @eq Z (Z.of_nat (Init.Nat.pred precision)) (Z.pred (Z.of_nat precision)) *) (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply inj_pred; auto with arith. change (Fabs (Fnormalize radix b precision q) < powerRZ radix (Fexp p))%R in |- *. (* Goal: Rlt (FtoRradix (Fabs (Fnormalize radix b precision q))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite (Fabs_correct radix); auto; rewrite (FnormalizeCorrect radix); auto. (* Goal: Rlt (Rabs (FtoR radix q)) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Rle_lt_trans with (Float 1%nat (Fexp p) * / 2%nat)%R. (* Goal: Rle (Rabs (FtoR radix q)) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) (* Goal: Rlt (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply ClosestErrorBound with (x := x); auto. (* Goal: Rlt (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) unfold FtoRradix in |- *; unfold FtoR in |- *; simpl in |- *. pattern (powerRZ radix (Fexp p)) at 2 in |- *; replace (powerRZ radix (Fexp p)) with (powerRZ radix (Fexp p) * 1)%R; [ idtac | ring ]. replace (1 * powerRZ radix (Fexp p))%R with (powerRZ radix (Fexp p)); [ apply Rmult_lt_compat_l | ring ]. (* Goal: Rlt (IZR Z0) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Rlt (Rinv (Rplus (IZR (Zpos xH)) (IZR (Zpos xH)))) (IZR (Zpos xH)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply powerRZ_lt; auto with arith real. (* Goal: Rlt (Rinv (Rplus (IZR (Zpos xH)) (IZR (Zpos xH)))) (IZR (Zpos xH)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) pattern 1%R at 3 in |- *; replace 1%R with (/ 1)%R. (* Goal: Rlt (Rinv (Rplus (IZR (Zpos xH)) (IZR (Zpos xH)))) (Rinv (IZR (Zpos xH))) *) (* Goal: @eq R (Rinv (IZR (Zpos xH))) (IZR (Zpos xH)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Rinv_1_lt_contravar; auto with real. (* Goal: @eq R (Rinv (IZR (Zpos xH))) (IZR (Zpos xH)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) replace 2%R with (INR 2); auto with real arith. (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zle_trans with (- dExp b)%Z; auto with float zarith. (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Z.opp (Z.of_N (dExp b))) *) case C2. (* Goal: forall (_ : Fbounded b (Fnormalize radix b precision q)) (_ : and (@eq Z (Fexp (Fnormalize radix b precision q)) (Z.opp (Z.of_N (dExp b)))) (Z.lt (Z.abs (Z.mul radix (Fnum (Fnormalize radix b precision q)))) (Zpos (vNum b)))), Z.le (Fexp (Fnormalize radix b precision q)) (Z.opp (Z.of_N (dExp b))) *) intros H3 (H4, H5); rewrite H4; auto with zarith. Qed. Theorem ClosestErrorBoundNormal_aux : forall (x : R) (p : float), Closest b radix x p -> Fnormal radix b (Fnormalize radix b precision p) -> (Rabs (x - p) <= Rabs p * (/ 2%nat * (radix * / Zpos (vNum b))))%R. intros x p H H'. apply Rle_trans with (/ 2%nat * Fulp b radix precision p)%R. replace (Rabs (x - FtoRradix p)) with (/ 2%nat * (2%nat * Rabs (x - FtoRradix p)))%R. apply Rmult_le_compat_l; auto with real. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus x (FtoRradix p)))) (Fulp b radix precision p) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply ClosestUlp; auto. rewrite <- Rmult_assoc; rewrite Rinv_l; simpl in |- *; auto with real. apply Rle_trans with (/ 2%nat * (Rabs p * (radix * / Zpos (vNum b))))%R; [ apply Rmult_le_compat_l | right; ring; ring ]. apply Rlt_le; apply Rinv_0_lt_compat; auto with real arith. unfold Fulp in |- *. replace (Fexp (Fnormalize radix b precision p)) with (Fexp (Fnormalize radix b precision p) + precision + - precision)%Z; [ idtac | ring ]. (* Goal: Rlt (powerRZ (IZR radix) (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite powerRZ_add; auto with real zarith. apply Rle_trans with (Rabs p * radix * powerRZ radix (- precision))%R; [ apply Rmult_le_compat_r | right ]; auto with real zarith. 2: rewrite pGivesBound; simpl in |- *. 2: rewrite powerRZ_Zopp; auto with real zarith; rewrite Zpower_nat_Z_powerRZ; (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) auto with real zarith; ring. replace (FtoRradix p) with (FtoRradix (Fnormalize radix b precision p)); [ idtac | apply (FnormalizeCorrect radix) ]; auto. rewrite <- (Fabs_correct radix); unfold FtoR in |- *; simpl in |- *; auto with arith. (* Goal: Rlt (powerRZ (IZR radix) (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite powerRZ_add; auto with real zarith. replace (Zabs (Fnum (Fnormalize radix b precision p)) * powerRZ radix (Fexp (Fnormalize radix b precision p)) * radix)%R with (powerRZ radix (Fexp (Fnormalize radix b precision p)) * (Zabs (Fnum (Fnormalize radix b precision p)) * radix))%R; [ idtac | ring ]. apply Rmult_le_compat_l; auto with arith real. rewrite <- Zpower_nat_Z_powerRZ; auto with real zarith. rewrite <- Rmult_IZR; apply Rle_IZR. rewrite <- pGivesBound; pattern radix at 2 in |- *; rewrite <- (Zabs_eq radix); auto with zarith. rewrite <- Zabs_Zmult. (* Goal: Rle (Rabs (Rminus (FtoRradix q) p)) (Rabs (Rminus (FtoRradix (FNPred b radix precision q)) p)) *) (* Goal: Rle (Rplus (Rabs (Rminus p (FtoRradix q))) (Rabs (Rminus p (FtoRradix (FNPred b radix precision q))))) (Fulp b radix precision q) *) rewrite Zmult_comm; elim H'; auto. Qed. Theorem ClosestErrorBound2 : forall (x : R) (p : float), Closest b radix x p -> (Rabs (x - p) <= Rmax (Rabs p * (/ 2%nat * (radix * / Zpos (vNum b)))) (/ 2%nat * powerRZ radix (- dExp b)))%R. intros x p H. cut (Fcanonic radix b (Fnormalize radix b precision p)); [ intros tmp; Casec tmp; intros Fs | idtac ]. 3: apply FnormalizeCanonic; auto with arith. 3: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := x); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b max *) 3: apply ClosestRoundedModeP with (precision := precision); auto. apply Rle_trans with (Rabs p * (/ 2%nat * (radix * / Zpos (vNum b))))%R; [ idtac | apply RmaxLess1 ]. apply ClosestErrorBoundNormal_aux; auto. apply Rle_trans with (/ 2%nat * Fulp b radix precision p)%R. replace (Rabs (x - FtoRradix p)) with (/ 2%nat * (2%nat * Rabs (x - FtoRradix p)))%R. apply Rmult_le_compat_l; auto with real. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus x (FtoRradix p)))) (Fulp b radix precision p) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply ClosestUlp; auto. rewrite <- Rmult_assoc; rewrite Rinv_l; simpl in |- *; auto with real. elim Fs; intros H1 H2; elim H2; intros; clear H2. unfold Fulp in |- *; rewrite H0; apply RmaxLess2. Qed. Theorem ClosestErrorBoundNormal : forall (x : R) (p : float), Closest b radix x p -> Fnormal radix b (Fnormalize radix b precision p) -> (Rabs (x - p) <= Rabs p * (/ 2%nat * powerRZ radix (Zsucc (- precision))))%R. (* Goal: forall (x : R) (p : float) (_ : Closest b radix x p) (_ : Fnormal radix b (Fnormalize radix b precision p)), Rle (Rabs (Rminus x (FtoRradix p))) (Rmult (Rabs (FtoRradix p)) (Rmult (Rinv (INR (S (S O)))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))))) *) intros x p H H1. apply Rle_trans with (Rabs (FtoRradix p) * (/ 2%nat * (radix * / Zpos (vNum b))))%R; [ apply ClosestErrorBoundNormal_aux; auto | right ]. replace (powerRZ radix (Zsucc (- precision))) with (radix * / Zpos (vNum b))%R; auto with real. (* Goal: @eq R (Rmult (IZR radix) (Rinv (IZR (Zpos (vNum b))))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))) *) rewrite pGivesBound; rewrite Zpower_nat_Z_powerRZ. (* Goal: @eq R (Rmult (IZR radix) (Rinv (powerRZ (IZR radix) (Z.of_nat precision)))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))) *) rewrite Rinv_powerRZ; auto with real zarith. (* Goal: @eq R (Rmult (IZR radix) (powerRZ (IZR radix) (Z.opp (Z.of_nat precision)))) (powerRZ (IZR radix) (Z.succ (Z.opp (Z.of_nat precision)))) *) rewrite powerRZ_Zs; auto with real zarith. Qed. Theorem ClosestPropHigham25 : forall (x : R) (p : float), Closest b radix x p -> exists delta : R, (exists nu : R, (x / (1 + delta) + nu)%R = FtoRradix p /\ (Rabs delta <= / 2%nat * powerRZ radix (Zsucc (- precision)))%R /\ (Rabs nu <= / 2%nat * powerRZ radix (- dExp b))%R /\ (delta * nu)%R = 0%R /\ (Fnormal radix b (Fnormalize radix b precision p) -> nu = 0%R) /\ (Fsubnormal radix b (Fnormalize radix b precision p) -> delta = 0%R)). intros x p H. cut (Fcanonic radix b (Fnormalize radix b precision p)); [ intros tmp; Casec tmp; intros Fs | idtac ]. 3: apply FnormalizeCanonic; auto with arith. 3: apply RoundedModeBounded with (radix := radix) (P := Closest b radix) (r := x); auto. (* Goal: RoundedModeP b radix (Closest b radix) *) (* Goal: Fbounded b max *) 3: apply ClosestRoundedModeP with (precision := precision); auto. cut (~ is_Fzero (Fnormalize radix b precision p)); [ unfold is_Fzero in |- *; intros tmp | apply FnormalNotZero with radix b; auto ]. cut (FtoRradix p <> 0%R); [ intros H1; clear tmp | unfold FtoRradix in |- * ]. 2: rewrite <- FnormalizeCorrect with radix b precision p; auto; unfold FtoR in |- *; simpl in |- *. 2: apply Rmult_integral_contrapositive; split; auto with real zarith. exists ((x - p) / p)%R; exists 0%R. split; [ case (Req_dec x 0); intros H2 | idtac ]. repeat rewrite H2; unfold Rdiv in |- *. ring_simplify. rewrite <- FzeroisZero with radix b; unfold FtoRradix in |- *. cut (ProjectorP b radix (Closest b radix)); [ unfold ProjectorP in |- *; intros H3 | apply RoundedProjector; auto with float ]. apply H3; auto with float zarith. replace (FtoR radix (Fzero (- dExp b))) with x; auto with real. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) rewrite H2; unfold Fzero, FtoR in |- *; simpl in |- *; ring. apply ClosestRoundedModeP with precision; auto with zarith. apply sym_eq; apply trans_eq with (x / (1 + (x - p) / p))%R; [ idtac | ring ]. replace (1 + (x - FtoRradix p) / FtoRradix p)%R with (x / p)%R; unfold Rdiv in |- *. rewrite Rinv_mult_distr; auto with real; rewrite Rinv_involutive; auto; rewrite <- Rmult_assoc; rewrite Rinv_r; auto with real. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) ring_simplify; rewrite Rinv_l; auto with real; ring. (* Goal: and (@eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q)) (Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))) *) split. apply Rmult_le_reg_l with (Rabs p); [ apply Rabs_pos_lt; auto | idtac ]. apply Rle_trans with (Rabs (x - FtoRradix p)); [ right | apply ClosestErrorBoundNormal; auto ]. unfold Rdiv in |- *; rewrite Rabs_mult; rewrite Rabs_Rinv; auto. rewrite Rmult_comm; rewrite Rmult_assoc; rewrite Rinv_l; auto with real. apply Rabs_no_R0; exact H1. split; [ rewrite Rabs_R0; apply Rmult_le_pos; auto with real zarith | idtac ]. split; [ ring | idtac ]. split; [ auto with real | intros H2 ]. absurd (Fnormal radix b (Fnormalize radix b precision p) /\ Fsubnormal radix b (Fnormalize radix b precision p)). apply NormalNotSubNormal; auto. split; auto. exists 0%R; exists (p - x)%R. split; [ unfold Rdiv in |- *; ring_simplify (1 + 0)%R; rewrite Rinv_1; ring | idtac ]. split; [ rewrite Rabs_R0; apply Rmult_le_pos; auto with real zarith | idtac ]. (* Goal: and (@eq R (FtoRradix (Fnormalize radix b precision q)) (FtoRradix q)) (Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b))))) *) split. apply Rle_trans with (/ 2%nat * Fulp b radix precision p)%R. rewrite <- Rabs_Ropp; replace (- (FtoRradix p - x))%R with (x - FtoRradix p)%R; [ idtac | ring ]. replace (Rabs (x - FtoRradix p)) with (/ 2%nat * (2%nat * Rabs (x - FtoRradix p)))%R. (* Goal: Rle (Rmult (INR (S (S O))) (Rabs (Rminus x (FtoRradix p)))) (Fulp b radix precision p) *) (* Goal: Rle (Rmult (Fulp b radix precision p) (Rinv (INR (S (S O))))) (Rmult (FtoRradix (Float (Z.of_nat (S O)) (Fexp p))) (Rinv (INR (S (S O))))) *) apply Rmult_le_compat_l; auto with real; apply ClosestUlp; auto. rewrite <- Rmult_assoc; rewrite Rinv_l; simpl in |- *; auto with real. elim Fs; intros H1 H2; elim H2; intros; clear H2. unfold Fulp in |- *; rewrite H0; auto with real. split; [ ring | idtac ]. split; [ intros H2 | auto with real ]. absurd (Fnormal radix b (Fnormalize radix b precision p) /\ Fsubnormal radix b (Fnormalize radix b precision p)). apply NormalNotSubNormal; auto. split; auto. Qed. Theorem FpredUlpPos : forall x : float, Fcanonic radix b x -> (0 < x)%R -> (FPred b radix precision x + Fulp b radix precision (FPred b radix precision x))%R = x. (* Goal: forall (x : float) (_ : Fcanonic radix b x) (_ : Rlt (IZR Z0) (FtoRradix x)), @eq R (Rplus (FtoRradix (FPred b radix precision x)) (Fulp b radix precision (FPred b radix precision x))) (FtoRradix x) *) intros x Hx H. apply sym_eq; apply Rplus_eq_reg_l with (- FtoRradix (FPred b radix precision x))%R. apply trans_eq with (Fulp b radix precision (FPred b radix precision x)); [ idtac | ring ]. apply trans_eq with (FtoRradix x - FtoRradix (FPred b radix precision x))%R; [ ring | idtac ]. unfold FtoRradix in |- *; rewrite <- Fminus_correct; auto with zarith; fold FtoRradix in |- *. pattern x at 1 in |- *; replace x with (FSucc b radix precision (FPred b radix precision x)); [ idtac | apply FSucPred; auto with zarith arith ]. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (FPred b radix precision x)) (FPred b radix precision x))) (Fulp b radix precision (FPred b radix precision x)) *) unfold FtoRradix in |- *; apply FSuccUlpPos; auto with zarith arith. (* Goal: Fcanonic radix b (FPred b radix precision x) *) (* Goal: Rle (IZR Z0) (FtoR radix (FPred b radix precision x)) *) apply FPredCanonic; auto with zarith arith. (* Goal: Rle (IZR Z0) (FtoR radix (FPred b radix precision x)) *) apply R0RltRlePred; auto with zarith arith real. Qed. Theorem FulpFPredLe : forall f : float, Fbounded b f -> Fcanonic radix b f -> (Fulp b radix precision f <= radix * Fulp b radix precision (FPred b radix precision f))%R. intros f Hf1 Hf2; unfold Fulp in |- *. replace (Fnormalize radix b precision f) with f; [ idtac | apply FcanonicUnique with (radix := radix) (b := b) (precision := precision); auto with float arith zarith ]. 2: apply sym_eq; apply FnormalizeCorrect; auto with arith zarith. replace (Fnormalize radix b precision (FPred b radix precision f)) with (FPred b radix precision f); [ idtac | apply FcanonicUnique with (radix := radix) (b := b) (precision := precision); auto with float arith zarith ]. 2: apply sym_eq; apply FnormalizeCorrect; auto with arith zarith. pattern (IZR radix) at 2 in |- *; replace (IZR radix) with (powerRZ radix 1); [ idtac | simpl in |- *; auto with arith zarith real ]. rewrite <- powerRZ_add; auto with zarith real. apply Rle_powerRZ; auto with zarith real. replace (1 + Fexp (FPred b radix precision f))%Z with (Zsucc (Fexp (FPred b radix precision f))); auto with zarith. unfold FPred in |- *. generalize (Z_eq_bool_correct (Fnum f) (- pPred (vNum b))); case (Z_eq_bool (Fnum f) (- pPred (vNum b))); intros H1; [ simpl in |- *; auto with zarith | idtac ]. generalize (Z_eq_bool_correct (Fnum f) (nNormMin radix precision)); case (Z_eq_bool (Fnum f) (nNormMin radix precision)); intros H2; [ idtac | simpl in |- *; auto with zarith ]. generalize (Z_eq_bool_correct (Fexp f) (- dExp b)); case (Z_eq_bool (Fexp f) (- dExp b)); intros H3; simpl in |- *; auto with zarith. Qed. Theorem ClosestErrorBoundNormal2_aux : forall (x : R) (p : float), Closest b radix x p -> Fnormal radix b p -> Fnormal radix b (Fnormalize radix b precision (FPred b radix precision p)) -> (0 < x)%R -> (x < p)%R -> (Rabs (x - p) <= Rabs x * (/ 2%nat * powerRZ radix (Zsucc (- precision))))%R. intros x p H1 H2 H0 H3 H4. cut (Fcanonic radix b p); [ intros H5 | left; auto ]. cut (Fbounded b p); [ intros H6 | elim H2; auto ]. cut (0 < p)%R; [ intros H7 | apply Rlt_trans with x; auto ]. cut (FPred b radix precision p < x)%R; [ intros H' | idtac ]. apply Rle_trans with (/ 2%nat * Fulp b radix precision (FPred b radix precision p))%R. case (Rle_or_lt (Rabs (x - FtoRradix p)) (/ 2%nat * Fulp b radix precision (FPred b radix precision p))); auto; intros H8. absurd (Rabs (p - x) <= Rabs (FPred b radix precision p - x))%R. 2: generalize H1; unfold Closest in |- *; intros H9; elim H9; intros tmp H10. 2: clear tmp; apply H10; auto with float zarith arith. apply Rlt_not_le; rewrite Rabs_left; auto with real. apply Rle_lt_trans with (p - FPred b radix precision p + (x - p))%R; [ right; ring | idtac ]. pattern (FtoRradix p) at 1 in |- *; rewrite <- FpredUlpPos with p; auto with real. apply Rle_lt_trans with (Fulp b radix precision (FPred b radix precision p) + (x - p))%R; [ right; ring | idtac ]. apply Rle_lt_trans with (Fulp b radix precision (FPred b radix precision p) + - (/ 2%nat * Fulp b radix precision (FPred b radix precision p)))%R; [ apply Rplus_le_compat_l | idtac ]. apply Ropp_le_cancel; rewrite Ropp_involutive; rewrite <- Rabs_left; auto with real. apply Rle_lt_trans with (/ 2%nat * Fulp b radix precision (FPred b radix precision p))%R. right; apply trans_eq with ((1 + - / 2%nat) * Fulp b radix precision (FPred b radix precision p))%R; [ ring | idtac ]. replace (1 + - / 2%nat)%R with (/ 2%nat)%R; [ ring | simpl; field; auto with arith real; simpl in |- *; ring ]. rewrite <- Rabs_Ropp; replace (- (FtoRradix p - x))%R with (x - p)%R; auto; (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) ring. apply Rle_trans with (/ 2%nat * (Rabs x * powerRZ radix (Zsucc (- precision))))%R; [ apply Rmult_le_compat_l; auto with real arith | right; ring ]. apply Rle_trans with (Rabs (FPred b radix precision p) * powerRZ radix (Zsucc (- precision)))%R. unfold Fulp in |- *; replace (Fexp (Fnormalize radix b precision (FPred b radix precision p))) with (Fexp (Fnormalize radix b precision (FPred b radix precision p)) + precision + - precision)%Z; [ idtac | ring ]. (* Goal: Rlt (powerRZ (IZR radix) (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite powerRZ_add; auto with real zarith. apply Rle_trans with (Rabs (FPred b radix precision p) * radix * powerRZ radix (- precision))%R; [ apply Rmult_le_compat_r | right ]; auto with real zarith. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) 2: rewrite powerRZ_Zs; auto with real zarith; ring. replace (FtoRradix (FPred b radix precision p)) with (FtoRradix (Fnormalize radix b precision (FPred b radix precision p))); [ idtac | apply (FnormalizeCorrect radix) ]; auto. rewrite <- (Fabs_correct radix); unfold FtoR in |- *; simpl in |- *; auto with arith. (* Goal: Rlt (powerRZ (IZR radix) (Z.add (Z.pred (Z.of_nat precision)) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite powerRZ_add; auto with real zarith. apply Rle_trans with (powerRZ radix (Fexp (Fnormalize radix b precision (FPred b radix precision p))) * (Zabs (Fnum (Fnormalize radix b precision (FPred b radix precision p))) * radix))%R; [ idtac | right; ring ]. apply Rmult_le_compat_l; auto with arith real. rewrite <- Zpower_nat_Z_powerRZ; auto with real zarith; rewrite <- Rmult_IZR. apply Rle_IZR; rewrite <- pGivesBound; pattern radix at 3 in |- *; rewrite <- (Zabs_eq radix); auto with zarith; rewrite <- Zabs_Zmult; rewrite Zmult_comm; elim H0; auto. (* Goal: Rle (Rmult (powerRZ (IZR radix) (Z.pred (Z.of_nat precision))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) *) (* Goal: Rlt (Rmult (IZR (Z.abs (Fnum (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp (Fnormalize radix b precision q)))) (powerRZ (IZR radix) (Fexp p)) *) (* Goal: Z.le (Fexp (Fnormalize radix b precision q)) (Zmax (Z.sub (Fexp p) (Z.of_nat precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Rmult_le_compat_r; auto with real zarith. repeat rewrite Rabs_right; auto with real; apply Rle_ge; auto with real. unfold FtoRradix in |- *; apply R0RltRlePred; auto with real arith. case (Rle_or_lt 0 (FtoRradix (FPred b radix precision p) - x)); intros H9. absurd (Rabs (p - x) <= Rabs (FPred b radix precision p - x))%R. apply Rlt_not_le; repeat rewrite Rabs_right; try apply Rle_ge; auto with real. unfold Rminus in |- *; apply Rplus_lt_compat_r; auto with real float zarith. unfold FtoRradix in |- *; apply FPredLt; auto with real float zarith. generalize H1; unfold Closest in |- *; intros H'; elim H'; intros tmp H10. clear tmp; apply H10; auto with float zarith arith. apply Rplus_lt_reg_l with (- x)%R; auto with real. (* Goal: @eq R (Rmult (IZR (Zpos xH)) (powerRZ (IZR radix) (Fexp q))) (powerRZ (IZR radix) (Fexp q)) *) ring_simplify (- x + x)%R; apply Rle_lt_trans with (2 := H9); right; ring. Qed. End Fclosestp2. Hint Resolve ClosestOpp ClosestFabs ClosestUlp: float.
(**************************************************************************** IEEE754 : Closest Laurent Thery ***************************************************************************** Properties about the closest rounding mode *) Require Export Fround. Section Fclosest. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition Closest (r : R) (p : float) := Fbounded b p /\ (forall f : float, Fbounded b f -> (Rabs (p - r) <= Rabs (f - r))%R). Theorem ClosestTotal : TotalP Closest. (* Goal: TotalP EvenClosest *) red in |- *; intros r. (* Goal: @ex float (fun p : float => EvenClosest r p) *) case MinEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), @ex float (fun p : float => EvenClosest r p) *) intros min H'. (* Goal: @ex float (fun p : float => EvenClosest r p) *) case MaxEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMax b radix r x), @ex float (fun p : float => EvenClosest r p) *) intros max H'0. (* Goal: @ex float (fun p : float => Closest r p) *) cut (min <= r)%R; [ intros Rl1 | apply isMin_inv1 with (1 := H') ]. (* Goal: @ex float (fun p : float => EvenClosest r p) *) cut (r <= max)%R; [ intros Rl2 | apply isMax_inv1 with (1 := H'0) ]. (* Goal: @ex float (fun p : float => Closest r p) *) case (Rle_or_lt (Rabs (min - r)) (Rabs (max - r))); intros H'1. (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) exists min; split. (* Goal: Closest r p *) case H'; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) intros f H'2. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) case (Rle_or_lt f r); intros H'3. (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Faux.Rabsolu_left1. (* Goal: Rle (Ropp (Rminus (FtoRradix min) r)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) apply Ropp_le_contravar; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix f) r)) *) (* Goal: Rle (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) elim H'; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: @ex float (fun p : float => Closest r p) *) apply Rle_trans with (1 := H'1). (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Rabs_right. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) elim H'0; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rplus r (IZR Z0)) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: @ex float (fun p : float => Closest r p) *) rewrite Rplus_0_r. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: @ex float (fun p : float => Closest r p) *) exists max; split. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) intros f H'2. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) case (Rle_or_lt f r); intros H'3. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) apply Rle_trans with (1 := Rlt_le _ _ H'1). (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Faux.Rabsolu_left1. (* Goal: Rle (Ropp (Rminus (FtoRradix min) r)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) apply Ropp_le_contravar; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix f) r)) *) (* Goal: Rle (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) elim H'; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Rabs_right; auto with real. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) elim H'0; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. Qed. Theorem ClosestCompatible : CompatibleP b radix Closest. (* Goal: UniqueP radix EvenClosest *) red in |- *; simpl in |- *. (* Goal: forall (r1 r2 : R) (p q : float) (_ : Closest r1 p) (_ : @eq R r1 r2) (_ : @eq R (FtoR radix p) (FtoR radix q)) (_ : Fbounded b q), Closest r2 q *) intros r1 r2 p q H'; case H'. (* Goal: forall (_ : Fbounded b p) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix p) r1)) (Rabs (Rminus (FtoRradix f) r1))) (_ : @eq R r1 r2) (_ : @eq R (FtoR radix p) (FtoR radix q)) (_ : Fbounded b q), Closest r2 q *) intros H'0 H'1 H'2 H'3 H'4. (* Goal: EvenClosest (Ropp r) (Fopp p) *) split; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix q) r2)) (Rabs (Rminus (FtoRradix f) r2)) *) intros f H'5. (* Goal: Rle (Rabs (Rminus (FtoRradix q) r2)) (Rabs (Rminus (FtoRradix f) r2)) *) unfold FtoRradix in |- *; rewrite <- H'3; rewrite <- H'2; auto. Qed. Theorem ClosestMin : forall (r : R) (min max : float), isMin b radix r min -> isMax b radix r max -> (2%nat * r <= min + max)%R -> Closest r min. (* Goal: forall (r : R) (min max : float) (_ : isMin b radix r min) (_ : isMax b radix r max) (_ : Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r)), Closest r max *) intros r min max H' H'0 H'1; split. (* Goal: Closest r p *) case H'; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) intros f H'2. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) case (Rle_or_lt f r); intros H'3. (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Faux.Rabsolu_left1. (* Goal: Rle (Ropp (Rminus r (FtoR radix f))) (Ropp (Rminus r (FtoR radix p))) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Ropp_le_contravar. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) r *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMin_inv1 with (1 := H'); auto. (* Goal: Rgt (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite (Faux.Rabsolu_left1 (min - r)). (* Goal: Rle (Ropp (Rminus (FtoRradix min) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) rewrite (Rabs_right (f - r)). (* Goal: Rle (Ropp (Rminus (FtoRradix min) r)) (Rminus (FtoRradix f) r) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) apply Rle_trans with (max - r)%R. cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. cut (forall x y : R, (- (x - y))%R = (y - x)%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; unfold Rminus in |- *; ring ]. (* Goal: Rle (Rminus r (FtoRradix min)) (Rminus (FtoRradix max) r) *) (* Goal: Rle (Rminus (FtoRradix max) r) (Rminus (FtoRradix f) r) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) apply Rplus_le_reg_l with (r := FtoR radix min). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r r) (Rplus r (Rplus (FtoR radix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rle (Rminus (FtoRradix max) r) (Rminus (FtoRradix f) r) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) replace (r + (FtoR radix min + (max - r)))%R with (min + max)%R. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: @eq R (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rle (Rminus r (FtoRradix min)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) replace (r + r)%R with (2%nat * r)%R; auto. (* Goal: @eq R (Ropp (Rminus (FtoRradix min) r)) (Rminus r (FtoRradix min)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) simpl in |- *; ring. (* Goal: @eq R (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r (Rplus (FtoR radix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rle (Rminus (FtoRradix max) r) (Rminus (FtoRradix f) r) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) simpl in |- *; fold FtoRradix; ring. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) r *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMin_inv1 with (1 := H'); auto. Qed. Theorem ClosestMax : forall (r : R) (min max : float), isMin b radix r min -> isMax b radix r max -> (min + max <= 2%nat * r)%R -> Closest r max. (* Goal: forall (r : R) (min max : float) (_ : isMin b radix r min) (_ : isMax b radix r max) (_ : Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r)), Closest r max *) intros r min max H' H'0 H'1; split. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) intros f H'2. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) case (Rle_or_lt f r); intros H'3. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) rewrite (Rabs_right (max - r)). (* Goal: Rle (Rminus (FtoRradix max) r) (Rabs (Rminus (FtoRradix f) r)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) rewrite (Faux.Rabsolu_left1 (f - r)). (* Goal: Rle (Rminus (FtoRradix max) r) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) apply Rle_trans with (r - min)%R. (* Goal: Rle (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min)) *) (* Goal: Rle (Rminus r (FtoRradix min)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) apply Rplus_le_reg_l with (r := FtoRradix min). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) (Rplus r r) *) (* Goal: Rle (Rminus r (FtoRradix min)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) replace (r + (min + (max - r)))%R with (min + max)%R. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: @eq R (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rle (Rminus r (FtoRradix min)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) replace (r + r)%R with (2%nat * r)%R; auto. (* Goal: @eq R (Ropp (Rminus (FtoRradix min) r)) (Rminus r (FtoRradix min)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) simpl in |- *; ring. (* Goal: @eq R (Ropp (Rminus (FtoRradix min) r)) (Rminus r (FtoRradix min)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) simpl in |- *; ring. (* Goal: Rle (Rminus r (FtoRradix min)) (Ropp (Rminus (FtoRradix f) r)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) replace (r - min)%R with (- (min - r))%R. (* Goal: Rle (Ropp (Rminus r (FtoR radix f))) (Ropp (Rminus r (FtoR radix p))) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Ropp_le_contravar. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: @eq R (Ropp (Rminus (FtoRradix min) r)) (Rminus r (FtoRradix min)) *) (* Goal: Rle (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) simpl in |- *; ring. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoRradix max) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMax_inv1 with (1 := H'0); auto. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r)) *) repeat rewrite Rabs_right. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: forall (_ : Fbounded b max) (_ : and (Rle r (FtoR radix max)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix max) (FtoR radix f))), Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) intros H'4 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoRradix max) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMax_inv1 with (1 := H'0); auto. Qed. Theorem ClosestMinOrMax : MinOrMaxP b radix Closest. (* Goal: MinOrMaxP b radix Closest *) red in |- *. (* Goal: forall (r : R) (p : float) (_ : Closest r p), or (isMin b radix r p) (isMax b radix r p) *) intros r p H'. (* Goal: or (isMin b radix r p) (isMax b radix r p) *) case (Rle_or_lt p r); intros H'1. (* Goal: EvenClosest (Ropp r) (Fopp p) *) left; split; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) split; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix p) (FtoR radix f) *) intros f H'0 H'2. (* Goal: Rle (FtoR radix p) (FtoR radix f) *) apply Rplus_le_reg_l with (r := (- r)%R). cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. (* Goal: Rle (Ropp (Rminus r (FtoR radix f))) (Ropp (Rminus r (FtoR radix p))) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Ropp_le_contravar. (* Goal: Rle (Rminus r (FtoR radix p)) (Rminus r (FtoR radix f)) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) rewrite <- (Rabs_right (r - FtoR radix p)). (* Goal: Rle (Rabs (Rminus r (FtoR radix p))) (Rminus r (FtoR radix f)) *) (* Goal: Rge (Rminus r (FtoR radix p)) (IZR Z0) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) rewrite <- (Rabs_right (r - FtoR radix f)). cut (forall x y : R, Rabs (x - y) = Rabs (y - x)); [ intros Eq0; repeat rewrite (Eq0 r); clear Eq0 | intros x y; rewrite <- (Rabs_Ropp (x - y)); rewrite Ropp_minus_distr ]; auto. (* Goal: Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix f) r)) *) (* Goal: Rle (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) elim H'; auto. (* Goal: Rge (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rge (Rminus r (FtoR radix p)) (IZR Z0) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix f). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rge (Rminus r (FtoR radix p)) (IZR Z0) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix p). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) right; split; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) split; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. (* Goal: forall (f : float) (_ : Fbounded b f) (_ : Rle r (FtoR radix f)), Rle (FtoR radix p) (FtoR radix f) *) intros f H'0 H'2. (* Goal: Rle (FtoR radix p) (FtoR radix f) *) apply Rplus_le_reg_l with (r := (- r)%R). cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. (* Goal: Rle (Ropp (Rminus r (FtoR radix p))) (Ropp (Rminus r (FtoR radix f))) *) rewrite <- (Faux.Rabsolu_left1 (r - FtoR radix p)). (* Goal: Rle (Rabs (Rminus r (FtoR radix p))) (Ropp (Rminus r (FtoR radix f))) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) rewrite <- (Faux.Rabsolu_left1 (r - FtoR radix f)). cut (forall x y : R, Rabs (x - y) = Rabs (y - x)); [ intros Eq0; repeat rewrite (Eq0 r); clear Eq0 | intros x y; rewrite <- (Rabs_Ropp (x - y)); rewrite Ropp_minus_distr ]; auto. (* Goal: Rle (Rabs (Rminus (FtoR radix p) r)) (Rabs (Rminus (FtoR radix f) r)) *) (* Goal: Rle (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) elim H'; auto. (* Goal: Rle (Rminus r (FtoR radix f)) (IZR Z0) *) (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) apply Rplus_le_reg_l with (r := FtoR radix f). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (Rminus r (FtoR radix p)) (IZR Z0) *) apply Rplus_le_reg_l with (r := FtoR radix p). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. Qed. Theorem ClosestMinEq : forall (r : R) (min max p : float), isMin b radix r min -> isMax b radix r max -> (2%nat * r < min + max)%R -> Closest r p -> p = min :>R. (* Goal: forall (r : R) (min max p : float) (_ : isMin b radix r min) (_ : isMax b radix r max) (_ : Rlt (Rmult (INR (S (S O))) r) (Rplus (FtoRradix min) (FtoRradix max))) (_ : Closest r p), @eq R (FtoRradix p) (FtoRradix min) *) intros r min max p H' H'0 H'1 H'2. (* Goal: @eq R (FtoRradix p) (FtoRradix min) *) case (ClosestMinOrMax r p); auto; intros H'3. (* Goal: @eq R (FtoRradix p) (FtoRradix min) *) (* Goal: @eq R (FtoRradix p) (FtoRradix min) *) unfold FtoRradix in |- *; apply MinEq with (1 := H'3); auto. (* Goal: @eq R (FtoRradix p) (FtoRradix min) *) absurd (Rabs (max - r) <= Rabs (min - r))%R. (* Goal: not (Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rgt_not_le. (* Goal: Rgt (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite (Faux.Rabsolu_left1 (min - r)). (* Goal: Rgt (Rabs (Rminus (FtoRradix max) r)) (Ropp (Rminus (FtoRradix min) r)) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rabs_right. (* Goal: Rgt (Rminus (FtoRradix max) r) (Ropp (Rminus (FtoRradix min) r)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (- (min - r))%R with (r - min)%R; [ idtac | ring ]. (* Goal: Rgt (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) red in |- *; apply Rplus_lt_reg_l with (r := FtoRradix min). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rlt r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_lt_reg_l with (r := r). (* Goal: Rlt (Rplus r r) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (r + r)%R with (2%nat * r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rmult (INR (S (S O))) r) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (r + (min + (max - r)))%R with (min + max)%R; [ idtac | ring ]; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoRradix max) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMax_inv1 with (1 := H'0); auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) r *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMin_inv1 with (1 := H'); auto. (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) cut (Closest r max). (* Goal: forall _ : Closest r max, Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Closest r max *) intros H'4; case H'4. (* Goal: forall (_ : Fbounded b max) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r))), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Closest r max *) intros H'5 H'6; apply H'6; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: Closest r max *) apply ClosestCompatible with (1 := H'2); auto. (* Goal: @eq R (FtoR radix p) (FtoR radix max) *) (* Goal: Fbounded b max *) apply MaxEq with (1 := H'3); auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. Qed. Theorem ClosestMaxEq : forall (r : R) (min max p : float), isMin b radix r min -> isMax b radix r max -> (min + max < 2%nat * r)%R -> Closest r p -> p = max :>R. (* Goal: forall (r : R) (min max p : float) (_ : isMin b radix r min) (_ : isMax b radix r max) (_ : Rlt (Rmult (INR (S (S O))) r) (Rplus (FtoRradix min) (FtoRradix max))) (_ : Closest r p), @eq R (FtoRradix p) (FtoRradix min) *) intros r min max p H' H'0 H'1 H'2. (* Goal: @eq R (FtoRradix p) (FtoRradix min) *) case (ClosestMinOrMax r p); auto; intros H'3. (* Goal: @eq R (FtoR radix p) (FtoR radix max) *) (* Goal: Fbounded b max *) 2: unfold FtoRradix in |- *; apply MaxEq with (1 := H'3); auto. absurd (Rabs (min - r) <= Rabs (max - r))%R. (* Goal: not (Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rgt_not_le. (* Goal: Rgt (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite (Faux.Rabsolu_left1 (min - r)). (* Goal: Rgt (Rabs (Rminus (FtoRradix max) r)) (Ropp (Rminus (FtoRradix min) r)) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rabs_right. (* Goal: Rgt (Rminus (FtoRradix max) r) (Ropp (Rminus (FtoRradix min) r)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (- (min - r))%R with (r - min)%R; [ idtac | ring ]. (* Goal: Rgt (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) red in |- *; apply Rplus_lt_reg_l with (r := FtoRradix min). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rlt r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r)) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_lt_reg_l with (r := r). (* Goal: Rlt (Rplus r r) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (r + r)%R with (2%nat * r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rmult (INR (S (S O))) r) (Rplus r (Rplus (FtoRradix min) (Rminus (FtoRradix max) r))) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) replace (r + (min + (max - r)))%R with (min + max)%R; [ idtac | ring ]; auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rle_ge; apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoRradix max) *) (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMax_inv1 with (1 := H'0); auto. (* Goal: Rle (Rminus (FtoRradix min) r) (IZR Z0) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rplus_le_reg_l with (r := r). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) r *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply isMin_inv1 with (1 := H'); auto. cut (Closest r min). (* Goal: forall _ : Closest r max, Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Closest r max *) intros H'4; case H'4. (* Goal: forall (_ : Fbounded b max) (_ : forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix f) r))), Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) (* Goal: Closest r max *) intros H'5 H'6; apply H'6; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: Closest r max *) apply ClosestCompatible with (1 := H'2); auto. apply MinEq with (1 := H'3); auto. (* Goal: Closest r p *) case H'; auto. Qed. Theorem ClosestMonotone : MonotoneP radix Closest. (* Goal: UniqueP radix EvenClosest *) red in |- *; simpl in |- *. intros p q p' q' H' H'0 H'1. change (p' <= q')%R in |- *. case (Rle_or_lt p p'); intros Rl0. case (Rle_or_lt p q'); intros Rl1. apply Rplus_le_reg_l with (r := (- p)%R). cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. rewrite <- (Faux.Rabsolu_left1 (p - p')). rewrite <- (Faux.Rabsolu_left1 (p - q')). cut (forall x y : R, Rabs (x - y) = Rabs (y - x)); [ intros Eq0; repeat rewrite (Eq0 p); clear Eq0 | intros x y; rewrite <- (Rabs_Ropp (x - y)); rewrite Ropp_minus_distr ]; auto. (* Goal: Rle (FtoRradix max) (FtoRradix f) *) (* Goal: Rge (Rminus (FtoRradix f) r) (IZR Z0) *) (* Goal: Rge (Rminus (FtoRradix max) r) (IZR Z0) *) elim H'0; auto. intros H'2 H'3; apply H'3; auto. case H'1; auto. apply Rplus_le_reg_l with (r := FtoR radix q'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. apply Rplus_le_reg_l with (r := FtoR radix p'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. case (Rle_or_lt p' q); intros Rl2. apply Rplus_le_reg_l with (r := (- q)%R). cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. rewrite <- (Rabs_right (q - p')). 2: apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix p'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: rewrite Rplus_0_r; auto. rewrite <- (Rabs_right (q - q')). 2: apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix q'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: rewrite Rplus_0_r; auto. (* Goal: Rle r (FtoR radix p) *) 2: apply Rle_trans with (1 := Rlt_le _ _ Rl1); apply Rlt_le; auto. cut (forall x y : R, Rabs (x - y) = Rabs (y - x)); [ intros Eq0; repeat rewrite (Eq0 q); clear Eq0 | intros x y; rewrite <- (Rabs_Ropp (x - y)); rewrite Ropp_minus_distr ]; auto. (* Goal: Rle (Ropp (Rminus r (FtoR radix f))) (Ropp (Rminus r (FtoR radix p))) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Ropp_le_contravar. elim H'1; auto. intros H'2 H'3; apply H'3; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. case (Rle_or_lt (p - q') (p' - q)); intros Rl3. absurd (Rabs (p' - p) <= Rabs (q' - p))%R. (* Goal: not (Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rgt_not_le. rewrite (Faux.Rabsolu_left1 (q' - p)). 2: apply Rplus_le_reg_l with (r := p). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: repeat rewrite Rplus_minus; auto. (* Goal: Rle r (FtoR radix p) *) 2: rewrite Rplus_0_r; apply Rlt_le; auto. rewrite (Rabs_right (p' - p)). 2: apply Rle_ge; apply Rplus_le_reg_l with (r := p). (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: rewrite Rplus_0_r; auto. cut (forall x y : R, (- (y - x))%R = (x - y)%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. red in |- *; apply Rle_lt_trans with (1 := Rl3). replace (p' - p)%R with (p' - q + (q - p))%R. pattern (p' - q)%R at 1 in |- *; replace (p' - q)%R with (p' - q + 0)%R. apply Rplus_lt_compat_l; auto. apply Rplus_lt_reg_l with (r := p). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. ring. replace (p + (p' - p))%R with (FtoRradix p'); auto; ring. case H'0; intros H'2 H'3; apply H'3; auto. case H'1; auto. absurd (Rabs (q' - q) <= Rabs (p' - q))%R. (* Goal: not (Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r))) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) apply Rgt_not_le. rewrite (Faux.Rabsolu_left1 (q' - q)). 2: apply Rplus_le_reg_l with (r := q). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) 2: repeat rewrite Rplus_minus; auto. (* Goal: Rle r (FtoR radix p) *) 2: rewrite Rplus_0_r; apply Rlt_le; auto. 2: apply Rlt_trans with (1 := Rl1); auto. rewrite (Rabs_right (p' - q)). 2: apply Rle_ge; apply Rplus_le_reg_l with (r := q). (* Goal: Rle r (FtoR radix p) *) 2: rewrite Rplus_0_r; apply Rlt_le; auto. cut (forall x y : R, (- (y - x))%R = (x - y)%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. red in |- *; apply Rlt_trans with (1 := Rl3). replace (q - q')%R with (p - q' + (q - p))%R. pattern (p - q')%R at 1 in |- *; replace (p - q')%R with (p - q' + 0)%R. apply Rplus_lt_compat_l; auto. apply Rplus_lt_reg_l with (r := p). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. ring. replace (q + (p' - q))%R with (FtoRradix p'); auto; ring. case H'1; intros H'2 H'3; apply H'3; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. case (Rle_or_lt p q'); intros Rl1. apply Rle_trans with p; auto. (* Goal: Rle r (FtoR radix p) *) apply Rlt_le; auto. apply Rplus_le_reg_l with (r := (- q)%R). cut (forall x y : R, (- y + x)%R = (- (y - x))%R); [ intros Eq0; repeat rewrite Eq0; clear Eq0 | intros; ring ]. rewrite <- (Rabs_right (q - p')). rewrite <- (Rabs_right (q - q')). (* Goal: Rle (Ropp (Rminus r (FtoR radix f))) (Ropp (Rminus r (FtoR radix p))) *) (* Goal: or (isMin b radix r p) (isMax b radix r p) *) apply Ropp_le_contravar. cut (forall x y : R, Rabs (x - y) = Rabs (y - x)); [ intros Eq0; repeat rewrite (Eq0 q); clear Eq0 | intros x y; rewrite <- (Rabs_Ropp (x - y)); rewrite Ropp_minus_distr ]; auto. elim H'1; auto. intros H'2 H'3; apply H'3; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix q'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. apply Rlt_le; apply Rlt_trans with (1 := Rl1); auto. apply Rle_ge; apply Rplus_le_reg_l with (r := FtoR radix p'). (* Goal: Rle (Rplus r (Rminus (FtoRradix min) r)) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) repeat rewrite Rplus_minus; auto. (* Goal: Rle (FtoRradix min) (Rplus r (IZR Z0)) *) (* Goal: Rle (Rabs (Rminus (FtoRradix max) r)) (Rabs (Rminus (FtoRradix min) r)) *) rewrite Rplus_0_r; auto. apply Rlt_le; apply Rlt_trans with (1 := Rl0); auto. Qed. Theorem ClosestRoundedModeP : RoundedModeP b radix Closest. (* Goal: RoundedModeP b radix Closest *) split; try exact ClosestTotal. (* Goal: and (CompatibleP b radix Closest) (and (MinOrMaxP b radix Closest) (MonotoneP radix Closest)) *) split; try exact ClosestCompatible. (* Goal: and (MinOrMaxP b radix Closest) (MonotoneP radix Closest) *) split; try exact ClosestMinOrMax. (* Goal: MonotoneP radix Closest *) try exact ClosestMonotone. Qed. Definition EvenClosest (r : R) (p : float) := Closest r p /\ (FNeven b radix precision p \/ (forall q : float, Closest r q -> q = p :>R)). Theorem EvenClosestTotal : TotalP EvenClosest. (* Goal: TotalP EvenClosest *) red in |- *; intros r. (* Goal: @ex float (fun p : float => EvenClosest r p) *) case MinEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), @ex float (fun p : float => EvenClosest r p) *) intros min H'. (* Goal: @ex float (fun p : float => EvenClosest r p) *) case MaxEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMax b radix r x), @ex float (fun p : float => EvenClosest r p) *) intros max H'0. (* Goal: @ex float (fun p : float => EvenClosest r p) *) cut (min <= r)%R; [ intros Rl1 | apply isMin_inv1 with (1 := H'); auto ]. (* Goal: @ex float (fun p : float => EvenClosest r p) *) cut (r <= max)%R; [ intros Rl2 | apply isMax_inv1 with (1 := H'0) ]. (* Goal: @ex float (fun p : float => EvenClosest r p) *) case (Rle_or_lt (r - min) (max - r)); intros H'1. (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'1; intros H'2; auto. (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) exists min; split. (* Goal: Closest r min *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply ClosestMin with (max := max); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply Rminus_le; auto. replace (r + r - (min + max))%R with (r - min - (max - r))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply Rle_minus; auto. (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) right; intros q H'3. (* Goal: @eq R (FtoRradix q) (FtoRradix min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply ClosestMinEq with (r := r) (max := max); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) apply Rminus_lt; auto. replace (r + r - (min + max))%R with (r - min - (max - r))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) apply Rlt_minus; auto. (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case (FNevenOrFNodd b radix precision min); intros Ev0. (* Goal: EvenClosest (Ropp r) (Fopp p) *) exists min; split; auto. (* Goal: Closest r min *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply ClosestMin with (max := max); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply Rminus_le; auto. replace (r + r - (min + max))%R with (r - min - (max - r))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply Rle_minus; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) exists max; split; auto. (* Goal: Closest r max *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply ClosestMax with (min := min); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply Rminus_le; auto. replace (min + max - (r + r))%R with (max - r - (r - min))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply Rle_minus; auto. (* Goal: Rle (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min)) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) rewrite H'2; auto with real. (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case (Req_dec min max); intros H'5. (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) right; intros q H'3. (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case (ClosestMinOrMax _ _ H'3); intros isM0. (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) rewrite <- H'5. (* Goal: @eq R (FtoRradix q) (FtoRradix min) *) (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply MinEq with (1 := isM0); auto. (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply MaxEq with (1 := isM0); auto. (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) (* Goal: EvenClosest (Ropp r) (Fopp p) *) left. (* Goal: FNeven b radix precision max *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply FNevenEq with (f1 := FNSucc b radix precision min); auto. (* Goal: Fbounded b (FNSucc b radix precision min) *) (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply FcanonicBound with (radix := radix). (* Goal: Fcanonic radix b (FNSucc b radix precision q) *) (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNSuccCanonic; auto with arith. (* Goal: Closest r p *) case H'; auto. (* Goal: Fbounded b max *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) case H'0; auto. (* Goal: @eq R (FtoR radix (FNSucc b radix precision min)) (FtoR radix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply MaxEq with (b := b) (r := r); auto. (* Goal: isMax b radix r (FNSucc b radix precision q) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply MinMax; auto with arith. (* Goal: not (@eq R r (FtoR radix q)) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) Contradict H'5; auto. (* Goal: @eq R (FtoRradix min) (FtoRradix max) *) (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) fold FtoRradix in H'5; rewrite H'5 in H'2. replace (FtoRradix max) with (min + (max - min))%R; [ rewrite <- H'2 | idtac ]; ring. (* Goal: FNeven b radix precision (FNSucc b radix precision min) *) (* Goal: @ex float (fun p : float => EvenClosest r p) *) apply FNoddSuc; auto. (* Goal: Closest r p *) case H'; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) exists max; split; auto. (* Goal: Closest r max *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply ClosestMax with (min := min); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply Rminus_le; auto. replace (min + max - (r + r))%R with (max - r - (r - min))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rle (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) apply Rle_minus; auto with real. (* Goal: or (FNeven b radix precision max) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix max)) *) right; intros q H'2. (* Goal: @eq R (FtoRradix q) (FtoRradix max) *) apply ClosestMaxEq with (r := r) (min := min); auto. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rmult (INR (S (S O))) r) *) replace (2%nat * r)%R with (r + r)%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rplus (FtoRradix min) (FtoRradix max)) (Rplus r r) *) apply Rminus_lt; auto. replace (min + max - (r + r))%R with (max - r - (r - min))%R; [ idtac | simpl in |- *; ring ]. (* Goal: Rlt (Rminus (Rminus (FtoRradix max) r) (Rminus r (FtoRradix min))) (IZR Z0) *) apply Rlt_minus; auto. Qed. Theorem EvenClosestCompatible : CompatibleP b radix EvenClosest. (* Goal: UniqueP radix EvenClosest *) red in |- *; simpl in |- *. (* Goal: MinOrMaxP b radix Closest *) intros r1 r2 p q H' H'0 H'1 H'2; red in |- *. (* Goal: and (Closest r2 q) (or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q))) *) inversion H'. (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) split. (* Goal: Closest r2 q *) (* Goal: or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q)) *) apply (ClosestCompatible r1 r2 p q); auto. (* Goal: or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q)) *) case H0; intros H1. (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) (* Goal: EvenClosest (Ropp r) (Fopp p) *) left. (* Goal: FNeven b radix precision q *) (* Goal: or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q)) *) apply FNevenEq with (f1 := p); auto. (* Goal: Fbounded b p *) (* Goal: or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q)) *) case H; auto. (* Goal: or (FNeven b radix precision q) (forall (q0 : float) (_ : Closest r2 q0), @eq R (FtoRradix q0) (FtoRradix q)) *) right; intros q0 H'3. (* Goal: @eq R (FtoRradix q0) (FtoRradix q) *) unfold FtoRradix in |- *; rewrite <- H'1; auto. (* Goal: @eq R (FtoR radix q0) (FtoR radix p) *) apply H1; auto. (* Goal: Closest r1 q0 *) apply (ClosestCompatible r2 r1 q0 q0); auto. (* Goal: Fbounded b q *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'3; auto. Qed. Theorem EvenClosestMinOrMax : MinOrMaxP b radix EvenClosest. (* Goal: MinOrMaxP b radix EvenClosest *) red in |- *; intros r p H'; case (ClosestMinOrMax r p); auto. (* Goal: Closest r p *) case H'; auto. Qed. Theorem EvenClosestMonotone : MonotoneP radix EvenClosest. red in |- *; simpl in |- *; intros p q p' q' H' H'0 H'1. apply (ClosestMonotone p q); auto; case H'0; case H'1; auto. Qed. Theorem EvenClosestRoundedModeP : RoundedModeP b radix EvenClosest. (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) red in |- *; split. (* Goal: TotalP EvenClosest *) (* Goal: and (CompatibleP b radix EvenClosest) (and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest)) *) exact EvenClosestTotal. (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) split. (* Goal: CompatibleP b radix EvenClosest *) (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) exact EvenClosestCompatible. (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) split. (* Goal: MinOrMaxP b radix EvenClosest *) (* Goal: MonotoneP radix EvenClosest *) exact EvenClosestMinOrMax. (* Goal: MonotoneP radix EvenClosest *) exact EvenClosestMonotone. Qed. Theorem EvenClosestUniqueP : UniqueP radix EvenClosest. (* Goal: UniqueP radix EvenClosest *) red in |- *; simpl in |- *. (* Goal: forall (r : R) (p q : float) (_ : EvenClosest r p) (_ : EvenClosest r q), @eq R (FtoR radix p) (FtoR radix q) *) intros r p q H' H'0. (* Goal: @eq R (FtoR radix p) (FtoR radix q) *) inversion H'; inversion H'0; case H0; case H2; auto. intros H'1 H'2; case (EvenClosestMinOrMax r p); case (EvenClosestMinOrMax r q); auto. (* Goal: forall (_ : isMin b radix r q) (_ : isMin b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMin b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMin b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) intros H'3 H'4; apply (MinUniqueP b radix r); auto. (* Goal: forall (_ : isMin b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) intros H'3 H'4; case (Req_dec p q); auto; intros H'5. (* Goal: @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMin b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) Contradict H'1; auto. (* Goal: not (FNeven b radix precision p) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FnOddNEven; auto. (* Goal: FNodd b radix precision q *) (* Goal: forall (_ : isMin b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNoddEq with (f1 := FNSucc b radix precision p); auto. (* Goal: Fbounded b (FNSucc b radix precision q) *) (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FcanonicBound with (radix := radix); auto. (* Goal: Fcanonic radix b (FNSucc b radix precision q) *) (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNSuccCanonic; auto with arith. (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'4; auto. (* Goal: Fbounded b q *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'3; auto. (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply (MaxUniqueP b radix r); auto. (* Goal: isMax b radix r (FNSucc b radix precision q) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply MinMax; auto with arith. (* Goal: not (@eq R r (FtoR radix q)) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) Contradict H'5; auto. apply (RoundedProjector b radix _ (MaxRoundedModeP _ _ _ radixMoreThanOne precisionGreaterThanOne pGivesBound)); auto. (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'4; auto. (* Goal: isMax b radix (FtoR radix q) p *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) rewrite <- H'5; auto. (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNevenSuc; auto. (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'4; auto. (* Goal: forall (_ : isMin b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) intros H'3 H'4; case (Req_dec p q); auto; intros H'5. (* Goal: @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) Contradict H'2; auto. (* Goal: not (FNeven b radix precision p) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FnOddNEven; auto. (* Goal: FNodd b radix precision p *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNoddEq with (f1 := FNSucc b radix precision q); auto. (* Goal: Fbounded b (FNSucc b radix precision q) *) (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FcanonicBound with (radix := radix); auto. (* Goal: Fcanonic radix b (FNSucc b radix precision q) *) (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNSuccCanonic; auto with arith. (* Goal: Fbounded b q *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'3; auto. (* Goal: Fbounded b p *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'4; auto. (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply (MaxUniqueP b radix r); auto. (* Goal: isMax b radix r (FNSucc b radix precision q) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply MinMax; auto with arith. (* Goal: not (@eq R r (FtoR radix q)) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) Contradict H'5; auto. apply sym_eq; apply (RoundedProjector b radix _ (MaxRoundedModeP _ _ _ radixMoreThanOne precisionGreaterThanOne pGivesBound)); auto. (* Goal: Fbounded b q *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'3; auto. (* Goal: isMax b radix (FtoR radix q) p *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) rewrite <- H'5; auto. (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) apply FNevenSuc; auto. (* Goal: Fbounded b q *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) case H'3; auto. (* Goal: @eq R (FtoR radix (FNSucc b radix precision q)) (FtoR radix p) *) (* Goal: FNodd b radix precision (FNSucc b radix precision q) *) (* Goal: forall (_ : isMax b radix r q) (_ : isMax b radix r p), @eq R (FtoR radix p) (FtoR radix q) *) (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) intros H'3 H'4; apply (MaxUniqueP b radix r); auto. (* Goal: forall (_ : FNeven b radix precision q) (_ : forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p)), @eq R (FtoR radix p) (FtoR radix q) *) intros H'1 H'2; apply sym_eq; auto. Qed. Theorem ClosestSymmetric : SymmetricP Closest. (* Goal: SymmetricP EvenClosest *) red in |- *; intros r p H'; case H'; clear H'. (* Goal: and (MinOrMaxP b radix EvenClosest) (MonotoneP radix EvenClosest) *) intros H' H'0; split. (* Goal: Fbounded b (Fopp f) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix (Fopp f)) r)) (Rabs (Rminus (FtoRradix f) (Ropp r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) apply oppBounded; auto. (* Goal: forall (f : float) (_ : Fbounded b f), Rle (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoRradix f) (Ropp r))) *) intros f H'1. (* Goal: Rle (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) (Rabs (Rminus (FtoRradix f) (Ropp r))) *) replace (Rabs (Fopp p - - r)) with (Rabs (p - r)). (* Goal: Rle (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix f) (Ropp r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) replace (Rabs (f - - r)) with (Rabs (Fopp f - r)). (* Goal: @eq R (FtoRradix (Fopp q)) (FtoRradix p) *) apply H'0; auto. (* Goal: Fbounded b (Fopp f) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix (Fopp f)) r)) (Rabs (Rminus (FtoRradix f) (Ropp r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) apply oppBounded; auto. (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: @eq R (Rabs (Rminus (Ropp (FtoR radix f)) r)) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) pattern r at 1 in |- *; replace r with (- - r)%R; [ idtac | ring ]. replace (- FtoR radix f - - - r)%R with (- (FtoR radix f - - r))%R; [ idtac | ring ]. (* Goal: @eq R (Rabs (Ropp (Rminus (FtoR radix f) (Ropp r)))) (Rabs (Rminus (FtoR radix f) (Ropp r))) *) (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) apply Rabs_Ropp; auto. (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) unfold FtoRradix in |- *; rewrite Fopp_correct. replace (- FtoR radix p - - r)%R with (- (FtoR radix p - r))%R; [ idtac | ring ]. (* Goal: @eq R (Rabs (Rminus (FtoR radix p) r)) (Rabs (Ropp (Rminus (FtoR radix p) r))) *) apply sym_eq; apply Rabs_Ropp. Qed. Theorem EvenClosestSymmetric : SymmetricP EvenClosest. (* Goal: SymmetricP EvenClosest *) red in |- *; intros r p H'; case H'; clear H'. (* Goal: forall (_ : Closest r p) (_ : or (FNeven b radix precision p) (forall (q : float) (_ : Closest r q), @eq R (FtoRradix q) (FtoRradix p))), EvenClosest (Ropp r) (Fopp p) *) intros H' H'0; case H'0; clear H'0; intros H'0. (* Goal: EvenClosest (Ropp r) (Fopp p) *) split; auto. (* Goal: Closest (Ropp r) (Fopp p) *) (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) apply (ClosestSymmetric r p); auto. (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) (* Goal: EvenClosest (Ropp r) (Fopp p) *) left. (* Goal: FNeven b radix precision (Fopp p) *) (* Goal: EvenClosest (Ropp r) (Fopp p) *) apply FNevenFop; auto. (* Goal: EvenClosest (Ropp r) (Fopp p) *) split; auto. (* Goal: Closest (Ropp r) (Fopp p) *) (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) apply (ClosestSymmetric r p); auto. (* Goal: or (FNeven b radix precision (Fopp p)) (forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p))) *) right. (* Goal: forall (q : float) (_ : Closest (Ropp r) q), @eq R (FtoRradix q) (FtoRradix (Fopp p)) *) intros q H'1. (* Goal: @eq R (FtoRradix q) (FtoRradix (Fopp p)) *) cut (Fopp q = p :>R). (* Goal: @eq R (Rabs (Rminus (FtoRradix p) r)) (Rabs (Rminus (FtoRradix (Fopp p)) (Ropp r))) *) intros H'2; unfold FtoRradix in |- *; rewrite Fopp_correct. (* Goal: @eq R (FtoR radix q) (Ropp (FtoR radix p)) *) (* Goal: @eq R (FtoRradix (Fopp q)) (FtoRradix p) *) unfold FtoRradix in H'2; rewrite <- H'2. rewrite Fopp_correct; ring. (* Goal: @eq R (FtoRradix (Fopp q)) (FtoRradix p) *) apply H'0; auto. (* Goal: Closest r (Fopp q) *) replace r with (- - r)%R; [ idtac | ring ]. (* Goal: Closest (Ropp (Ropp r)) (Fopp q) *) apply (ClosestSymmetric (- r)%R q); auto. Qed. End Fclosest. Hint Resolve ClosestTotal ClosestCompatible ClosestMin ClosestMax ClosestMinOrMax ClosestMonotone ClosestRoundedModeP EvenClosestTotal EvenClosestCompatible EvenClosestMinOrMax EvenClosestMonotone EvenClosestRoundedModeP FnOddNEven EvenClosestUniqueP ClosestSymmetric EvenClosestSymmetric: float.
(**************************************************************************** IEEE754 : Fround Laurent Thery ******************************************************************************) Require Export Fprop. Require Export Fodd. Section FRound. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Hypothesis precisionGreaterThanOne : 1 < precision. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition TotalP (P : R -> float -> Prop) := forall r : R, exists p : float, P r p. Definition UniqueP (P : R -> float -> Prop) := forall (r : R) (p q : float), P r p -> P r q -> p = q :>R. Definition CompatibleP (P : R -> float -> Prop) := forall (r1 r2 : R) (p q : float), P r1 p -> r1 = r2 -> p = q :>R -> Fbounded b q -> P r2 q. Definition MinOrMaxP (P : R -> float -> Prop) := forall (r : R) (p : float), P r p -> isMin b radix r p \/ isMax b radix r p. Definition RoundedModeP (P : R -> float -> Prop) := TotalP P /\ CompatibleP P /\ MinOrMaxP P /\ MonotoneP radix P. Theorem RoundedModeP_inv1 : forall P, RoundedModeP P -> TotalP P. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P), TotalP P *) intros P H; case H; auto. Qed. Theorem RoundedModeP_inv2 : forall P, RoundedModeP P -> CompatibleP P. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P), CompatibleP P *) intros P H; Casec H; intros H H1; Casec H1; auto. Qed. Theorem RoundedModeP_inv3 : forall P, RoundedModeP P -> MinOrMaxP P. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P), MonotoneP radix P *) intros P H; Casec H; intros H H1; Casec H1; intros H1 H2; Casec H2; auto. Qed. Theorem RoundedModeP_inv4 : forall P, RoundedModeP P -> MonotoneP radix P. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P), MonotoneP radix P *) intros P H; Casec H; intros H H1; Casec H1; intros H1 H2; Casec H2; auto. Qed. Hint Resolve RoundedModeP_inv1 RoundedModeP_inv2 RoundedModeP_inv3 RoundedModeP_inv4: inv. Theorem RoundedProjector : forall P, RoundedModeP P -> ProjectorP b radix P. intros P H'; red in |- *; simpl in |- *. intros p q H'0 H'1. red in H'. elim H'; intros H'2 H'3; elim H'3; intros H'4 H'5; elim H'5; intros H'6 H'7; case (H'6 p q); clear H'5 H'3 H'; auto. intros H'; apply (ProjectMin b radix p); auto. intros H'; apply (ProjectMax b radix p); auto. Qed. Theorem MinCompatible : CompatibleP (isMin b radix). (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r1 r2 : R) (p q : float) (_ : isMax b radix r1 p) (_ : @eq R r1 r2) (_ : @eq R (FtoRradix p) (FtoRradix q)) (_ : Fbounded b q), isMax b radix r2 q *) intros r1 r2 p q H' H'0 H'1 H'2; split; auto. (* Goal: and (Rle r2 (FtoR radix q)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix q) (FtoR radix f)) *) rewrite <- H'0; unfold FtoRradix in H'1; rewrite <- H'1; case H'; auto. Qed. Theorem MinRoundedModeP : RoundedModeP (isMin b radix). (* Goal: UniqueP ToInfinityP *) split; try red in |- *. (* Goal: forall r : R, @ex float (fun p : float => isMin b radix r p) *) (* Goal: and (CompatibleP (isMin b radix)) (and (MinOrMaxP (isMin b radix)) (MonotoneP radix (isMin b radix))) *) intros r; apply MinEx with (precision := precision); auto with arith. (* Goal: and (CompatibleP (isMin b radix)) (and (MinOrMaxP (isMin b radix)) (MonotoneP radix (isMin b radix))) *) split; try exact MinCompatible. (* Goal: and (MinOrMaxP (isMin b radix)) (MonotoneP radix (isMin b radix)) *) split; try apply MonotoneMin; red in |- *; auto. Qed. Theorem MaxCompatible : CompatibleP (isMax b radix). (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r1 r2 : R) (p q : float) (_ : isMax b radix r1 p) (_ : @eq R r1 r2) (_ : @eq R (FtoRradix p) (FtoRradix q)) (_ : Fbounded b q), isMax b radix r2 q *) intros r1 r2 p q H' H'0 H'1 H'2; split; auto. (* Goal: and (Rle r2 (FtoR radix q)) (forall (f : float) (_ : Fbounded b f) (_ : Rle r2 (FtoR radix f)), Rle (FtoR radix q) (FtoR radix f)) *) rewrite <- H'0; unfold FtoRradix in H'1; rewrite <- H'1; case H'; auto. Qed. Theorem MaxRoundedModeP : RoundedModeP (isMax b radix). (* Goal: UniqueP ToInfinityP *) split; try red in |- *. (* Goal: forall r : R, @ex float (fun p : float => isMax b radix r p) *) (* Goal: and (CompatibleP (isMax b radix)) (and (MinOrMaxP (isMax b radix)) (MonotoneP radix (isMax b radix))) *) intros r; apply MaxEx with (precision := precision); auto with arith. (* Goal: and (CompatibleP (isMax b radix)) (and (MinOrMaxP (isMax b radix)) (MonotoneP radix (isMax b radix))) *) split; try exact MaxCompatible. (* Goal: and (MinOrMaxP (isMax b radix)) (MonotoneP radix (isMax b radix)) *) split; try apply MonotoneMax; red in |- *; auto. Qed. Definition ToZeroP (r : R) (p : float) := (0 <= r)%R /\ isMin b radix r p \/ (r <= 0)%R /\ isMax b radix r p. Theorem ToZeroTotal : TotalP ToZeroP. (* Goal: TotalP ToInfinityP *) red in |- *; intros r; case (Rle_or_lt r 0); intros H1. (* Goal: @ex float (fun p : float => ToInfinityP r p) *) case MaxEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), @ex float (fun p : float => ToInfinityP r p) *) (* Goal: @ex float (fun p : float => ToInfinityP r p) *) intros x H'; exists x; red in |- *; auto. (* Goal: @ex float (fun p : float => ToInfinityP r p) *) (* Goal: @ex float (fun p : float => ToInfinityP r p) *) case MinEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), @ex float (fun p : float => ToZeroP r p) *) intros x H'; exists x; red in |- *; left; split; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. Qed. Theorem ToZeroCompatible : CompatibleP ToZeroP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r1 r2 : R) (p q : float) (_ : ToInfinityP r1 p) (_ : @eq R r1 r2) (_ : @eq R (FtoRradix p) (FtoRradix q)) (_ : Fbounded b q), ToInfinityP r2 q *) intros r1 r2 p q H'; case H'. intros H'0 H'1 H'2; left; split; try apply MinCompatible with (p := p) (r1 := r1); try rewrite <- H'1; auto; case H'0; auto. intros H'0 H'1 H'2; right; split; try apply MaxCompatible with (p := p) (r1 := r1); try rewrite <- H'1; auto; case H'0; auto. Qed. Theorem ToZeroMinOrMax : MinOrMaxP ToZeroP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p : float) (_ : ToInfinityP r p), or (isMin b radix r p) (isMax b radix r p) *) intros r p H'; case H'; clear H'; intros H'; case H'; auto. Qed. Theorem ToZeroMonotone : MonotoneP radix ToZeroP. (* Goal: UniqueP ToInfinityP *) red in |- *. cut (FtoR radix (Fzero (- dExp b)) = 0%R); [ intros Eq0 | unfold FtoR in |- *; simpl in |- * ]; auto with real. (* Goal: forall (p q : R) (p' q' : float) (_ : Rlt p q) (_ : ToZeroP p p') (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) simpl in |- *; intros p q p' q' H' H'0; case H'0; clear H'0. (* Goal: forall (_ : and (Rle (IZR Z0) p) (isMin b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'0; elim H'0; intros H'1 H'2; clear H'0; intros H'0. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) case H'0; intros H'3; elim H'3; clear H'3; auto. (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'3 H'4. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) apply (MonotoneMin b radix) with (p := p) (q := q); auto. (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'3 H'4. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) apply Rle_trans with p; [ apply isMin_inv1 with (1 := H'2); auto | idtac ]. (* Goal: Rle p (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) apply Rle_trans with q; [ idtac | apply isMax_inv1 with (1 := H'4) ]; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'0; elim H'0; intros H'1 H'2; clear H'0. intros H'0; case H'0; clear H'0; intros H'0; case H'0; intros H'3 H'4; clear H'0. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) apply Rle_trans with (FtoRradix (Fzero (- dExp b))); auto. (* Goal: Rle (FtoR radix p') (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) elim H'2. (* Goal: forall (_ : Fbounded b q') (_ : and (Rle (FtoR radix q') q) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) q), Rle (FtoR radix f) (FtoR radix q'))), Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) intros H'0 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) repeat split; simpl in |- *; auto with zarith. (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) rewrite Eq0; auto. (* Goal: Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) elim H'4. (* Goal: forall (_ : Fbounded b q') (_ : and (Rle (FtoR radix q') q) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) q), Rle (FtoR radix f) (FtoR radix q'))), Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) intros H'0 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) repeat split; simpl in |- *; auto with zarith. (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) rewrite Eq0; auto. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) apply (MonotoneMax b radix) with (p := p) (q := q); auto. Qed. Theorem ToZeroRoundedModeP : RoundedModeP ToZeroP. (* Goal: RoundedModeP ToInfinityP *) repeat split. (* Goal: TotalP ToZeroP *) (* Goal: CompatibleP ToZeroP *) (* Goal: MinOrMaxP ToZeroP *) (* Goal: MonotoneP radix ToZeroP *) try exact ToZeroTotal. (* Goal: CompatibleP ToZeroP *) (* Goal: MinOrMaxP ToZeroP *) (* Goal: MonotoneP radix ToZeroP *) try exact ToZeroCompatible. (* Goal: MinOrMaxP ToZeroP *) (* Goal: MonotoneP radix ToZeroP *) try exact ToZeroMinOrMax. (* Goal: MonotoneP radix ToZeroP *) try exact ToZeroMonotone. Qed. Definition ToInfinityP (r : R) (p : float) := (r <= 0)%R /\ isMin b radix r p \/ (0 <= r)%R /\ isMax b radix r p. Theorem ToInfinityTotal : TotalP ToInfinityP. (* Goal: TotalP ToInfinityP *) red in |- *; intros r; case (Rle_or_lt r 0); intros H1. (* Goal: @ex float (fun p : float => ToInfinityP r p) *) (* Goal: @ex float (fun p : float => ToInfinityP r p) *) case MinEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMin b radix r x), @ex float (fun p : float => ToInfinityP r p) *) (* Goal: @ex float (fun p : float => ToInfinityP r p) *) intros x H'; exists x; red in |- *; auto. (* Goal: @ex float (fun p : float => ToInfinityP r p) *) case MaxEx with (r := r) (3 := pGivesBound); auto with arith. (* Goal: forall (x : float) (_ : isMax b radix r x), @ex float (fun p : float => ToInfinityP r p) *) intros x H'; exists x; red in |- *; right; split; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. Qed. Theorem ToInfinityCompatible : CompatibleP ToInfinityP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r1 r2 : R) (p q : float) (_ : ToInfinityP r1 p) (_ : @eq R r1 r2) (_ : @eq R (FtoRradix p) (FtoRradix q)) (_ : Fbounded b q), ToInfinityP r2 q *) intros r1 r2 p q H'; case H'. intros H'0 H'1 H'2; left; split; try apply MinCompatible with (p := p) (r1 := r1); try rewrite <- H'1; case H'0; auto. intros H'0 H'1 H'2; right; split; try apply MaxCompatible with (p := p) (r1 := r1); try rewrite <- H'1; case H'0; auto. Qed. Theorem ToInfinityMinOrMax : MinOrMaxP ToInfinityP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p : float) (_ : ToInfinityP r p), or (isMin b radix r p) (isMax b radix r p) *) intros r p H'; case H'; clear H'; intros H'; case H'; auto. Qed. Theorem ToInfinityMonotone : MonotoneP radix ToInfinityP. red in |- *; simpl in |- *. cut (FtoR radix (Fzero (- dExp b)) = 0%R); [ intros Eq0 | unfold FtoR in |- *; simpl in |- * ]; auto with real. intros p q p' q' H' H'0; case H'0; clear H'0. (* Goal: forall (_ : and (Rle (IZR Z0) p) (isMin b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'0; elim H'0; intros H'1 H'2; clear H'0; intros H'0. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) case H'0; intros H'3; elim H'3; clear H'3; auto. (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'3 H'4. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) apply (MonotoneMin b radix) with (p := p) (q := q); auto. (* Goal: forall (_ : Rle q (IZR Z0)) (_ : isMax b radix q q'), Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'3 H'4. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) apply Rle_trans with p; [ apply isMin_inv1 with (1 := H'2); auto | idtac ]. apply Rle_trans with q; [ auto | apply isMax_inv1 with (1 := H'4) ]; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. (* Goal: forall (_ : and (Rle p (IZR Z0)) (isMax b radix p p')) (_ : ToZeroP q q'), Rle (FtoR radix p') (FtoR radix q') *) intros H'0; elim H'0; intros H'1 H'2; clear H'0. intros H'0; case H'0; clear H'0; intros H'0; case H'0; intros H'3 H'4; clear H'0. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) 2: apply (MonotoneMax b radix) with (p := p) (q := q); auto. (* Goal: Rle (FtoR radix p') (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) apply Rle_trans with (FtoRradix (Fzero (- dExp b))); auto. (* Goal: Rle (FtoR radix p') (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) *) (* Goal: Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) elim H'2. (* Goal: forall (_ : Fbounded b q') (_ : and (Rle (FtoR radix q') q) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) q), Rle (FtoR radix f) (FtoR radix q'))), Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) intros H'0 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) repeat split; simpl in |- *; auto with zarith. apply Rle_trans with q; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) rewrite Eq0; auto. (* Goal: Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) elim H'4. (* Goal: forall (_ : Fbounded b q') (_ : and (Rle (FtoR radix q') q) (forall (f : float) (_ : Fbounded b f) (_ : Rle (FtoR radix f) q), Rle (FtoR radix f) (FtoR radix q'))), Rle (FtoRradix (Fzero (Z.opp (Z.of_N (dExp b))))) (FtoR radix q') *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) intros H'0 H'5; elim H'5; intros H'6 H'7; apply H'7; clear H'5; auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) repeat split; simpl in |- *; auto with zarith. apply Rle_trans with p; auto. (* Goal: Rle (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: Rle (FtoR radix p') (FtoR radix q') *) rewrite Eq0; auto. (* Goal: Rle (IZR Z0) r *) apply Rlt_le; auto. Qed. Theorem ToInfinityRoundedModeP : RoundedModeP ToInfinityP. (* Goal: RoundedModeP ToInfinityP *) repeat split. (* Goal: TotalP ToInfinityP *) (* Goal: CompatibleP ToInfinityP *) (* Goal: MinOrMaxP ToInfinityP *) (* Goal: MonotoneP radix ToInfinityP *) try exact ToInfinityTotal. (* Goal: CompatibleP ToInfinityP *) (* Goal: MinOrMaxP ToInfinityP *) (* Goal: MonotoneP radix ToInfinityP *) try exact ToInfinityCompatible. (* Goal: MinOrMaxP ToInfinityP *) (* Goal: MonotoneP radix ToInfinityP *) try exact ToInfinityMinOrMax. (* Goal: MonotoneP radix ToInfinityP *) try exact ToInfinityMonotone. Qed. Theorem MinUniqueP : UniqueP (isMin b radix). (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p q : float) (_ : ToInfinityP r p) (_ : ToInfinityP r q), @eq R (FtoRradix p) (FtoRradix q) *) intros r p q H' H'0. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in |- *; apply MinEq with (1 := H'); auto. Qed. Theorem MaxUniqueP : UniqueP (isMax b radix). (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p q : float) (_ : ToInfinityP r p) (_ : ToInfinityP r q), @eq R (FtoRradix p) (FtoRradix q) *) intros r p q H' H'0. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in |- *; apply MaxEq with (1 := H'); auto. Qed. Theorem ToZeroUniqueP : UniqueP ToZeroP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p q : float) (_ : ToInfinityP r p) (_ : ToInfinityP r q), @eq R (FtoRradix p) (FtoRradix q) *) intros r p q H' H'0. inversion H'; inversion H'0; elim H0; elim H; clear H0 H; intros H'1 H'2 H'3 H'4. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply (MinUniqueP r); auto. cut (r = Fzero (- dExp b) :>R); [ intros Eq0 | apply Rle_antisym; unfold FtoRradix, Fzero, FtoR in |- *; simpl in |- * ]; try rewrite Rmult_0_l; auto with real. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply trans_eq with (FtoRradix (Fzero (- dExp b))). apply sym_eq; unfold FtoRradix in |- *; apply (RoundedProjector _ ToZeroRoundedModeP); auto with float. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. unfold FtoRradix in |- *; apply (RoundedProjector _ ToZeroRoundedModeP); auto with float. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. cut (r = Fzero (- dExp b) :>R); [ intros Eq0 | apply Rle_antisym; unfold FtoRradix, Fzero, FtoR in |- *; simpl in |- * ]; try rewrite Rmult_0_l; auto with real. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply trans_eq with (FtoRradix (Fzero (- dExp b))). apply sym_eq; unfold FtoRradix in |- *; apply (RoundedProjector _ ToZeroRoundedModeP); auto with float. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. unfold FtoRradix in |- *; apply (RoundedProjector _ ToZeroRoundedModeP); auto with float. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply (MaxUniqueP r); auto. Qed. Theorem ToInfinityUniqueP : UniqueP ToInfinityP. (* Goal: UniqueP ToInfinityP *) red in |- *. (* Goal: forall (r : R) (p q : float) (_ : ToInfinityP r p) (_ : ToInfinityP r q), @eq R (FtoRradix p) (FtoRradix q) *) intros r p q H' H'0. inversion H'; inversion H'0; elim H0; elim H; clear H0 H; intros H'1 H'2 H'3 H'4. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply (MinUniqueP r); auto. cut (r = Fzero (- dExp b) :>R); [ intros Eq0 | apply Rle_antisym; unfold FtoRradix, Fzero, FtoR in |- *; simpl in |- * ]; try rewrite Rmult_0_l; auto with real. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply trans_eq with (FtoRradix (Fzero (- dExp b))). apply sym_eq; unfold FtoRradix in |- *; apply (RoundedProjector _ ToInfinityRoundedModeP); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply FboundedFzero; auto. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. unfold FtoRradix in |- *; apply (RoundedProjector _ ToInfinityRoundedModeP); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply FboundedFzero; auto. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. cut (r = Fzero (- dExp b) :>R); [ intros Eq0 | apply Rle_antisym; unfold FtoRradix, Fzero, FtoR in |- *; simpl in |- * ]; try rewrite Rmult_0_l; auto with float. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply trans_eq with (FtoRradix (Fzero (- dExp b))). apply sym_eq; unfold FtoRradix in |- *; apply (RoundedProjector _ ToInfinityRoundedModeP); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply FboundedFzero; auto. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. unfold FtoRradix in |- *; apply (RoundedProjector _ ToInfinityRoundedModeP); auto. (* Goal: Fbounded b (Fzero (Z.opp (Z.of_N (dExp b)))) *) (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply FboundedFzero; auto. (* Goal: ToInfinityP (FtoR radix (Fzero (Z.opp (Z.of_N (dExp b))))) q *) (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) unfold FtoRradix in Eq0; rewrite <- Eq0; auto. (* Goal: @eq R (FtoRradix p) (FtoRradix q) *) apply (MaxUniqueP r); auto. Qed. Theorem MinOrMaxRep : forall P, MinOrMaxP P -> forall p q : float, P p q -> exists m : Z, q = Float m (Fexp p) :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : MinOrMaxP P) (p q : float) (_ : P (FtoRradix p) q), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) intros P H' p q H'0; case (H' p q); auto; intros H'1. (* Goal: @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) (* Goal: @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) apply FminRep with (3 := pGivesBound); auto with arith. (* Goal: @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) apply FmaxRep with (3 := pGivesBound); auto with arith. Qed. Theorem RoundedModeRep : forall P, RoundedModeP P -> forall p q : float, P p q -> exists m : Z, q = Float m (Fexp p) :>R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P) (p q : float) (_ : P (FtoRradix p) q), @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) intros P H' p q H'0. (* Goal: @ex Z (fun m : Z => @eq R (FtoRradix q) (FtoRradix (Float m (Fexp p)))) *) apply MinOrMaxRep with (P := P); auto with inv. Qed. Definition SymmetricP (P : R -> float -> Prop) := forall (r : R) (p : float), P r p -> P (- r)%R (Fopp p). Theorem ToZeroSymmetric : SymmetricP ToZeroP. red in |- *; intros r p H'; case H'; clear H'; intros H'; case H'; intros H'1 H'2. (* Goal: ToInfinityP (Ropp r) (Fopp p) *) (* Goal: ToInfinityP (Ropp r) (Fopp p) *) right; split; auto. (* Goal: Rle (Ropp r) (IZR Z0) *) (* Goal: isMin b radix (Ropp r) (Fopp p) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMax b radix (Ropp r) (Fopp p) *) (* Goal: ToInfinityP (Ropp r) (Fopp p) *) apply MinOppMax; auto. (* Goal: ToInfinityP (Ropp r) (Fopp p) *) left; split; auto. (* Goal: Rle (Ropp r) (IZR Z0) *) (* Goal: isMin b radix (Ropp r) (Fopp p) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMin b radix (Ropp r) (Fopp p) *) apply MaxOppMin; auto. Qed. Theorem ToInfinitySymmetric : SymmetricP ToInfinityP. red in |- *; intros r p H'; case H'; clear H'; intros H'; case H'; intros H'1 H'2. (* Goal: ToInfinityP (Ropp r) (Fopp p) *) (* Goal: ToInfinityP (Ropp r) (Fopp p) *) right; split; auto. (* Goal: Rle (Ropp r) (IZR Z0) *) (* Goal: isMin b radix (Ropp r) (Fopp p) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMax b radix (Ropp r) (Fopp p) *) (* Goal: ToInfinityP (Ropp r) (Fopp p) *) apply MinOppMax; auto. (* Goal: ToInfinityP (Ropp r) (Fopp p) *) left; split; auto. (* Goal: Rle (Ropp r) (IZR Z0) *) (* Goal: isMin b radix (Ropp r) (Fopp p) *) replace 0%R with (-0)%R; auto with real. (* Goal: isMin b radix (Ropp r) (Fopp p) *) apply MaxOppMin; auto. Qed. Theorem ScalableRoundedModeP : forall P (f s t : float), RoundedModeP P -> Fbounded b f -> P (radix * f)%R s -> P (s / radix)%R t -> f = t :>R. intros P f s t HP Ff H1 H2. cut (ProjectorP b radix P); [ unfold ProjectorP in |- *; intros HP2 | apply RoundedProjector; auto ]. cut (FtoR radix (Float (Fnum f) (Zsucc (Fexp f))) = (radix * FtoR radix f)%R); [ intros V | idtac]. 2: unfold FtoR, Zsucc in |- *; simpl in |- *; ring_simplify. 2: rewrite powerRZ_add; [ simpl in |- *; ring | auto with zarith real ]. unfold FtoRradix in |- *; apply HP2; auto. replace (FtoR radix f) with (FtoR radix s / radix)%R; auto. replace (FtoR radix s) with (radix * FtoR radix f)%R; [ unfold Rdiv in |- * | rewrite <- V ]. rewrite Rmult_comm; rewrite <- Rmult_assoc; rewrite Rinv_l; auto with real zarith. apply HP2; auto with float. repeat (split; simpl in |- *; auto with zarith float). rewrite V; auto. Qed. Theorem RoundLessThanIsMax : forall P, RoundedModeP P -> forall (p m : float) (x : R), P x p -> isMax b radix x m -> (p <= m)%R. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P) (p m : float) (x : R) (_ : P x p) (_ : isMax b radix x m), Rle (FtoRradix p) (FtoRradix m) *) intros. (* Goal: forall (P : forall (_ : R) (_ : float), Prop) (_ : RoundedModeP P) (p m : float) (x : R) (_ : P x p) (_ : isMax b radix x m), Rle (FtoRradix p) (FtoRradix m) *) elim H; intros. (* Goal: Rle (FtoRradix p) (FtoRradix m) *) elim H3; intros H' H'0; clear H3. (* Goal: Rle (FtoRradix p) (FtoRradix m) *) elim H'0; intros; clear H'0. (* Goal: Rle (FtoRradix p) (FtoRradix m) *) case (H3 x p); auto. (* Goal: forall _ : isMin b radix x p, Rle (FtoRradix p) (FtoRradix m) *) (* Goal: forall _ : isMax b radix x p, Rle (FtoRradix p) (FtoRradix m) *) intros; apply Rle_trans with x; auto. (* Goal: Rle (FtoRradix p) x *) (* Goal: Rle x (FtoRradix m) *) (* Goal: forall _ : isMax b radix x p, Rle (FtoRradix p) (FtoRradix m) *) elim H5; intros; elim H7; intros; auto with real. (* Goal: Rle x (FtoRradix m) *) (* Goal: forall _ : isMax b radix x p, Rle (FtoRradix p) (FtoRradix m) *) elim H1; intros; elim H7; intros; auto with real. (* Goal: forall _ : isMax b radix x p, Rle (FtoRradix p) (FtoRradix m) *) intros; replace (FtoRradix p) with (FtoRradix m); auto with real. (* Goal: @eq R (FtoRradix m) (FtoRradix p) *) unfold FtoRradix in |- *; apply MaxEq with b x; auto. Qed. End FRound. Hint Resolve RoundedProjector MinCompatible MinRoundedModeP MaxCompatible MaxRoundedModeP ToZeroTotal ToZeroCompatible ToZeroMinOrMax ToZeroMonotone ToZeroRoundedModeP ToInfinityTotal ToInfinityCompatible ToInfinityMinOrMax ToInfinityMonotone ToInfinityRoundedModeP MinUniqueP MaxUniqueP ToZeroUniqueP ToInfinityUniqueP FnOddNEven ToZeroSymmetric ToInfinitySymmetric: float. Hint Resolve RoundedModeP_inv1 RoundedModeP_inv2 RoundedModeP_inv3 RoundedModeP_inv4: inv.
(**************************************************************************** IEEE754 : FPred Laurent Thery ******************************************************************************) Require Export FSucc. Section pred. Variable b : Fbound. Variable radix : Z. Variable precision : nat. Let FtoRradix := FtoR radix. Local Coercion FtoRradix : float >-> R. Hypothesis radixMoreThanOne : (1 < radix)%Z. Hypothesis precisionNotZero : precision <> 0. Hypothesis pGivesBound : Zpos (vNum b) = Zpower_nat radix precision. Definition FPred (x : float) := match Z_eq_bool (Fnum x) (- pPred (vNum b)) with | true => Float (- nNormMin radix precision) (Zsucc (Fexp x)) | false => match Z_eq_bool (Fnum x) (nNormMin radix precision) with | true => match Z_eq_bool (Fexp x) (- dExp b) with | true => Float (Zpred (Fnum x)) (Fexp x) | false => Float (pPred (vNum b)) (Zpred (Fexp x)) end | false => Float (Zpred (Fnum x)) (Fexp x) end end. Theorem FPredSimpl1 : forall x : float, Fnum x = (- pPred (vNum b))%Z -> FPred x = Float (- nNormMin radix precision) (Zsucc (Fexp x)). (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (FPred x) (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) *) intros x H'; unfold FPred in |- *. generalize (Z_eq_bool_correct (Fnum x) (- pPred (vNum b))); case (Z_eq_bool (Fnum x) (- pPred (vNum b))); auto. (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) *) intros H'0; Contradict H'0; auto. Qed. Theorem FPredSimpl2 : forall x : float, Fnum x = nNormMin radix precision -> Fexp x <> (- dExp b)%Z -> FPred x = Float (pPred (vNum b)) (Zpred (Fexp x)). (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))), @eq float (FPred x) (Float (Z.pred (Fnum x)) (Fexp x)) *) intros x H' H'0; unfold FPred in |- *. generalize (Z_eq_bool_correct (Fnum x) (- pPred (vNum b))); case (Z_eq_bool (Fnum x) (- pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Fnum x) (Z.opp (pPred (vNum b))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) intros H'1; absurd (0%nat < Fnum x)%Z; auto with zarith arith. apply Zle_not_lt; rewrite H'1; replace (Z_of_nat 0) with (- (0))%Z; [ apply Zle_Zopp | simpl in |- *; auto ]. (* Goal: Z.le Z0 (pPred (vNum b)) *) (* Goal: Z.lt (Z.of_nat O) (Fnum x) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) unfold pPred in |- *; apply Zle_Zpred; red in |- *; simpl in |- *; auto. (* Goal: Z.lt (Z.of_nat O) (Fnum x) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) rewrite H'. (* Goal: Z.lt (Z.of_nat O) (nNormMin radix precision) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) apply nNormPos; auto with zarith. intros H'1; generalize (Z_eq_bool_correct (Fnum x) (nNormMin radix precision)); case (Z_eq_bool (Fnum x) (nNormMin radix precision)). intros H'2; generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); auto. (* Goal: forall _ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))), @eq float (Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) (* Goal: forall _ : not (@eq Z (Fnum x) (nNormMin radix precision)), @eq float (Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) intros H'3; Contradict H'0; auto. (* Goal: forall _ : not (@eq Z (Fnum x) (nNormMin radix precision)), @eq float (Float (Z.pred (Fnum x)) (Fexp x)) (Float (pPred (vNum b)) (Z.pred (Fexp x))) *) intros H'2; Contradict H'2; auto. Qed. Theorem FPredSimpl3 : FPred (Float (nNormMin radix precision) (- dExp b)) = Float (Zpred (nNormMin radix precision)) (- dExp b). (* Goal: @eq float (FPred (Float (nNormMin radix precision) (Z.opp (Z.of_N (dExp b))))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) unfold FPred in |- *; simpl in |- *. generalize (Z_eq_bool_correct (nNormMin radix precision) (- pPred (vNum b))); case (Z_eq_bool (nNormMin radix precision) (- pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.opp (Z.of_N (dExp b))))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))) else Float (pPred (vNum b)) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) intros H'0; absurd (0 < pPred (vNum b))%Z; auto with zarith arith. (* Goal: not (Z.lt Z0 (pPred (vNum b))) *) (* Goal: Z.lt Z0 (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))) else Float (pPred (vNum b)) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) rewrite <- (Zopp_involutive (pPred (vNum b))); rewrite <- H'0. apply Zle_not_lt; replace 0%Z with (- (0))%Z; [ apply Zle_Zopp | simpl in |- *; auto ]. (* Goal: Z.le Z0 (nNormMin radix precision) *) (* Goal: Z.lt Z0 (pPred (vNum b)) *) (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))) else Float (pPred (vNum b)) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) apply Zlt_le_weak; apply nNormPos; auto with float zarith. unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *; auto with float zarith. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.opp (Z.of_N (dExp b))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b))) else Float (pPred (vNum b)) (Z.pred (Z.opp (Z.of_N (dExp b)))) else Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) simpl in |- *; apply vNumbMoreThanOne with (3 := pGivesBound); auto. intros H'; generalize (Z_eq_bool_correct (nNormMin radix precision) (nNormMin radix precision)); case (Z_eq_bool (nNormMin radix precision) (nNormMin radix precision)). intros H'0; generalize (Z_eq_bool_correct (- dExp b) (- dExp b)); case (Z_eq_bool (- dExp b) (- dExp b)); auto. (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (nNormMin radix precision)), @eq float (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; Contradict H'1; auto. (* Goal: forall _ : not (@eq Z (nNormMin radix precision) (nNormMin radix precision)), @eq float (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) *) intros H'1; Contradict H'1; auto. Qed. Theorem FPredSimpl4 : forall x : float, Fnum x <> (- pPred (vNum b))%Z -> Fnum x <> nNormMin radix precision -> FPred x = Float (Zpred (Fnum x)) (Fexp x). (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))), @eq float (FPred x) (Float (Z.pred (Fnum x)) (Fexp x)) *) intros x H' H'0; unfold FPred in |- *. generalize (Z_eq_bool_correct (Fnum x) (- pPred (vNum b))); case (Z_eq_bool (Fnum x) (- pPred (vNum b))); auto. (* Goal: forall _ : @eq Z (Fnum x) (Z.opp (pPred (vNum b))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) (Float (Z.pred (Fnum x)) (Fexp x)) *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)) (Float (Z.pred (Fnum x)) (Fexp x)) *) intros H'1; Contradict H'; auto. intros H'1; generalize (Z_eq_bool_correct (Fnum x) (nNormMin radix precision)); case (Z_eq_bool (Fnum x) (nNormMin radix precision)); auto. (* Goal: forall _ : @eq Z (Fnum x) (nNormMin radix precision), @eq float (if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x))) (Float (Z.pred (Fnum x)) (Fexp x)) *) intros H'2; Contradict H'0; auto. Qed. Theorem FPredFopFSucc : forall x : float, FPred x = Fopp (FSucc b radix precision (Fopp x)). (* Goal: forall x : float, @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) intros x. generalize (Z_eq_bool_correct (Fnum x) (- pPred (vNum b))); case (Z_eq_bool (Fnum x) (- pPred (vNum b))); intros H'1. (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) rewrite FPredSimpl1; auto; rewrite FSuccSimpl1; auto. (* Goal: @eq Z (Fnum (Fopp x)) (pPred (vNum b)) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) unfold Fopp in |- *; simpl in |- *; rewrite H'1; auto with zarith. generalize (Z_eq_bool_correct (Fnum x) (nNormMin radix precision)); case (Z_eq_bool (Fnum x) (nNormMin radix precision)); intros H'2. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); intros H'3. (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) replace x with (Float (Fnum x) (Fexp x)). rewrite H'2; rewrite H'3; rewrite FPredSimpl3; unfold Fopp in |- *; simpl in |- *; rewrite FSuccSimpl3; simpl in |- *; auto. (* Goal: @eq float (Float (Z.pred (nNormMin radix precision)) (Z.opp (Z.of_N (dExp b)))) (Float (Z.opp (Z.succ (Z.opp (nNormMin radix precision)))) (Z.opp (Z.of_N (dExp b)))) *) (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) rewrite <- Zopp_Zpred_Zs; rewrite Zopp_involutive; auto. (* Goal: @eq Z (Z.opp (Fnum x)) (Fnum (Fopp x)) *) case x; simpl in |- *; auto. rewrite FPredSimpl2; auto; rewrite FSuccSimpl2; unfold Fopp in |- *; simpl in |- *; try rewrite Zopp_involutive; auto. (* Goal: @eq Z (Z.opp (Fnum x)) (Z.opp (nNormMin radix precision)) *) (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) rewrite H'2; auto. (* Goal: @eq float (FPred x) (Fopp (FSucc b radix precision (Fopp x))) *) rewrite FPredSimpl4; auto; rewrite FSuccSimpl4; auto. unfold Fopp in |- *; simpl in |- *; rewrite <- Zopp_Zpred_Zs; rewrite Zopp_involutive; auto. unfold Fopp in |- *; simpl in |- *; Contradict H'1; rewrite <- H'1; rewrite Zopp_involutive; auto. (* Goal: not (@eq Z (Fnum (Fopp x)) (Z.opp (nNormMin radix precision))) *) unfold Fopp in |- *; simpl in |- *; Contradict H'2; auto with zarith. Qed. Theorem FPredDiff1 : forall x : float, Fnum x <> nNormMin radix precision -> Fminus radix x (FPred x) = Float 1%nat (Fexp x) :>R. (* Goal: forall (x : float) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))), @eq R (FtoRradix (Fminus radix x (FPred x))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) intros x H'; rewrite (FPredFopFSucc x). (* Goal: @eq R (FtoRradix (Fminus radix x (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) pattern x at 1 in |- *; rewrite <- (Fopp_Fopp x). (* Goal: @eq R (FtoRradix (Fminus radix (Fopp (Fopp x)) (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite <- Fopp_Fminus_dist. (* Goal: @eq R (FtoRradix (Fopp (Fminus radix (Fopp x) (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite Fopp_Fminus. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fopp x)) (Fopp x))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) unfold FtoRradix in |- *; rewrite FSuccDiff1; auto. (* Goal: not (@eq Z (Fnum (Fopp x)) (Z.opp (nNormMin radix precision))) *) replace (Fnum (Fopp x)) with (- Fnum x)%Z. Contradict H'; rewrite <- (Zopp_involutive (Fnum x)); rewrite H'; auto with zarith. (* Goal: @eq Z (Z.opp (Fnum x)) (Fnum (Fopp x)) *) case x; simpl in |- *; auto. Qed. Theorem FPredDiff2 : forall x : float, Fnum x = nNormMin radix precision -> Fexp x = (- dExp b)%Z -> Fminus radix x (FPred x) = Float 1%nat (Fexp x) :>R. (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))), @eq R (FtoRradix (Fminus radix x (FPred x))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) intros x H' H'0; rewrite (FPredFopFSucc x). (* Goal: @eq R (FtoRradix (Fminus radix x (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) pattern x at 1 in |- *; rewrite <- (Fopp_Fopp x). (* Goal: @eq R (FtoRradix (Fminus radix (Fopp (Fopp x)) (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite <- Fopp_Fminus_dist. (* Goal: @eq R (FtoRradix (Fopp (Fminus radix (Fopp x) (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite Fopp_Fminus. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fopp x)) (Fopp x))) (FtoRradix (Float (Z.of_nat (S O)) (Fexp x))) *) unfold FtoRradix in |- *; rewrite FSuccDiff2; auto. (* Goal: @eq Z (Fnum (Fopp x)) (Z.opp (nNormMin radix precision)) *) rewrite <- H'; case x; auto. Qed. Theorem FPredDiff3 : forall x : float, Fnum x = nNormMin radix precision -> Fexp x <> (- dExp b)%Z -> Fminus radix x (FPred x) = Float 1%nat (Zpred (Fexp x)) :>R. (* Goal: forall (x : float) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))), @eq R (FtoRradix (Fminus radix x (FPred x))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) intros x H' H'0; rewrite (FPredFopFSucc x). (* Goal: @eq R (FtoRradix (Fminus radix x (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) pattern x at 1 in |- *; rewrite <- (Fopp_Fopp x). (* Goal: @eq R (FtoRradix (Fminus radix (Fopp (Fopp x)) (Fopp (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite <- Fopp_Fminus_dist. (* Goal: @eq R (FtoRradix (Fopp (Fminus radix (Fopp x) (FSucc b radix precision (Fopp x))))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) rewrite Fopp_Fminus. (* Goal: @eq R (FtoRradix (Fminus radix (FSucc b radix precision (Fopp x)) (Fopp x))) (FtoRradix (Float (Z.of_nat (S O)) (Z.pred (Fexp x)))) *) unfold FtoRradix in |- *; rewrite FSuccDiff3; auto. (* Goal: @eq Z (Fnum (Fopp x)) (Z.opp (nNormMin radix precision)) *) rewrite <- H'; case x; auto. Qed. Theorem FBoundedPred : forall f : float, Fbounded b f -> Fbounded b (FPred f). (* Goal: forall (f : float) (_ : Fbounded b f), Fbounded b (FPred f) *) intros f H'; rewrite (FPredFopFSucc f); auto with float. Qed. Theorem FPredCanonic : forall a : float, Fcanonic radix b a -> Fcanonic radix b (FPred a). (* Goal: forall (a : float) (_ : Fcanonic radix b a), Fcanonic radix b (FPred a) *) intros a H'. (* Goal: Fcanonic radix b (FPred a) *) rewrite FPredFopFSucc; auto with float. Qed. Theorem FPredLt : forall a : float, (FPred a < a)%R. (* Goal: forall a : float, Rlt (FtoRradix (FPred a)) (FtoRradix a) *) intros a; rewrite FPredFopFSucc. (* Goal: Rlt (FtoRradix (Fopp (FSucc b radix precision (Fopp a)))) (FtoRradix a) *) pattern a at 2 in |- *; rewrite <- (Fopp_Fopp a). (* Goal: Rlt (FtoR radix (Fopp x)) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct. (* Goal: Rlt (Ropp (FtoR radix (FSucc b radix precision (Fopp a)))) (Ropp (Ropp (FtoR radix a))) *) apply Ropp_lt_contravar. (* Goal: Rlt (Ropp (FtoR radix a)) (FtoR radix (FSucc b radix precision (Fopp a))) *) rewrite <- Fopp_correct; auto with float. Qed. Theorem R0RltRlePred : forall x : float, (0 < x)%R -> (0 <= FPred x)%R. (* Goal: forall (x : float) (_ : Rlt (IZR Z0) (FtoRradix x)), Rle (IZR Z0) (FtoRradix (FPred x)) *) intros x H'; rewrite FPredFopFSucc. (* Goal: Rlt (FtoR radix (Fopp x)) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct. (* Goal: Rlt (Ropp (FtoR radix x)) (IZR Z0) *) replace 0%R with (-0)%R; auto with real. (* Goal: Rle (Ropp (FtoR radix (Fopp x))) (Ropp (FtoR radix (FSucc b radix precision (Fopp y)))) *) apply Ropp_le_contravar. (* Goal: Rle (FtoR radix (FSucc b radix precision (Fopp x))) (IZR Z0) *) apply R0RltRleSucc; auto. (* Goal: Rlt (FtoR radix (Fopp x)) (IZR Z0) *) unfold FtoRradix in |- *; repeat rewrite Fopp_correct. (* Goal: Rlt (Ropp (FtoR radix x)) (IZR Z0) *) replace 0%R with (-0)%R; auto with real. Qed. Theorem FPredProp : forall x y : float, Fcanonic radix b x -> Fcanonic radix b y -> (x < y)%R -> (x <= FPred y)%R. (* Goal: forall (x y : float) (_ : Fcanonic radix b x) (_ : Fcanonic radix b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix x) (FtoRradix (FPred y)) *) intros x y H' H'0 H'1; rewrite FPredFopFSucc. (* Goal: Rle (FtoRradix x) (FtoRradix (Fopp (FSucc b radix precision (Fopp y)))) *) rewrite <- (Fopp_Fopp x). (* Goal: Rle (FtoRradix (Fopp (Fopp x))) (FtoRradix (Fopp (FSucc b radix precision (Fopp y)))) *) unfold FtoRradix in |- *; rewrite Fopp_correct with (x := Fopp x). rewrite Fopp_correct with (x := FSucc b radix precision (Fopp y)); auto with float real. (* Goal: Rle (Ropp (FtoR radix (Fopp x))) (Ropp (FtoR radix (FSucc b radix precision (Fopp y)))) *) apply Ropp_le_contravar. (* Goal: Rle (FtoR radix (FSucc b radix precision (Fopp y))) (FtoR radix (Fopp x)) *) apply FSuccProp; auto with float. (* Goal: Rle (FtoR radix (Fopp p)) (FtoR radix (Fopp q)) *) (* Goal: Rlt (FtoR radix (Fopp q)) (FtoR radix (FSucc b radix precision (Fopp p))) *) repeat rewrite Fopp_correct; auto with real. Qed. Theorem FPredZleEq : forall p q : float, (FPred p < q)%R -> (q <= p)%R -> (Fexp p <= Fexp q)%Z -> p = q :>R. (* Goal: forall (p q : float) (_ : Rlt (FtoRradix (FPred p)) (FtoRradix q)) (_ : Rle (FtoRradix q) (FtoRradix p)) (_ : Z.le (Fexp p) (Fexp q)), @eq R (FtoRradix p) (FtoRradix q) *) intros p q H' H'0 H'1. rewrite <- (Ropp_involutive p); rewrite <- (Ropp_involutive q); apply Ropp_eq_compat. (* Goal: @eq R (Ropp (FtoRradix p)) (Ropp (FtoRradix q)) *) unfold FtoRradix in |- *; repeat rewrite <- Fopp_correct. (* Goal: @eq R (FtoR radix (Fopp p)) (FtoR radix (Fopp q)) *) apply FSuccZleEq with (b := b) (precision := precision); auto. (* Goal: Rle (FtoR radix (Fopp p)) (FtoR radix (Fopp q)) *) (* Goal: Rlt (FtoR radix (Fopp q)) (FtoR radix (FSucc b radix precision (Fopp p))) *) repeat rewrite Fopp_correct; auto with real. (* Goal: Rlt (FtoR radix (Fopp q)) (FtoR radix (FSucc b radix precision (Fopp p))) *) apply Ropp_lt_cancel. repeat rewrite <- Fopp_correct; rewrite <- FPredFopFSucc; rewrite Fopp_Fopp; auto. Qed. Definition FNPred (x : float) := FPred (Fnormalize radix b precision x). Theorem FNPredFopFNSucc : forall x : float, FNPred x = Fopp (FNSucc b radix precision (Fopp x)). (* Goal: forall x : float, @eq float (FNPred x) (Fopp (FNSucc b radix precision (Fopp x))) *) intros x; unfold FNPred, FNSucc in |- *; auto. (* Goal: @eq float (FPred (Fnormalize radix b precision x)) (Fopp (FSucc b radix precision (Fnormalize radix b precision (Fopp x)))) *) rewrite Fnormalize_Fopp; auto. (* Goal: @eq float (FPred (Fnormalize radix b precision x)) (Fopp (FSucc b radix precision (Fopp (Fnormalize radix b precision x)))) *) apply FPredFopFSucc; auto. Qed. Theorem FNPredCanonic : forall a : float, Fbounded b a -> Fcanonic radix b (FNPred a). (* Goal: forall (a : float) (_ : Fbounded b a), Fcanonic radix b (FNPred a) *) intros a H'; unfold FNPred in |- *. (* Goal: Fcanonic radix b (FPred (Fnormalize radix b precision a)) *) apply FPredCanonic; auto with float. Qed. Theorem FNPredLt : forall a : float, (FNPred a < a)%R. (* Goal: forall a : float, Rlt (FtoRradix (FNPred a)) (FtoRradix a) *) intros a; unfold FNPred in |- *. unfold FtoRradix in |- *; rewrite <- (FnormalizeCorrect _ radixMoreThanOne b precision a). (* Goal: Rlt (FtoR radix (FPred (Fnormalize radix b precision a))) (FtoR radix (Fnormalize radix b precision a)) *) apply FPredLt; auto. Qed. Theorem FNPredProp : forall x y : float, Fbounded b x -> Fbounded b y -> (x < y)%R -> (x <= FNPred y)%R. (* Goal: forall (x y : float) (_ : Fbounded b x) (_ : Fbounded b y) (_ : Rlt (FtoRradix x) (FtoRradix y)), Rle (FtoRradix x) (FtoRradix (FNPred y)) *) intros x y H' H'0 H'1; unfold FNPred in |- *. (* Goal: Rle (FtoRradix x) (FtoRradix (FPred (Fnormalize radix b precision y))) *) replace (FtoRradix x) with (FtoRradix (Fnormalize radix b precision x)). (* Goal: Rle (FtoRradix (Fnormalize radix b precision x)) (FtoRradix (FPred (Fnormalize radix b precision y))) *) (* Goal: @eq R (FtoRradix (Fnormalize radix b precision x)) (FtoRradix x) *) apply FPredProp; auto with float. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision x)) (FtoRradix x) *) unfold FtoRradix in |- *; repeat rewrite FnormalizeCorrect; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision x)) (FtoRradix x) *) unfold FtoRradix in |- *; repeat rewrite FnormalizeCorrect; auto. Qed. Theorem FPredSuc : forall x : float, Fcanonic radix b x -> FPred (FSucc b radix precision x) = x. (* Goal: forall (x : float) (_ : Fcanonic radix b x), @eq float (FSucc b radix precision (FPred x)) x *) intros x H; unfold FPred, FSucc in |- *. (* Goal: @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) cut (Fbounded b x); [ intros Fb0 | apply FcanonicBound with (1 := H) ]. generalize (Z_eq_bool_correct (Fnum x) (pPred (vNum b))); case (Z_eq_bool (Fnum x) (pPred (vNum b))); simpl in |- *. generalize (Z_eq_bool_correct (nNormMin radix precision) (- pPred (vNum b))); case (Z_eq_bool (nNormMin radix precision) (- pPred (vNum b))); simpl in |- *. (* Goal: forall (_ : @eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b)))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.succ (Fexp x))) else Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (nNormMin radix precision) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) else Float (pPred (vNum b)) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) x *) intros H'; Contradict H'; apply sym_not_equal; apply Zlt_not_eq; auto. (* Goal: Z.lt (Z.opp (pPred (vNum b))) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) apply Zlt_le_trans with (- 0%nat)%Z. apply Zlt_Zopp; unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *; apply vNumbMoreThanOne with (3 := pGivesBound); auto. (* Goal: Z.le (Z.opp (Z.of_nat O)) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (nNormMin radix precision) (nNormMin radix precision) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.succ (Fexp x))) else Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (nNormMin radix precision) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) else Float (pPred (vNum b)) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) x *) simpl in |- *; apply Zlt_le_weak; apply nNormPos; auto. generalize (Z_eq_bool_correct (nNormMin radix precision) (nNormMin radix precision)); case (Z_eq_bool (nNormMin radix precision) (nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Zsucc (Fexp x)) (- dExp b)); case (Z_eq_bool (Zsucc (Fexp x)) (- dExp b)); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) intros H' H'0 H'1 H'2; absurd (- dExp b <= Fexp x)%Z; auto with float. (* Goal: not (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x)) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (nNormMin radix precision) (nNormMin radix precision)) (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (Float (pPred (vNum b)) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (nNormMin radix precision) (nNormMin radix precision))) (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (nNormMin radix precision) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) else Float (pPred (vNum b)) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) x *) rewrite <- H'; auto with float zarith. replace (Zpred (Zsucc (Fexp x))) with (Fexp x); [ idtac | unfold Zsucc, Zpred in |- *; ring ]; auto. (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (nNormMin radix precision) (nNormMin radix precision)) (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (Float (pPred (vNum b)) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (nNormMin radix precision) (nNormMin radix precision))) (_ : not (@eq Z (nNormMin radix precision) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fnum x) (pPred (vNum b))), @eq float (Float (Z.pred (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (pPred (vNum b))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (nNormMin radix precision) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x))) else Float (pPred (vNum b)) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) else Float (Z.pred (Fnum (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum x)) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Fnum x)) (Fexp x)))) x *) intros H' H'0 H'1 H'2; rewrite <- H'2; auto. (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply floatEq; auto. (* Goal: forall (_ : not (@eq Z (pPred (vNum b)) (pPred (vNum b)))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H'; case H'; auto. generalize (Z_eq_bool_correct (Fnum x) (- nNormMin radix precision)); case (Z_eq_bool (Fnum x) (- nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); simpl in |- *. generalize (Z_eq_bool_correct (Zsucc (Fnum x)) (- pPred (vNum b))); case (Z_eq_bool (Zsucc (Fnum x)) (- pPred (vNum b))); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (Z.opp (pPred (vNum b))) (nNormMin radix precision) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.pred (Fexp x))) else Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H0 H1 H2; absurd (Zsucc (Fnum x) <= Fnum x)%Z; auto with zarith. (* Goal: Z.le (Z.succ (Fnum x)) (Fnum x) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (Z.opp (pPred (vNum b))) (nNormMin radix precision) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.pred (Fexp x))) else Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) rewrite H0; rewrite H2; (apply Zle_Zopp; auto with float arith). (* Goal: Z.le (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (Z.opp (pPred (vNum b))) (nNormMin radix precision) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.pred (Fexp x))) else Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) unfold pPred in |- *; apply Zle_Zpred; apply ZltNormMinVnum; auto with zarith. generalize (Z_eq_bool_correct (Zsucc (Fnum x)) (nNormMin radix precision)); case (Z_eq_bool (Zsucc (Fnum x)) (nNormMin radix precision)); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (Z.opp (pPred (vNum b))) (nNormMin radix precision) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.pred (Fexp x))) else Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2; Contradict H'2. (* Goal: not (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x)) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) rewrite <- H'; auto with zarith. replace (Zpred (Zsucc (Fnum x))) with (Fnum x); [ idtac | unfold Zsucc, Zpred in |- *; ring ]; auto. (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2 H'3; apply floatEq; auto. generalize (Z_eq_bool_correct (- pPred (vNum b)) (- pPred (vNum b))); case (Z_eq_bool (- pPred (vNum b)) (- pPred (vNum b))); auto. (* Goal: forall (_ : @eq Z (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b)))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Z.pred (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (pPred (vNum b))) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (pPred (vNum b))) (nNormMin radix precision) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x)) else Float (pPred (vNum b)) (Z.pred (Z.pred (Fexp x))) else Float (Z.pred (Z.opp (pPred (vNum b)))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2; rewrite <- H'1. replace (Zsucc (Zpred (Fexp x))) with (Fexp x); [ idtac | unfold Zsucc, Zpred in |- *; ring ]; auto. (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply floatEq; auto. (* Goal: forall (_ : not (@eq Z (pPred (vNum b)) (pPred (vNum b)))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H'; case H'; auto. generalize (Z_eq_bool_correct (Zsucc (Fnum x)) (- pPred (vNum b))); case (Z_eq_bool (Zsucc (Fnum x)) (- pPred (vNum b))); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H'; absurd (- pPred (vNum b) <= Fnum x)%Z; auto with float. (* Goal: not (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x)) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) rewrite <- H'; auto with zarith. (* Goal: Z.le (Z.opp (pPred (vNum b))) (Fnum x) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.succ (Fnum x)) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Z.succ (Fnum x))) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply Zle_Zabs_inv1; auto with float. (* Goal: Z.le (Z.abs (Fnum x)) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) unfold pPred in |- *; apply Zle_Zpred; auto with float. generalize (Z_eq_bool_correct (Zsucc (Fnum x)) (nNormMin radix precision)); case (Z_eq_bool (Zsucc (Fnum x)) (nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); simpl in |- *. (* Goal: forall (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2 H'3. replace (Zpred (Zsucc (Fnum x))) with (Fnum x); [ idtac | unfold Zsucc, Zpred in |- *; ring ]; auto. (* Goal: @eq float (Float (Fnum x) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply floatEq; auto. (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.succ (Fnum x)) (nNormMin radix precision)) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2 H'3; case H. (* Goal: forall _ : Fnormal radix b x, @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall _ : Fsubnormal radix b x, @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H'4; absurd (nNormMin radix precision <= Zabs (Fnum x))%Z. replace (Fnum x) with (Zpred (Zsucc (Fnum x))); [ idtac | unfold Zsucc, Zpred in |- *; ring ]; auto. (* Goal: not (Z.le (nNormMin radix precision) (Z.abs (Z.succ (Z.pred (Fnum x))))) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite H'0. (* Goal: not (Z.le (nNormMin radix precision) (Z.abs (Z.pred (nNormMin radix precision)))) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: forall _ : Fsubnormal radix b x, @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply Zlt_not_le; rewrite Zabs_eq; auto with zarith. (* Goal: Z.le Z0 (Z.pred (nNormMin radix precision)) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: forall _ : Fsubnormal radix b x, @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) apply Zle_Zpred; apply nNormPos; auto with float zarith. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply pNormal_absolu_min with (b := b); auto. (* Goal: forall _ : Fsubnormal radix b x, @eq float (Float (pPred (vNum b)) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fnum x)) (nNormMin radix precision))) (_ : not (@eq Z (Z.succ (Fnum x)) (Z.opp (pPred (vNum b))))) (_ : not (@eq Z (Fnum x) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Fnum x) (pPred (vNum b)))), @eq float (Float (Z.pred (Z.succ (Fnum x))) (Fexp x)) x *) intros H'4; Contradict H'; apply FsubnormalFexp with (1 := H'4). (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2; apply floatEq; simpl in |- *; auto. (* Goal: @eq Z (Z.succ (Z.pred (Fnum x))) (Fnum x) *) unfold Zpred, Zsucc in |- *; ring. Qed. Theorem FSucPred : forall x : float, Fcanonic radix b x -> FSucc b radix precision (FPred x) = x. (* Goal: forall (x : float) (_ : Fcanonic radix b x), @eq float (FSucc b radix precision (FPred x)) x *) intros x H; unfold FPred, FSucc in |- *. (* Goal: @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (Z.opp (pPred (vNum b))) then Float (Z.opp (nNormMin radix precision)) (Z.succ (Fexp x)) else if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) cut (Fbounded b x); [ intros Fb0 | apply FcanonicBound with (1 := H) ]. generalize (Z_eq_bool_correct (Fnum x) (- pPred (vNum b))); case (Z_eq_bool (Fnum x) (- pPred (vNum b))); simpl in |- *. generalize (Z_eq_bool_correct (- nNormMin radix precision) (pPred (vNum b))); case (Z_eq_bool (- nNormMin radix precision) (pPred (vNum b))); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (nNormMin radix precision) (Z.succ (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) intros H'; Contradict H'; apply Zlt_not_eq; auto. (* Goal: Z.lt (Z.opp (nNormMin radix precision)) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) rewrite <- (Zopp_involutive (pPred (vNum b))); apply Zlt_Zopp. (* Goal: Z.lt (Z.opp (pPred (vNum b))) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) apply Zlt_le_trans with (- 0%nat)%Z. (* Goal: Z.lt (Z.opp (pPred (vNum b))) (Z.opp (Z.of_nat O)) *) (* Goal: Z.le (Z.opp (Z.of_nat O)) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) apply Zlt_Zopp; unfold pPred in |- *; apply Zlt_succ_pred; simpl in |- *. (* Goal: Z.lt (Zpos xH) (Zpos (vNum b)) *) (* Goal: Z.le (Z.opp (Z.of_nat O)) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) apply (vNumbMoreThanOne radix) with (precision := precision); auto. (* Goal: Z.le (Z.opp (Z.of_nat O)) (nNormMin radix precision) *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x))) else Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) simpl in |- *; apply Zlt_le_weak; apply nNormPos; auto with zarith arith. generalize (Z_eq_bool_correct (- nNormMin radix precision) (- nNormMin radix precision)); case (Z_eq_bool (- nNormMin radix precision) (- nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Zsucc (Fexp x)) (- dExp b)); case (Z_eq_bool (Zsucc (Fexp x)) (- dExp b)); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) intros H' H'0 H'1 H'2; absurd (- dExp b <= Fexp x)%Z; auto with float. (* Goal: not (Z.le (Z.opp (Z.of_N (dExp b))) (Fexp x)) *) (* Goal: forall (_ : not (@eq Z (Z.succ (Fexp x)) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Z.succ (Fexp x)))) x *) (* Goal: forall (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.opp (nNormMin radix precision)) (pPred (vNum b)))) (_ : @eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (Float (Z.succ (Z.opp (nNormMin radix precision))) (Z.succ (Fexp x))) x *) (* Goal: forall _ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b)))), @eq float (if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else if Z_eq_bool (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x))) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) else Float (Z.succ (Fnum (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) (Fexp (if Z_eq_bool (Fnum x) (nNormMin radix precision) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.pred (Fnum x)) (Fexp x) else Float (pPred (vNum b)) (Z.pred (Fexp x)) else Float (Z.pred (Fnum x)) (Fexp x)))) x *) rewrite <- H'; auto with zarith. intros H' H'0 H'1 H'2; rewrite <- H'2; apply floatEq; simpl in |- *; auto; unfold Zsucc, Zpred in |- *; ring. (* Goal: forall (_ : not (@eq Z (pPred (vNum b)) (pPred (vNum b)))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H'; case H'; auto. generalize (Z_eq_bool_correct (Fnum x) (nNormMin radix precision)); case (Z_eq_bool (Fnum x) (nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); simpl in |- *. generalize (Z_eq_bool_correct (Zpred (Fnum x)) (pPred (vNum b))); case (Z_eq_bool (Zpred (Fnum x)) (pPred (vNum b))); simpl in |- *. intros H' H'0 H'1 H'2; absurd (nNormMin radix precision <= pPred (vNum b))%Z; auto with float. (* Goal: not (Z.le (nNormMin radix precision) (pPred (vNum b))) *) (* Goal: Z.le (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite <- H'; rewrite H'1; auto with zarith. (* Goal: Z.le (nNormMin radix precision) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite <- H'1; auto with float. (* Goal: Z.le (Fnum x) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply Zle_Zabs_inv2; auto with float zarith. (* Goal: Z.le (Z.abs (Fnum x)) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) unfold pPred in |- *; apply Zle_Zpred; auto with float. generalize (Z_eq_bool_correct (Zpred (Fnum x)) (- nNormMin radix precision)); case (Z_eq_bool (Zpred (Fnum x)) (- nNormMin radix precision)); simpl in |- *. intros H' H'0 H'1 H'2 H'3; absurd (Zpred (nNormMin radix precision) = (- nNormMin radix precision)%Z); auto with zarith. intros H' H'0 H'1 H'2 H'3; apply floatEq; simpl in |- *; auto; (* Goal: @eq Z (Z.succ (Z.pred (Fnum x))) (Fnum x) *) unfold Zpred, Zsucc in |- *; ring. generalize (Z_eq_bool_correct (pPred (vNum b)) (pPred (vNum b))); case (Z_eq_bool (pPred (vNum b)) (pPred (vNum b))); auto. intros H' H'0 H'1 H'2; rewrite <- H'1; apply floatEq; simpl in |- *; auto; (* Goal: @eq Z (Z.succ (Z.pred (Fnum x))) (Fnum x) *) unfold Zpred, Zsucc in |- *; ring. (* Goal: forall (_ : not (@eq Z (pPred (vNum b)) (pPred (vNum b)))) (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H'; case H'; auto. generalize (Z_eq_bool_correct (Zpred (Fnum x)) (pPred (vNum b))); case (Z_eq_bool (Zpred (Fnum x)) (pPred (vNum b))); simpl in |- *. (* Goal: forall (_ : @eq Z (Z.pred (Fnum x)) (pPred (vNum b))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (nNormMin radix precision) (Z.succ (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H'; absurd (Fnum x <= pPred (vNum b))%Z; auto with float. (* Goal: not (Z.le (Fnum x) (pPred (vNum b))) *) (* Goal: Z.le (Fnum x) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite <- H'. (* Goal: not (Z.le (Fnum x) (Z.pred (Fnum x))) *) (* Goal: Z.le (Fnum x) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply Zlt_not_le; apply Zlt_pred; auto. (* Goal: Z.le (Z.abs (Fnum x)) (pPred (vNum b)) *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : @eq Z (Fexp x) (Z.opp (Z.of_N (dExp b)))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Fnum x) (nNormMin radix precision)) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (pPred (vNum b)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Z.pred (Fexp x))) else if Z_eq_bool (pPred (vNum b)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Z.pred (Fexp x)) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.opp (pPred (vNum b))) (Z.pred (Z.pred (Fexp x))) else Float (Z.succ (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (if Z_eq_bool (Z.pred (Fnum x)) (pPred (vNum b)) then Float (nNormMin radix precision) (Z.succ (Fexp x)) else if Z_eq_bool (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)) then if Z_eq_bool (Fexp x) (Z.opp (Z.of_N (dExp b))) then Float (Z.succ (Z.pred (Fnum x))) (Fexp x) else Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x)) else Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply Zle_Zabs_inv2; unfold pPred in |- *; apply Zle_Zpred; auto with float. generalize (Z_eq_bool_correct (Zpred (Fnum x)) (- nNormMin radix precision)); case (Z_eq_bool (Zpred (Fnum x)) (- nNormMin radix precision)); simpl in |- *. generalize (Z_eq_bool_correct (Fexp x) (- dExp b)); case (Z_eq_bool (Fexp x) (- dExp b)); simpl in |- *. intros H' H'0 H'1 H'2 H'3; apply floatEq; simpl in |- *; auto; unfold Zsucc, Zpred in |- *; ring. (* Goal: forall (_ : not (@eq Z (Fexp x) (Z.opp (Z.of_N (dExp b))))) (_ : @eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2 H'3; case H; intros C0. (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) absurd (nNormMin radix precision <= Zabs (Fnum x))%Z; auto with float. replace (Fnum x) with (Zsucc (Zpred (Fnum x))); [ idtac | unfold Zsucc, Zpred in |- *; ring ]. (* Goal: not (Z.le (nNormMin radix precision) (Z.abs (Z.succ (Z.pred (Fnum x))))) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite H'0. (* Goal: not (Z.le (nNormMin radix precision) (Z.abs (Z.succ (Z.opp (nNormMin radix precision))))) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite <- Zopp_Zpred_Zs; rewrite Zabs_Zopp. (* Goal: not (Z.le (nNormMin radix precision) (Z.abs (Z.pred (nNormMin radix precision)))) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) rewrite Zabs_eq; auto with zarith. (* Goal: Z.le Z0 (Z.pred (nNormMin radix precision)) *) (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply Zle_Zpred; simpl in |- *; apply nNormPos; auto with float zarith. (* Goal: Z.le (nNormMin radix precision) (Z.abs (Fnum x)) *) (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) apply pNormal_absolu_min with (b := b); auto. (* Goal: @eq float (Float (Z.opp (pPred (vNum b))) (Z.pred (Fexp x))) x *) (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) Contradict H'; apply FsubnormalFexp with (1 := C0). (* Goal: forall (_ : not (@eq Z (Z.pred (Fnum x)) (Z.opp (nNormMin radix precision)))) (_ : not (@eq Z (Z.pred (Fnum x)) (pPred (vNum b)))) (_ : not (@eq Z (Fnum x) (nNormMin radix precision))) (_ : not (@eq Z (Fnum x) (Z.opp (pPred (vNum b))))), @eq float (Float (Z.succ (Z.pred (Fnum x))) (Fexp x)) x *) intros H' H'0 H'1 H'2; apply floatEq; simpl in |- *; auto. (* Goal: @eq Z (Z.succ (Z.pred (Fnum x))) (Fnum x) *) unfold Zpred, Zsucc in |- *; ring. Qed. Theorem FNPredSuc : forall x : float, Fbounded b x -> FNPred (FNSucc b radix precision x) = x :>R. (* Goal: forall (x : float) (_ : Fbounded b x), @eq R (FtoRradix (FNPred (FNSucc b radix precision x))) (FtoRradix x) *) intros x H'; unfold FNPred in |- *; rewrite FcanonicFnormalizeEq; auto. (* Goal: @eq R (FtoRradix (FPred (FNSucc b radix precision x))) (FtoRradix x) *) (* Goal: Fcanonic radix b (FNSucc b radix precision x) *) unfold FNSucc in |- *; rewrite FPredSuc; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision x)) (FtoRradix x) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision x) *) (* Goal: Fcanonic radix b (FNPred x) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. (* Goal: Fcanonic radix b (Fnormalize radix b precision x) *) (* Goal: Fcanonic radix b (FNPred x) *) apply FnormalizeCanonic; auto. (* Goal: Fcanonic radix b (FNSucc b radix precision (FNPred x)) *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNSuccCanonic; auto. Qed. Theorem FNPredSucEq : forall x : float, Fcanonic radix b x -> FNPred (FNSucc b radix precision x) = x. (* Goal: forall (x : float) (_ : Fcanonic radix b x), @eq float (FNSucc b radix precision (FNPred x)) x *) intros x H'. (* Goal: @eq float (FNPred (FNSucc b radix precision x)) x *) apply FcanonicUnique with (precision := precision) (5 := H'); auto. (* Goal: Fcanonic radix b (FNPred (FNSucc b radix precision x)) *) (* Goal: @eq R (FtoR radix (FNPred (FNSucc b radix precision x))) (FtoR radix x) *) apply FNPredCanonic; auto with float. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. (* Goal: Fcanonic radix b (FNSucc b radix precision (FNPred x)) *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNSuccCanonic; auto. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. (* Goal: @eq R (FtoR radix (FNPred (FNSucc b radix precision x))) (FtoR radix x) *) apply FNPredSuc; auto. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. Qed. Theorem FNSucPred : forall x : float, Fbounded b x -> FNSucc b radix precision (FNPred x) = x :>R. (* Goal: forall (x : float) (_ : Fbounded b x), @eq R (FtoRradix (FNSucc b radix precision (FNPred x))) (FtoRradix x) *) intros x H'; unfold FNSucc in |- *; rewrite FcanonicFnormalizeEq; auto. (* Goal: @eq R (FtoRradix (FSucc b radix precision (FNPred x))) (FtoRradix x) *) (* Goal: Fcanonic radix b (FNPred x) *) unfold FNPred in |- *; rewrite FSucPred; auto. (* Goal: @eq R (FtoRradix (Fnormalize radix b precision x)) (FtoRradix x) *) (* Goal: Fcanonic radix b (Fnormalize radix b precision x) *) (* Goal: Fcanonic radix b (FNPred x) *) unfold FtoRradix in |- *; apply FnormalizeCorrect; auto. (* Goal: Fcanonic radix b (Fnormalize radix b precision x) *) (* Goal: Fcanonic radix b (FNPred x) *) apply FnormalizeCanonic; auto. (* Goal: Fcanonic radix b (FNPred x) *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNPredCanonic; auto. Qed. Theorem FNSucPredEq : forall x : float, Fcanonic radix b x -> FNSucc b radix precision (FNPred x) = x. (* Goal: forall (x : float) (_ : Fcanonic radix b x), @eq float (FNSucc b radix precision (FNPred x)) x *) intros x H'. (* Goal: @eq float (FNSucc b radix precision (FNPred x)) x *) apply FcanonicUnique with (5 := H') (precision := precision); auto. (* Goal: Fcanonic radix b (FNSucc b radix precision (FNPred x)) *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNSuccCanonic; auto. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. (* Goal: Fcanonic radix b (FNPred x) *) (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNPredCanonic; auto. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. (* Goal: @eq R (FtoR radix (FNSucc b radix precision (FNPred x))) (FtoR radix x) *) apply FNSucPred; auto. (* Goal: Fbounded b x *) apply FcanonicBound with (radix := radix); auto. Qed. End pred. Hint Resolve FBoundedPred FPredCanonic FPredLt R0RltRleSucc FPredProp FNPredCanonic FNPredLt FNPredProp: float.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Confluence.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. Require Import Marks. Require Import Substitution. Require Import Residuals. Require Import Simulation. Require Import Cube. (* Confluence *) Definition confluence (A : Set) (R : A -> A -> Prop) := forall x y : A, R x y -> forall z : A, R x z -> exists u : A, R y u /\ R z u. Lemma lemma1 : confluence lambda par_red -> confluence lambda red. Proof. (* Goal: forall _ : confluence lambda par_red, confluence lambda red *) unfold all, confluence in |- *; intros. (* Goal: @ex lambda (fun u : lambda => and (red y u) (red z u)) *) cut (exists u : lambda, par_red y u /\ par_red z u). (* Goal: forall _ : @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)), @ex lambda (fun u : lambda => and (red y u) (red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) simple induction 1. intros u C; exists u; elim C; intros; split; apply par_red_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) apply H with x; apply red_par_red; trivial with arith. Qed. (* Strip lemmas *) Definition strip := forall x y : lambda, par_red x y -> forall z : lambda, par_red1 x z -> exists u : lambda, par_red1 y u /\ par_red z u. Lemma strip_lemma_r : confluence lambda par_red1 -> strip. Proof. (* Goal: forall _ : confluence lambda par_red1, strip *) unfold strip in |- *; simple induction 2; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red1 P u) (par_red z u)) *) elim H with M N z; trivial with arith. (* Goal: forall (x : lambda) (_ : and (par_red1 z x) (par_red N x)), @ex lambda (fun u : lambda => and (par_red N u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) intros u C; exists u; elim C; intros; split; trivial with arith. (* Goal: par_red z u *) (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) apply one_step_par_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H2 z H5); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H6; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H4 x0 H7); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H9; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) exists x1; split; trivial with arith. (* Goal: par_red z x1 *) apply trans_par_red with x0; trivial with arith. Qed. Lemma strip_lemma_l : strip -> confluence lambda par_red. Proof. (* Goal: forall _ : strip, confluence lambda par_red *) unfold confluence in |- *; simple induction 2; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red N u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H M z H2 N H1). (* Goal: forall (x : lambda) (_ : and (par_red1 z x) (par_red N x)), @ex lambda (fun u : lambda => and (par_red N u) (par_red z u)) *) (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) intros u C; exists u; elim C; intros; split; trivial with arith. (* Goal: par_red z u *) (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) apply one_step_par_red; trivial with arith. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H2 z H5); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H6; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim (H4 x0 H7); intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) elim H9; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red P u) (par_red z u)) *) exists x1; split; trivial with arith. (* Goal: par_red z x1 *) apply trans_par_red with x0; trivial with arith. Qed. Lemma lemma2 : confluence lambda par_red1 -> confluence lambda par_red. Proof. (* Goal: forall _ : confluence lambda par_red1, confluence lambda par_red *) intro C; unfold confluence in |- *; intros. (* Goal: @ex lambda (fun u : lambda => and (par_red y u) (par_red z u)) *) apply (strip_lemma_l (strip_lemma_r C) x); trivial with arith. Qed. (***************************************) (* Parallel moves lemma and confluence *) (***************************************) Lemma parallel_moves : confluence lambda par_red1. Proof. (* Goal: confluence lambda par_red1 *) red in |- *; intros M N R1 P R2. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (simulation M N); trivial with arith. (* Goal: forall (x : redexes) (_ : residuals (mark M) x (mark N)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (simulation M P); trivial with arith. (* Goal: forall (x : redexes) (_ : residuals (mark M) x (mark P)) (x0 : redexes) (_ : residuals (mark M) x0 (mark N)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros V RV U RU. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) elim (paving U V (mark M) (mark N) (mark P)); trivial with arith. (* Goal: forall (x : redexes) (_ : @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals (mark N) VU WUV) (residuals (mark P) x WUV)))), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros UV C1; elim C1. (* Goal: forall (x : redexes) (_ : @ex redexes (fun WUV : redexes => and (residuals (mark N) x WUV) (residuals (mark P) UV WUV))), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros VU C2; elim C2. (* Goal: forall (x : redexes) (_ : and (residuals (mark N) VU x) (residuals (mark P) UV x)), @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) intros UVW C3; elim C3; intros P1 P2. (* Goal: @ex lambda (fun u : lambda => and (par_red1 N u) (par_red1 P u)) *) exists (unmark UVW); split. (* Goal: par_red1 N (unmark UVW) *) (* Goal: par_red1 P (unmark UVW) *) rewrite (inverse N). (* Goal: par_red1 (unmark (mark N)) (unmark UVW) *) (* Goal: par_red1 P (unmark UVW) *) apply Simulation.completeness with VU; trivial with arith. (* Goal: par_red1 P (unmark UVW) *) rewrite (inverse P). (* Goal: par_red1 (unmark (mark P)) (unmark UVW) *) apply Simulation.completeness with UV; trivial with arith. Qed. Lemma confluence_parallel_reduction : confluence lambda par_red. Proof. (* Goal: confluence lambda par_red *) apply lemma2; exact parallel_moves. Qed. Theorem confluence_beta_reduction : confluence lambda red. Proof. (* Goal: confluence lambda red *) apply lemma1; exact confluence_parallel_reduction. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (****************************************************************************) (* Residuals.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. Require Import Substitution. (*************************************************) (* Parallel beta reduction with residual tracing *) (*************************************************) (* (residuals U V W) means W are residuals of redexes U by step V *) Inductive residuals : redexes -> redexes -> redexes -> Prop := | Res_Var : forall n : nat, residuals (Var n) (Var n) (Var n) | Res_Fun : forall U V W : redexes, residuals U V W -> residuals (Fun U) (Fun V) (Fun W) | Res_Ap : forall U1 V1 W1 : redexes, residuals U1 V1 W1 -> forall U2 V2 W2 : redexes, residuals U2 V2 W2 -> forall b : bool, residuals (Ap b U1 U2) (Ap false V1 V2) (Ap b W1 W2) | Res_redex : forall U1 V1 W1 : redexes, residuals U1 V1 W1 -> forall U2 V2 W2 : redexes, residuals U2 V2 W2 -> forall b : bool, residuals (Ap b (Fun U1) U2) (Ap true (Fun V1) V2) (subst_r W2 W1). Hint Resolve Res_Var Res_Fun Res_Ap Res_redex. Lemma residuals_function : forall U V W : redexes, residuals U V W -> forall (W' : redexes) (R : residuals U V W'), W' = W. Proof. (* Remark use of name R necessary for uniform expression of next line *) (* Goal: forall (U V W : redexes) (_ : residuals U V W) (W' : redexes) (_ : residuals U V W'), @eq redexes W' W *) simple induction 1; intros; inversion R; auto with arith. (* Goal: @eq redexes (Fun W1) (Fun W0) *) (* Goal: @eq redexes (Ap b W0 W3) (Ap b W1 W2) *) (* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *) elim H1 with W1; trivial with arith. (* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *) elim H1 with W0; elim H3 with W3; trivial with arith. (* Goal: @eq redexes (subst_r W3 W0) (subst_r W2 W1) *) elim H1 with W0; elim H3 with W3; trivial with arith. Qed. (* Commutation theorem *) Lemma residuals_lift_rec : forall U1 U2 U3 : redexes, residuals U1 U2 U3 -> forall k n : nat, residuals (lift_rec_r U1 n k) (lift_rec_r U2 n k) (lift_rec_r U3 n k). Proof. (* Goal: forall (U1 U2 U3 : redexes) (_ : residuals U1 U2 U3) (k n : nat), residuals (lift_rec_r U1 n k) (lift_rec_r U2 n k) (lift_rec_r U3 n k) *) simple induction 1; simpl in |- *; intros; auto with arith. (* Goal: residuals (Ap b (Fun (lift_rec_r U0 (S n) k)) (lift_rec_r U4 n k)) (Ap true (Fun (lift_rec_r V1 (S n) k)) (lift_rec_r V2 n k)) (lift_rec_r (subst_r W2 W1) n k) *) rewrite lift_subst; auto with arith. Qed. Lemma residuals_lift : forall U1 U2 U3 : redexes, residuals U1 U2 U3 -> forall k : nat, residuals (lift_r k U1) (lift_r k U2) (lift_r k U3). Proof. (* Goal: forall (U1 U2 U3 : redexes) (_ : residuals U1 U2 U3) (k : nat), residuals (lift_r k U1) (lift_r k U2) (lift_r k U3) *) unfold lift_r in |- *; intros; apply residuals_lift_rec; trivial with arith. Qed. Hint Resolve residuals_lift. Lemma residuals_subst_rec : forall U1 U2 U3 V1 V2 V3 : redexes, residuals U1 U2 U3 -> residuals V1 V2 V3 -> forall k : nat, residuals (subst_rec_r U1 V1 k) (subst_rec_r U2 V2 k) (subst_rec_r U3 V3 k). Proof. (* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : regular U), regular W *) simple induction 1; simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : residuals V1 V2 V3) (k : nat), residuals (insert_Var V1 n k) (insert_Var V2 n k) (insert_Var V3 n k) *) (* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *) intros n R k; unfold insert_Var in |- *; elim (compare k n); auto with arith. (* Goal: forall a : sumbool (lt k n) (@eq nat k n), residuals (if a then Var (Init.Nat.pred n) else lift_r k V1) (if a then Var (Init.Nat.pred n) else lift_r k V2) (if a then Var (Init.Nat.pred n) else lift_r k V3) *) (* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *) simple induction a; auto with arith. (* Goal: forall (U1 V4 W1 : redexes) (_ : residuals U1 V4 W1) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U1 V1 k) (subst_rec_r V4 V2 k) (subst_rec_r W1 V3 k)) (U2 V5 W2 : redexes) (_ : residuals U2 V5 W2) (_ : forall (_ : residuals V1 V2 V3) (k : nat), residuals (subst_rec_r U2 V1 k) (subst_rec_r V5 V2 k) (subst_rec_r W2 V3 k)) (b : bool) (_ : residuals V1 V2 V3) (k : nat), residuals (Ap b (Fun (subst_rec_r U1 V1 (S k))) (subst_rec_r U2 V1 k)) (Ap true (Fun (subst_rec_r V4 V2 (S k))) (subst_rec_r V5 V2 k)) (subst_rec_r (subst_r W2 W1) V3 k) *) intros; rewrite substitution; auto with arith. Qed. Hint Resolve residuals_subst_rec. (***************************) (* The Commutation Theorem *) (***************************) Theorem commutation : forall U1 U2 U3 V1 V2 V3 : redexes, residuals U1 U2 U3 -> residuals V1 V2 V3 -> residuals (subst_r V1 U1) (subst_r V2 U2) (subst_r V3 U3). Proof. (* Goal: forall (U1 U2 U3 V1 V2 V3 : redexes) (_ : residuals U1 U2 U3) (_ : residuals V1 V2 V3), residuals (subst_r V1 U1) (subst_r V2 U2) (subst_r V3 U3) *) unfold subst_r in |- *; auto with arith. Qed. Lemma residuals_comp : forall U V W : redexes, residuals U V W -> comp U V. Proof. (* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : regular U), regular W *) simple induction 1; simpl in |- *; auto with arith. Qed. Lemma preservation1 : forall U V UV : redexes, residuals U V UV -> forall (T : redexes) (UVT : union U V T), residuals T V UV. Proof. (* Remark use of name UVT for uniform command below *) simple induction 1; simple induction T; intros; inversion UVT; auto with arith. (* Goal: residuals (Ap (bool_max b false) r r0) (Ap false V1 V2) (Ap b W1 W2) *) (* Goal: residuals (Ap (bool_max b true) r r0) (Ap true (Fun V1) V2) (subst_r W2 W1) *) rewrite (max_false b); auto with arith. (* Goal: residuals (Ap (bool_max b true) r r0) (Ap true (Fun V1) V2) (subst_r W2 W1) *) inversion H8; auto with arith. Qed. Lemma preservation : forall U V W UV : redexes, union U V W -> residuals U V UV -> residuals W V UV. Proof. (* Goal: forall (U V W UV : redexes) (_ : union U V W) (_ : residuals U V UV), residuals W V UV *) intros; apply preservation1 with U; auto with arith. Qed. Lemma mutual_residuals_comp : forall (W U UW : redexes) (RU : residuals U W UW) (V VW : redexes) (RV : residuals V W VW), comp UW VW. Proof. (* Goal: forall (W U UW : redexes) (_ : residuals U W UW) (V VW : redexes) (_ : residuals V W VW), comp UW VW *) simple induction W. (* Goal: forall (n : nat) (U UW : redexes) (_ : residuals U (Var n) UW) (V VW : redexes) (_ : residuals V (Var n) VW), comp UW VW *) (* Goal: forall (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (U UW : redexes) (_ : residuals U (Fun r) UW) (V VW : redexes) (_ : residuals V (Fun r) VW), comp UW VW *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (r0 : redexes) (_ : forall (U UW : redexes) (_ : residuals U r0 UW) (V VW : redexes) (_ : residuals V r0 VW), comp UW VW) (U UW : redexes) (_ : residuals U (Ap b r r0) UW) (V VW : redexes) (_ : residuals V (Ap b r r0) VW), comp UW VW *) intros; inversion_clear RU; inversion_clear RV; trivial with arith. intros; inversion_clear RU; inversion_clear RV; apply Comp_Fun; (* Goal: comp W0 W1 *) (* Goal: comp W3 W2 *) apply H with U0 U1; auto with arith. (* Goal: forall (b : bool) (r : redexes) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW) (r0 : redexes) (_ : forall (U UW : redexes) (_ : residuals U r0 UW) (V VW : redexes) (_ : residuals V r0 VW), comp UW VW) (U UW : redexes) (_ : residuals U (Ap b r r0) UW) (V VW : redexes) (_ : residuals V (Ap b r r0) VW), comp UW VW *) simple induction b; intros; generalize RU H; inversion_clear RV. (* Goal: forall (_ : residuals U (Ap true (Fun V1) r0) UW) (_ : forall (U UW : redexes) (_ : residuals U (Fun V1) UW) (V VW : redexes) (_ : residuals V (Fun V1) VW), comp UW VW), comp UW (subst_r W2 W1) *) (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) intro RU1; inversion_clear RU1; intros. (* Goal: comp (subst_r W3 W0) (subst_r W2 W1) *) (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) apply subst_preserve_comp. (* Goal: comp W0 W1 *) (* Goal: comp W3 W2 *) (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) cut (comp (Fun W0) (Fun W1)). (* Goal: forall _ : comp (Fun W0) (Fun W1), comp W0 W1 *) (* Goal: comp (Fun W0) (Fun W1) *) (* Goal: comp W3 W2 *) (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) intro CF; inversion_clear CF; trivial with arith. (* Goal: comp (Fun W0) (Fun W1) *) (* Goal: comp W3 W2 *) (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) apply H5 with (Fun U0) (Fun U1); auto with arith. (* Goal: comp W3 W2 *) apply H0 with U3 U2; auto with arith. (* Goal: forall (_ : residuals U (Ap false r r0) UW) (_ : forall (U UW : redexes) (_ : residuals U r UW) (V VW : redexes) (_ : residuals V r VW), comp UW VW), comp UW (Ap b0 W1 W2) *) intros; inversion_clear RU; apply Comp_Ap. (* Goal: comp W0 W1 *) (* Goal: comp W3 W2 *) apply H with U0 U1; auto with arith. (* Goal: comp W3 W2 *) apply H0 with U3 U2; auto with arith. Qed. (* We take residuals only by regular redexes *) Lemma residuals_regular : forall U V W : redexes, residuals U V W -> regular V. Proof. (* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : regular U), regular W *) simple induction 1; simpl in |- *; auto with arith. Qed. (* Conversely, residuals by compatible regular redexes always exist (and are unique by residuals_function lemma above) *) Lemma residuals_intro : forall U V : redexes, comp U V -> regular V -> exists W : redexes, residuals U V W. Proof. simple induction 1; simpl in |- *. intro n; exists (Var n); trivial with arith. intros U0 V0 C E O; elim (E O); intros W0 R; exists (Fun W0); auto with arith. simple induction b2. (* Goal: forall _ : match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b r r0 => False end, match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *) (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *) generalize H1; elim H0; try contradiction. intros; elim H7; intros H8 H9; elim (H6 H8); intros FW0 R. inversion_clear R. elim (H3 H9); intros W2 R2. eapply ex_intro. eapply Res_redex. apply H10. apply R2. simple induction 1; intros O1 O2; elim (H1 O1); intro W1; elim (H3 O2); intro W2. intros; exists (Ap b1 W1 W2); auto with arith. Qed. (* Residuals preserve regularity *) Lemma residuals_preserve_regular : forall U V W : redexes, residuals U V W -> regular U -> regular W. Proof. (* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : regular U), regular W *) simple induction 1; simpl in |- *; auto with arith. (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b0 r r0 => False end else and (regular U1) (regular U2)), if b then match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b0 r r0 => False end else and (regular W1) (regular W2) *) (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *) simple induction b. (* Goal: forall _ : match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b r r0 => False end, match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *) (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *) generalize H1; elim H0; try contradiction. (* Goal: forall (U V W : redexes) (_ : residuals U V W) (_ : forall (_ : forall _ : regular U, regular W) (_ : match U with | Var n => False | Fun r => and (regular U) (regular U2) | Ap b r r0 => False end), match W with | Var n => False | Fun r => and (regular W) (regular W2) | Ap b r r0 => False end) (_ : forall _ : regular (Fun U), regular (Fun W)) (_ : and (regular (Fun U)) (regular U2)), and (regular (Fun W)) (regular W2) *) (* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *) (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *) intros; elim H7; split; auto with arith. (* Goal: forall _ : and (regular U1) (regular U2), and (regular W1) (regular W2) *) (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : forall _ : regular U1, regular W1) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : forall _ : regular U2, regular W2) (b : bool) (_ : if b then and (regular U1) (regular U2) else and (regular U1) (regular U2)), regular (subst_r W2 W1) *) simple induction 1; split; auto with arith. simple induction b; intros; apply subst_preserve_regular; elim H4; auto with arith. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Redexes.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Test. Require Import Terms. Require Import Reduction. (************************************) (* Lambda terms with marked redexes *) (************************************) Inductive redexes : Set := | Var : nat -> redexes | Fun : redexes -> redexes | Ap : bool -> redexes -> redexes -> redexes. (* A redex is marked as (Ap true (Fun M) N) *) (* The Boolean algebra of sets of redexes *) Inductive sub : redexes -> redexes -> Prop := | Sub_Var : forall n : nat, sub (Var n) (Var n) | Sub_Fun : forall U V : redexes, sub U V -> sub (Fun U) (Fun V) | Sub_Ap1 : forall U1 V1 : redexes, sub U1 V1 -> forall U2 V2 : redexes, sub U2 V2 -> forall b : bool, sub (Ap false U1 U2) (Ap b V1 V2) | Sub_Ap2 : forall U1 V1 : redexes, sub U1 V1 -> forall U2 V2 : redexes, sub U2 V2 -> forall b : bool, sub (Ap true U1 U2) (Ap true V1 V2). Definition bool_max (b b' : bool) := match b return bool with | true => true | false => b' end. Lemma max_false : forall b : bool, bool_max b false = b. Proof. (* Goal: forall b : bool, @eq bool (bool_max b false) b *) simple induction b; simpl in |- *; trivial. Qed. Inductive union : redexes -> redexes -> redexes -> Prop := | Union_Var : forall n : nat, union (Var n) (Var n) (Var n) | Union_Fun : forall U V W : redexes, union U V W -> union (Fun U) (Fun V) (Fun W) | Union_Ap : forall U1 V1 W1 : redexes, union U1 V1 W1 -> forall U2 V2 W2 : redexes, union U2 V2 W2 -> forall b1 b2 : bool, union (Ap b1 U1 U2) (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2). Lemma union_l : forall U V W : redexes, union U V W -> sub U W. Proof. (* Goal: forall (U V W : redexes) (_ : union U V W), union V U W *) simple induction 1; intros. (* Goal: sub (Var n) (Var n) *) (* Goal: sub (Fun V0) (Fun W0) *) (* Goal: sub (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) apply Sub_Var. (* Goal: sub (Fun V0) (Fun W0) *) (* Goal: sub (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) apply Sub_Fun; trivial. (* Goal: sub (Ap b1 U1 U2) (Ap (bool_max b1 b2) W1 W2) *) elim b1. (* Goal: sub (Ap true U1 U2) (Ap (bool_max true b2) W1 W2) *) (* Goal: sub (Ap false U1 U2) (Ap (bool_max false b2) W1 W2) *) elim b2; simpl in |- *; apply Sub_Ap2; trivial. (* Goal: sub (Ap false U1 U2) (Ap (bool_max false b2) W1 W2) *) elim b2; simpl in |- *; apply Sub_Ap1; trivial. Qed. Lemma union_r : forall U V W : redexes, union U V W -> sub V W. Proof. (* Goal: forall (U V W : redexes) (_ : union U V W), union V U W *) simple induction 1; intros. (* Goal: sub (Var n) (Var n) *) (* Goal: sub (Fun V0) (Fun W0) *) (* Goal: sub (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) apply Sub_Var. (* Goal: sub (Fun V0) (Fun W0) *) (* Goal: sub (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) apply Sub_Fun; trivial. (* Goal: sub (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) elim b2. (* Goal: sub (Ap true V1 V2) (Ap (bool_max b1 true) W1 W2) *) (* Goal: sub (Ap false V1 V2) (Ap (bool_max b1 false) W1 W2) *) elim b1; simpl in |- *; apply Sub_Ap2; trivial. (* Goal: sub (Ap false V1 V2) (Ap (bool_max b1 false) W1 W2) *) elim b1; simpl in |- *; apply Sub_Ap1; trivial. Qed. Lemma bool_max_Sym : forall b b' : bool, bool_max b b' = bool_max b' b. Proof. (* Goal: forall b b' : bool, @eq bool (bool_max b b') (bool_max b' b) *) simple induction b; simple induction b'; simpl in |- *; trivial. Qed. Lemma union_sym : forall U V W : redexes, union U V W -> union V U W. Proof. (* Goal: forall (U V W : redexes) (_ : union U V W), union V U W *) simple induction 1; intros. (* Goal: union (Var n) (Var n) (Var n) *) (* Goal: union (Fun V0) (Fun U0) (Fun W0) *) (* Goal: union (Ap b2 V1 V2) (Ap b1 U1 U2) (Ap (bool_max b1 b2) W1 W2) *) apply Union_Var; trivial. (* Goal: union (Fun V0) (Fun U0) (Fun W0) *) (* Goal: union (Ap b2 V1 V2) (Ap b1 U1 U2) (Ap (bool_max b1 b2) W1 W2) *) apply Union_Fun; trivial. (* Goal: union (Ap b2 V1 V2) (Ap b1 U1 U2) (Ap (bool_max b1 b2) W1 W2) *) rewrite (bool_max_Sym b1 b2); apply Union_Ap; trivial. Qed. (* Compatibility *) (* (comp U V) iff (unmark U)=(unmark V) *) Inductive comp : redexes -> redexes -> Prop := | Comp_Var : forall n : nat, comp (Var n) (Var n) | Comp_Fun : forall U V : redexes, comp U V -> comp (Fun U) (Fun V) | Comp_Ap : forall U1 V1 : redexes, comp U1 V1 -> forall U2 V2 : redexes, comp U2 V2 -> forall b1 b2 : bool, comp (Ap b1 U1 U2) (Ap b2 V1 V2). Hint Resolve Comp_Var Comp_Fun Comp_Ap. Lemma comp_refl : forall U : redexes, comp U U. Proof. (* Goal: forall U : redexes, comp U U *) simple induction U; auto. Qed. Lemma comp_sym : forall U V : redexes, comp U V -> comp V U. Proof. (* Goal: forall (U V : redexes) (_ : comp U V), comp V U *) simple induction 1; auto. Qed. Lemma comp_trans : forall U V : redexes, comp U V -> forall (W : redexes) (CVW : comp V W), comp U W. (* Goal: forall (U V : redexes) (_ : comp U V) (W : redexes) (_ : comp V W), comp U W *) simple induction 1; intros; inversion_clear CVW; auto. Qed. Lemma union_defined : forall U V : redexes, comp U V -> exists W : redexes, union U V W. Proof. (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) simple induction 1. (* Goal: forall n : nat, @ex redexes (fun W : redexes => union (Var n) (Var n) W) *) (* Goal: forall (U V : redexes) (_ : comp U V) (_ : @ex redexes (fun W : redexes => union U V W)), @ex redexes (fun W : redexes => union (Fun U) (Fun V) W) *) (* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @ex redexes (fun W : redexes => union U1 V1 W)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @ex redexes (fun W : redexes => union U2 V2 W)) (b1 b2 : bool), @ex redexes (fun W : redexes => union (Ap b1 U1 U2) (Ap b2 V1 V2) W) *) intro n; exists (Var n); apply Union_Var. (* Goal: union (Fun V0) (Fun U0) (Fun W0) *) (* Goal: union (Ap b2 V1 V2) (Ap b1 U1 U2) (Ap (bool_max b1 b2) W1 W2) *) simple induction 2; intros W0 H2; exists (Fun W0); apply Union_Fun; trivial. (* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @ex redexes (fun W : redexes => union U1 V1 W)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @ex redexes (fun W : redexes => union U2 V2 W)) (b1 b2 : bool), @ex redexes (fun W : redexes => union (Ap b1 U1 U2) (Ap b2 V1 V2) W) *) intros U1 V1 H1 E1 U2 V2 H2 E2; elim E1; elim E2. (* Goal: forall (x : redexes) (_ : union U2 V2 x) (x0 : redexes) (_ : union U1 V1 x0) (b1 b2 : bool), @ex redexes (fun W : redexes => union (Ap b1 U1 U2) (Ap b2 V1 V2) W) *) intros W2 A W1 B b1 b2; exists (Ap (bool_max b1 b2) W1 W2). (* Goal: union (Ap b1 U1 U2) (Ap b2 V1 V2) (Ap (bool_max b1 b2) W1 W2) *) apply Union_Ap; trivial. Qed. (* A element of type redexes is said to be regular if its true marks label redexes *) Fixpoint regular (U : redexes) : Prop := match U with | Var n => True | Fun V => regular V | Ap true (Fun _ as V) W => regular V /\ regular W | Ap true _ W => False | Ap false V W => regular V /\ regular W end. Lemma union_preserve_regular : forall U V W : redexes, union U V W -> regular U -> regular V -> regular W. Proof. (* Goal: forall (U V W : redexes) (_ : union U V W) (_ : regular U) (_ : regular V), regular W *) simple induction 1; simpl in |- *; trivial. (* Goal: forall (U1 V1 W1 : redexes) (_ : union U1 V1 W1) (_ : forall (_ : regular U1) (_ : regular V1), regular W1) (U2 V2 W2 : redexes) (_ : union U2 V2 W2) (_ : forall (_ : regular U2) (_ : regular V2), regular W2) (b1 b2 : bool) (_ : if b1 then match U1 with | Var n => False | Fun r => and (regular U1) (regular U2) | Ap b r r0 => False end else and (regular U1) (regular U2)) (_ : if b2 then match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end else and (regular V1) (regular V2)), if bool_max b1 b2 then match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end else and (regular W1) (regular W2) *) simple induction b1; simple induction b2; simpl in |- *. (* Goal: forall (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) generalize H1. (* Goal: forall (_ : forall (_ : regular U1) (_ : regular V1), regular W1) (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) elim H0; try contradiction. (* Goal: forall (U V W : redexes) (_ : union U V W) (_ : forall (_ : forall (_ : regular U) (_ : regular V), regular W) (_ : match U with | Var n => False | Fun r => and (regular U) (regular U2) | Ap b r r0 => False end) (_ : and (regular V) (regular V2)), match W with | Var n => False | Fun r => and (regular W) (regular W2) | Ap b r r0 => False end) (_ : forall (_ : regular (Fun U)) (_ : regular (Fun V)), regular (Fun W)) (_ : and (regular (Fun U)) (regular U2)) (_ : and (regular (Fun V)) (regular V2)), and (regular (Fun W)) (regular W2) *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) intros; elim H7; elim H8; auto. (* Goal: forall (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) generalize H1. (* Goal: forall (_ : forall (_ : regular U1) (_ : regular V1), regular W1) (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) elim H0; try contradiction. (* Goal: forall (U V W : redexes) (_ : union U V W) (_ : forall (_ : forall (_ : regular U) (_ : regular V), regular W) (_ : match U with | Var n => False | Fun r => and (regular U) (regular U2) | Ap b r r0 => False end) (_ : and (regular V) (regular V2)), match W with | Var n => False | Fun r => and (regular W) (regular W2) | Ap b r r0 => False end) (_ : forall (_ : regular (Fun U)) (_ : regular (Fun V)), regular (Fun W)) (_ : and (regular (Fun U)) (regular U2)) (_ : and (regular (Fun V)) (regular V2)), and (regular (Fun W)) (regular W2) *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) intros; elim H7; elim H8; auto. (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) simple induction 1. (* Goal: forall (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) generalize H1. (* Goal: forall (_ : forall (_ : regular U1) (_ : regular V1), regular W1) (_ : regular U1) (_ : regular U2) (_ : match V1 with | Var n => False | Fun r => and (regular V1) (regular V2) | Ap b r r0 => False end), match W1 with | Var n => False | Fun r => and (regular W1) (regular W2) | Ap b r r0 => False end *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) elim H0; try contradiction. (* Goal: forall (U V W : redexes) (_ : union U V W) (_ : forall (_ : forall (_ : regular U) (_ : regular V), regular W) (_ : regular U) (_ : regular U2) (_ : match V with | Var n => False | Fun r => and (regular V) (regular V2) | Ap b r r0 => False end), match W with | Var n => False | Fun r => and (regular W) (regular W2) | Ap b r r0 => False end) (_ : forall (_ : regular (Fun U)) (_ : regular (Fun V)), regular (Fun W)) (_ : regular (Fun U)) (_ : regular U2) (_ : and (regular (Fun V)) (regular V2)), and (regular (Fun W)) (regular W2) *) (* Goal: forall (_ : and (regular U1) (regular U2)) (_ : and (regular V1) (regular V2)), and (regular W1) (regular W2) *) intros; elim H10; auto. (* Goal: forall (U V : redexes) (_ : comp U V), comp V U *) simple induction 1; intros O1 O2; simple induction 1; auto. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (****************************************************************************) (* Cube.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. Require Import Substitution. Require Import Residuals. (*****************) (* Prism Theorem *) (*****************) (* Auxiliary notion : compat Used to generate the right simultaneous induction on U, V and W *) (* (compat U V W) iff U,V,W are compatible markings, and (sub V U) *) Inductive compat : redexes -> redexes -> redexes -> Prop := | Compat_Var : forall n : nat, compat (Var n) (Var n) (Var n) | Compat_Fun : forall U V W : redexes, compat U V W -> compat (Fun U) (Fun V) (Fun W) | Compat_Ap1 : forall U1 V1 W1 : redexes, compat U1 V1 W1 -> forall U2 V2 W2 : redexes, compat U2 V2 W2 -> forall b : bool, compat (Ap false U1 U2) (Ap false V1 V2) (Ap b W1 W2) | Compat_Ap2 : forall U1 V1 W1 : redexes, compat U1 V1 W1 -> forall U2 V2 W2 : redexes, compat U2 V2 W2 -> forall b b' : bool, compat (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) (Ap b' (Fun W1) W2). Lemma compat_intro : forall U W WU : redexes, residuals W U WU -> forall (V WV : redexes) (R2 : residuals W V WV) (S : sub V U), compat U V W. Proof. (* Remark use of name R2 for uniform command below *) simple induction 1; intros; generalize S; inversion_clear R2; intros; inversion_clear S. (* Goal: compat (Var n) (Var n) (Var n) *) (* Goal: compat (Fun V) (Fun V1) (Fun U0) *) (* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *) (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) apply Compat_Var. (* Goal: compat (Fun V) (Fun V1) (Fun U0) *) (* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *) (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) apply Compat_Fun. (* Goal: compat V V1 U0 *) (* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *) (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0; apply H1 with W1; auto. (* Goal: compat (Ap false V1 V2) (Ap false V0 V3) (Ap b U1 U2) *) (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0; apply Compat_Ap1; auto. (* Goal: compat V1 V0 U1 *) (* Goal: compat V2 V3 U2 *) apply H1 with W0; auto. (* Goal: compat V2 V3 U2 *) apply H3 with W3; auto. (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0. (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0; generalize H4; inversion_clear H8. (* Goal: forall _ : residuals (Fun U1) (Fun U4) W0, compat (Ap true (Fun V1) V2) (Ap false (Fun U4) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) intro H11; inversion_clear H11; apply Compat_Ap2; auto. (* Goal: compat V1 U4 U1 *) (* Goal: compat V2 V3 U2 *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) apply H1 with W4; auto. (* Goal: compat V2 V3 U2 *) apply H3 with W3; auto. (* Goal: compat (Ap false V1 V2) (Ap true (Fun V0) V3) (Ap b (Fun U0) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) generalize H4; inversion_clear S0. (* Goal: forall _ : residuals (Fun U1) V0 W0, compat (Ap true (Fun V1) V2) (Ap false V0 V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear H8. (* Goal: forall _ : residuals (Fun U1) (Fun U4) W0, compat (Ap true (Fun V1) V2) (Ap false (Fun U4) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) intro H11; inversion_clear H11; apply Compat_Ap2; auto. (* Goal: compat V1 U4 U1 *) (* Goal: compat V2 V3 U2 *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) apply H1 with W4; auto. (* Goal: compat V2 V3 U2 *) apply H3 with W3; auto. (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0; apply Compat_Ap2; inversion_clear H8; auto. (* Goal: compat V1 V0 U1 *) (* Goal: compat V2 V3 U2 *) apply H1 with W0; auto. (* Goal: compat V2 V3 U2 *) apply H3 with W3; auto. (* Goal: compat (Ap true (Fun V1) V2) (Ap true (Fun V0) V3) (Ap b (Fun U1) U2) *) inversion_clear S0; apply Compat_Ap2; inversion_clear H8; auto. (* Goal: compat V1 V0 U1 *) (* Goal: compat V2 V3 U2 *) apply H1 with W0; auto. (* Goal: compat V2 V3 U2 *) apply H3 with W3; auto. Qed. Lemma prism0 : forall U V W : redexes, compat U V W -> forall (UV : redexes) (R1 : residuals U V UV) (WU WV : redexes) (R2 : residuals W U WU) (R3 : residuals W V WV), residuals WV UV WU. Proof. (* Goal: forall (U V W : redexes) (_ : compat U V W) (UV : redexes) (_ : residuals U V UV) (WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), residuals WV UV WU *) simple induction 1. (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *) (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *) intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto. (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *) (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *) intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto. (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b : bool) (UV : redexes) (_ : residuals (Ap false U1 U2) (Ap false V1 V2) UV) (WU WV : redexes) (_ : residuals (Ap b W1 W2) (Ap false U1 U2) WU) (_ : residuals (Ap b W1 W2) (Ap false V1 V2) WV), residuals WV UV WU *) (* Goal: forall (U1 V1 W1 : redexes) (_ : compat U1 V1 W1) (_ : forall (UV : redexes) (_ : residuals U1 V1 UV) (WU WV : redexes) (_ : residuals W1 U1 WU) (_ : residuals W1 V1 WV), residuals WV UV WU) (U2 V2 W2 : redexes) (_ : compat U2 V2 W2) (_ : forall (UV : redexes) (_ : residuals U2 V2 UV) (WU WV : redexes) (_ : residuals W2 U2 WU) (_ : residuals W2 V2 WV), residuals WV UV WU) (b b' : bool) (UV : redexes) (_ : residuals (Ap true (Fun U1) U2) (Ap b (Fun V1) V2) UV) (WU WV : redexes) (_ : residuals (Ap b' (Fun W1) W2) (Ap true (Fun U1) U2) WU) (_ : residuals (Ap b' (Fun W1) W2) (Ap b (Fun V1) V2) WV), residuals WV UV WU *) intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto. simple induction b; intros; inversion_clear R1; inversion_clear R2; inversion_clear R3; auto. (* Goal: residuals (subst_r W7 W6) (subst_r W3 W0) (subst_r W5 W4) *) (* Goal: residuals (Ap b' W6 W7) (Ap true W0 W3) (subst_r W5 W4) *) apply commutation; auto. (* Goal: residuals (Ap b' W6 W7) (Ap true W0 W3) (subst_r W5 W4) *) inversion_clear H4; inversion_clear H8; auto. Qed. (* Remark - It should be possible to get rid of auxiliary compat and to combine prism0 with compat_intro in one lemma *) (*****************************************************************) (* Theorem prism : (U,V,W:redexes)(sub V U) -> *) (* (UV:redexes)(residuals U V UV) -> *) (* (WV:redexes)(residuals W V WV) -> *) (* (WU:redexes)(residuals W U WU) <-> (residuals WV UV WU). *) (*****************************************************************) Lemma prism1 : forall U V W : redexes, sub V U -> forall UV : redexes, residuals U V UV -> forall WV : redexes, residuals W V WV -> forall WU : redexes, residuals W U WU -> residuals WV UV WU. Proof. (* Goal: forall (U V W : redexes) (_ : sub V U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes) (_ : residuals W U WU), residuals WV UV WU *) intros; apply prism0 with U V W; auto. (* Goal: compat U V W *) apply compat_intro with WU WV; trivial. Qed. (* Converse of prism1 but needs regularity of U *) Lemma prism2 : forall U V W : redexes, sub V U -> regular U -> forall UV : redexes, residuals U V UV -> forall WV : redexes, residuals W V WV -> forall WU : redexes, residuals WV UV WU -> residuals W U WU. Proof. (* Goal: forall (U V W : redexes) (_ : sub V U) (_ : regular U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes) (_ : residuals WV UV WU), residuals W U WU *) intros. (* Goal: residuals W U WU *) elim (residuals_intro W U); trivial. (* Goal: forall (x : redexes) (_ : residuals W U x), residuals W U WU *) (* Goal: comp W U *) intros WU' R; elim (residuals_function WV UV WU) with WU'; trivial. (* Goal: residuals WV UV WU *) (* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *) apply prism1 with U V W; trivial. (* Goal: comp W U *) apply comp_trans with V. (* Goal: comp W V *) (* Goal: regular V *) apply residuals_comp with WV; trivial. (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply comp_sym; apply residuals_comp with UV; trivial. Qed. Theorem prism : forall U V W : redexes, sub V U -> forall UV : redexes, residuals U V UV -> forall WV : redexes, residuals W V WV -> forall WU : redexes, residuals W U WU <-> regular U /\ residuals WV UV WU. Proof. (* Goal: forall (U V W : redexes) (_ : sub V U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes), iff (residuals W U WU) (and (regular U) (residuals WV UV WU)) *) intros; unfold iff in |- *; split. (* Goal: forall _ : residuals W U WU, and (regular U) (residuals WV UV WU) *) (* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *) intro; split. (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply residuals_regular with W WU; trivial. (* Goal: residuals WV UV WU *) (* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *) apply prism1 with U V W; trivial. (* Goal: forall _ : and (regular U) (residuals WV UV WU), residuals W U WU *) simple induction 1; intros; apply prism2 with V UV WV; trivial. Qed. (**************************************************************************) (* Levy's cube lemma : *) (* (U,V,UV,VU:redexes) (residuals U V UV) -> (residuals V U VU) -> *) (* (W,WU,WV,WUV:redexes)(residuals W U WU) -> (residuals WU VU WUV) -> *) (* (residuals W V WV) -> (residuals WV UV WUV). *) (**************************************************************************) Lemma cube : forall U V UV VU : redexes, residuals U V UV -> residuals V U VU -> forall W WU WV WUV : redexes, residuals W U WU -> residuals WU VU WUV -> residuals W V WV -> residuals WV UV WUV. Proof. (* Goal: forall (U V W : redexes) (_ : sub V U) (_ : regular U) (UV : redexes) (_ : residuals U V UV) (WV : redexes) (_ : residuals W V WV) (WU : redexes) (_ : residuals WV UV WU), residuals W U WU *) intros. cut (comp U V). 2: apply residuals_comp with UV; trivial. intro C; elim (union_defined U V C); intros T UVT. apply prism1 with T V W; trivial. apply union_r with U; trivial. apply preservation with U; trivial. apply prism2 with U VU WU; trivial. apply union_l with V; trivial. apply union_preserve_regular with U V; trivial. apply residuals_regular with V VU; trivial. (* Goal: regular V *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply residuals_regular with U UV; trivial. apply preservation with V; trivial. apply union_sym; trivial. Qed. (* 3-dimensional paving diagram *) Lemma paving : forall U V W WU WV : redexes, residuals W U WU -> residuals W V WV -> exists UV : redexes, (exists VU : redexes, (exists WUV : redexes, residuals WU VU WUV /\ residuals WV UV WUV)). Proof. (* Goal: forall (U V W WU WV : redexes) (_ : residuals W U WU) (_ : residuals W V WV), @ex redexes (fun UV : redexes => @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)))) *) intros; elim (residuals_intro U V). (* Goal: forall (x : redexes) (_ : residuals U V x), @ex redexes (fun UV : redexes => @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)))) *) (* Goal: comp U V *) (* Goal: regular V *) intros UV R1; exists UV. (* Goal: @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV))) *) (* Goal: comp U V *) (* Goal: regular V *) elim (residuals_intro V U). (* Goal: forall (x : redexes) (_ : residuals V U x), @ex redexes (fun VU : redexes => @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV))) *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) intros VU R2; exists VU. (* Goal: @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)) *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) elim (residuals_intro WU VU). (* Goal: forall (x : redexes) (_ : residuals WU VU x), @ex redexes (fun WUV : redexes => and (residuals WU VU WUV) (residuals WV UV WUV)) *) (* Goal: comp WU VU *) (* Goal: regular VU *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) intros WUV R3; exists WUV. (* Goal: and (residuals WU VU WUV) (residuals WV UV WUV) *) (* Goal: comp WU VU *) (* Goal: regular VU *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) split; trivial. (* Goal: residuals WV UV WUV *) (* Goal: comp WU VU *) (* Goal: regular VU *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply cube with U V VU W WU; trivial. (* Goal: comp WU VU *) (* Goal: regular VU *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply mutual_residuals_comp with U W V; trivial. (* Goal: regular VU *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply residuals_preserve_regular with V U; trivial. (* Goal: regular V *) (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply residuals_regular with U UV; trivial. (* Goal: comp V U *) (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply comp_sym; apply residuals_comp with UV; trivial. (* Goal: regular U *) (* Goal: comp U V *) (* Goal: regular V *) apply residuals_regular with W WU; trivial. (* Goal: comp U V *) (* Goal: regular V *) apply comp_trans with W. (* Goal: comp U W *) (* Goal: comp W V *) (* Goal: regular V *) apply comp_sym; apply residuals_comp with WU; trivial. (* Goal: comp W V *) (* Goal: regular V *) apply residuals_comp with WV; trivial. (* Goal: regular V *) apply residuals_regular with W WV; trivial. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Conversion.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Terms. Require Import Reduction. Require Import Confluence. Inductive conv1 : lambda -> lambda -> Prop := | red1_conv : forall M N : lambda, red1 M N -> conv1 M N | exp1_conv : forall M N : lambda, red1 N M -> conv1 M N. (* Beta conversion *) Inductive conv : lambda -> lambda -> Prop := | one_step_conv : forall M N : lambda, conv1 M N -> conv M N | refl_conv : forall M : lambda, conv M M | trans_conv : forall M N P : lambda, conv M N -> conv N P -> conv M P. Lemma sym_conv : forall M N : lambda, conv M N -> conv N M. Proof. (* Goal: forall (M N : lambda) (_ : conv M N), @ex lambda (fun P : lambda => and (red M P) (red N P)) *) simple induction 1. (* Goal: forall (M N : lambda) (_ : conv1 M N), conv N M *) (* Goal: forall M : lambda, conv M M *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : conv N M) (_ : conv N P) (_ : conv P N), conv P M *) simple induction 1; intros; apply one_step_conv. (* Goal: conv1 N1 M1 *) (* Goal: conv1 N1 M1 *) (* Goal: forall M : lambda, conv M M *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : conv N M) (_ : conv N P) (_ : conv P N), conv P M *) apply exp1_conv; trivial. (* Goal: conv1 N1 M1 *) (* Goal: forall M : lambda, conv M M *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : conv N M) (_ : conv N P) (_ : conv P N), conv P M *) apply red1_conv; trivial. (* Goal: forall M : lambda, conv M M *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : conv N M) (_ : conv N P) (_ : conv P N), conv P M *) intro; apply refl_conv; trivial. (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : conv N M) (_ : conv N P) (_ : conv P N), conv P M *) intros; apply trans_conv with N0; trivial. Qed. Require Import Confluence. Theorem Church_Rosser : forall M N : lambda, conv M N -> exists P : lambda, red M P /\ red N P. Proof. (* Goal: forall (M N : lambda) (_ : conv M N), @ex lambda (fun P : lambda => and (red M P) (red N P)) *) simple induction 1. (* Goal: forall (M N : lambda) (_ : conv1 M N), @ex lambda (fun P : lambda => and (red M P) (red N P)) *) (* Goal: forall M : lambda, @ex lambda (fun P : lambda => and (red M P) (red M P)) *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : @ex lambda (fun P0 : lambda => and (red M P0) (red N P0))) (_ : conv N P) (_ : @ex lambda (fun P0 : lambda => and (red N P0) (red P P0))), @ex lambda (fun P0 : lambda => and (red M P0) (red P P0)) *) simple induction 1; intros. (* Goal: @ex lambda (fun P : lambda => and (red M1 P) (red N1 P)) *) (* Goal: @ex lambda (fun P : lambda => and (red M1 P) (red N1 P)) *) (* Goal: forall M : lambda, @ex lambda (fun P : lambda => and (red M P) (red M P)) *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : @ex lambda (fun P0 : lambda => and (red M P0) (red N P0))) (_ : conv N P) (_ : @ex lambda (fun P0 : lambda => and (red N P0) (red P P0))), @ex lambda (fun P0 : lambda => and (red M P0) (red P P0)) *) exists N1; split; [ apply one_step_red; trivial | apply refl_red; trivial ]. (* Goal: @ex lambda (fun P : lambda => and (red M1 P) (red N1 P)) *) (* Goal: forall M : lambda, @ex lambda (fun P : lambda => and (red M P) (red M P)) *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : @ex lambda (fun P0 : lambda => and (red M P0) (red N P0))) (_ : conv N P) (_ : @ex lambda (fun P0 : lambda => and (red N P0) (red P P0))), @ex lambda (fun P0 : lambda => and (red M P0) (red P P0)) *) exists M1; split; [ apply refl_red; trivial | apply one_step_red; trivial ]. (* Goal: forall M : lambda, @ex lambda (fun P : lambda => and (red M P) (red M P)) *) (* Goal: forall (M N P : lambda) (_ : conv M N) (_ : @ex lambda (fun P0 : lambda => and (red M P0) (red N P0))) (_ : conv N P) (_ : @ex lambda (fun P0 : lambda => and (red N P0) (red P P0))), @ex lambda (fun P0 : lambda => and (red M P0) (red P P0)) *) intro M0; exists M0; split; apply refl_red; trivial. intros; elim H1; intros P0 C0; elim H3; intros P1 C1; elim C0; elim C1; intros. (* Goal: @ex lambda (fun P0 : lambda => and (red M0 P0) (red P P0)) *) elim confluence_beta_reduction with N0 P0 P1; trivial. (* Goal: forall (x : lambda) (_ : and (red P0 x) (red P1 x)), @ex lambda (fun P0 : lambda => and (red M0 P0) (red P P0)) *) intros Q C3; exists Q; elim C3; split. (* Goal: red M0 Q *) (* Goal: red P Q *) apply trans_red with P0; trivial. (* Goal: red P Q *) apply trans_red with P1; trivial. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (****************************************************************************) (* Substitution.v *) (* *) (* Gerard Huet *) (* *) (****************************************************************************) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. (****************************) (* Substitution of redexes *) (****************************) (* Similar to lift_rec of Terms *) Fixpoint lift_rec_r (L : redexes) : nat -> nat -> redexes := fun k n : nat => match L with | Var i => Var (relocate i k n) | Fun M => Fun (lift_rec_r M (S k) n) | Ap b M N => Ap b (lift_rec_r M k n) (lift_rec_r N k n) end. Definition lift_r (n : nat) (N : redexes) := lift_rec_r N 0 n. Definition insert_Var (N : redexes) (i k : nat) := match compare k i with (* k<i *) | inleft (left _) => Var (pred i) (* k=i *) | inleft _ => lift_r k N (* k>i *) | _ => Var i end. (* Similar to subst_rec of Terms *) Fixpoint subst_rec_r (L : redexes) : redexes -> nat -> redexes := fun (N : redexes) (k : nat) => match L with | Var i => insert_Var N i k | Fun M => Fun (subst_rec_r M N (S k)) | Ap b M M' => Ap b (subst_rec_r M N k) (subst_rec_r M' N k) end. Definition subst_r (N M : redexes) := subst_rec_r M N 0. (* Lifting lemmas *) Lemma lift_le : forall n i k : nat, k <= i -> lift_rec_r (Var i) k n = Var (n + i). Proof. (* Goal: forall (n i k : nat) (_ : gt k i), @eq redexes (lift_rec_r (Var i) k n) (Var i) *) simpl in |- *; unfold relocate in |- *. (* Goal: forall (n i k : nat) (_ : gt k i), @eq redexes (Var (if test k i then Init.Nat.add n i else i)) (Var i) *) intros; elim (test k i); intro P; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add n i)) (Var i) *) absurd (k > i); trivial with arith. (* Goal: not (gt i k) *) (* Goal: gt i k *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) apply le_not_gt; trivial with arith. Qed. Lemma lift_gt : forall n i k : nat, k > i -> lift_rec_r (Var i) k n = Var i. Proof. (* Goal: forall (n i k : nat) (_ : gt k i), @eq redexes (lift_rec_r (Var i) k n) (Var i) *) simpl in |- *; unfold relocate in |- *. (* Goal: forall (n i k : nat) (_ : gt k i), @eq redexes (Var (if test k i then Init.Nat.add n i else i)) (Var i) *) intros; elim (test k i); intro P; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add n i)) (Var i) *) absurd (k > i); trivial with arith. (* Goal: not (gt i k) *) (* Goal: gt i k *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) apply le_not_gt; trivial with arith. Qed. Lemma lift1 : forall (U : redexes) (j i k : nat), lift_rec_r (lift_rec_r U i j) (j + i) k = lift_rec_r U i (j + k). Proof. (* Goal: forall (U : redexes) (n p k i : nat) (_ : le k (Init.Nat.add i n)) (_ : le i k), @eq redexes (lift_rec_r (lift_rec_r U i n) k p) (lift_rec_r U i (Init.Nat.add p n)) *) simple induction U; simpl in |- *; intros. (* Goal: @eq redexes (Var (relocate (relocate n i j) (Init.Nat.add j i) k)) (Var (relocate n i (Init.Nat.add j k))) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) unfold relocate in |- *; elim (test i n); simpl in |- *. (* Goal: forall _ : le i n, @eq redexes (Var (if test (Init.Nat.add j i) (Init.Nat.add j n) then Init.Nat.add k (Init.Nat.add j n) else Init.Nat.add j n)) (Var (Init.Nat.add (Init.Nat.add j k) n)) *) (* Goal: forall _ : gt i n, @eq redexes (Var (if test (Init.Nat.add j i) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) elim (test (j + i) (j + n)); simpl in |- *; intros. (* Goal: @eq redexes (Var (Init.Nat.add k (Init.Nat.add j n))) (Var (Init.Nat.add (Init.Nat.add j k) n)) *) (* Goal: @eq redexes (Var (Init.Nat.add j n)) (Var (Init.Nat.add (Init.Nat.add j k) n)) *) (* Goal: forall _ : gt i n, @eq redexes (Var (if test (Init.Nat.add j i) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) elim plus_permute; elim plus_assoc; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k (Init.Nat.add p n))) (Var (Init.Nat.add k n)) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (i > n); auto with arith. (* Goal: gt i n *) (* Goal: forall _ : gt i n, @eq redexes (Var (if test (Init.Nat.add j i) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) apply plus_gt_reg_l with j; trivial with arith. (* Goal: forall _ : gt i n, @eq redexes (Var (if test (Init.Nat.add j i) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) elim (test (j + i) n); simpl in |- *; intros; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) absurd (i <= n); auto with arith. (* Goal: le i n *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) apply le_trans with (j + i); trivial with arith. (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) j) (S (Init.Nat.add j i)) k)) (Fun (lift_rec_r r (S i) (Init.Nat.add j k))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) rewrite (plus_n_Sm j i); elim H; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) elim H; elim H0; trivial with arith. Qed. Lemma lift_lift_rec : forall (U : redexes) (k p n i : nat), i <= n -> lift_rec_r (lift_rec_r U i p) (p + n) k = lift_rec_r (lift_rec_r U n k) i p. Proof. (* Goal: forall (U : redexes) (n p k i : nat) (_ : le k (Init.Nat.add i n)) (_ : le i k), @eq redexes (lift_rec_r (lift_rec_r U i n) k p) (lift_rec_r U i (Init.Nat.add p n)) *) simple induction U; simpl in |- *; intros. (* Var *) (* Goal: @eq redexes (Var (relocate (relocate n i p) (Init.Nat.add p n0) k)) (Var (relocate (relocate n n0 k) i p)) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) unfold relocate in |- *. (* Goal: @eq redexes (Var (if test (Init.Nat.add p n0) (if test i n then Init.Nat.add p n else n) then Init.Nat.add k (if test i n then Init.Nat.add p n else n) else if test i n then Init.Nat.add p n else n)) (Var (if test i (if test n0 n then Init.Nat.add k n else n) then Init.Nat.add p (if test n0 n then Init.Nat.add k n else n) else if test n0 n then Init.Nat.add k n else n)) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) elim (test n0 n); elim (test i n); simpl in |- *. (* Goal: forall (_ : le i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) elim (test (p + n0) (p + n)); elim (test i (k + n)); simpl in |- *; intros. (* Goal: @eq redexes (Var (Init.Nat.add k (Init.Nat.add p n))) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add k (Init.Nat.add p n))) (Var (Init.Nat.add k n)) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) rewrite plus_permute; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k (Init.Nat.add p n))) (Var (Init.Nat.add k n)) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (i > n); auto with arith. (* Goal: gt i n *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply gt_le_trans with (k + n); trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); auto with arith. (* Goal: gt n0 n *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply plus_gt_reg_l with p; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); auto with arith. (* Goal: gt n0 n *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply plus_gt_reg_l with p; trivial with arith. (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) intros; absurd (i > n); trivial with arith. (* Goal: not (gt i n) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply le_not_gt; apply le_trans with n0; trivial with arith. intros; elim (test (p + n0) (p + n)); simpl in |- *; intros; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); trivial with arith. apply le_not_gt; apply (fun p n m : nat => plus_le_reg_l n m p) with p; trivial with arith. (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) intros; elim (test (p + n0) n); simpl in |- *; intros; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); trivial with arith. (* Goal: not (gt n0 n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply le_not_gt; apply le_trans with (p + n0); trivial with arith. (* Fun *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) rewrite (plus_n_Sm p n); rewrite H; trivial with arith. (* Goal: le (S i) (S n) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) elim (plus_n_Sm k n); auto with arith. (* Ap *) (* Goal: @eq redexes (Fun (lift_rec_r r (S n) O)) (Fun r) *) (* Goal: @eq redexes (Ap b (lift_rec_r r n O) (lift_rec_r r0 n O)) (Ap b r r0) *) rewrite H; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) rewrite H0; trivial with arith. Qed. Lemma lift_lift : forall (U : redexes) (k p n : nat), lift_rec_r (lift_r p U) (p + n) k = lift_r p (lift_rec_r U n k). Proof. (* Goal: forall (U : redexes) (k p n : nat), @eq redexes (lift_rec_r (lift_r p U) (Init.Nat.add p n) k) (lift_r p (lift_rec_r U n k)) *) unfold lift_r in |- *; intros; apply lift_lift_rec; trivial with arith. Qed. Lemma liftrecO : forall (U : redexes) (n : nat), lift_rec_r U n 0 = U. Proof. (* Goal: forall (U : redexes) (n p k i : nat) (_ : le k (Init.Nat.add i n)) (_ : le i k), @eq redexes (lift_rec_r (lift_rec_r U i n) k p) (lift_rec_r U i (Init.Nat.add p n)) *) simple induction U; simpl in |- *; intros. (* Goal: @eq redexes (Var (relocate n n0 O)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r r (S n) O)) (Fun r) *) (* Goal: @eq redexes (Ap b (lift_rec_r r n O) (lift_rec_r r0 n O)) (Ap b r r0) *) unfold relocate in |- *; elim (test n0 n); trivial with arith. (* Goal: @eq redexes (Fun (lift_rec_r r (S n) O)) (Fun r) *) (* Goal: @eq redexes (Ap b (lift_rec_r r n O) (lift_rec_r r0 n O)) (Ap b r r0) *) rewrite H; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) rewrite H; rewrite H0; trivial with arith. Qed. Lemma liftO : forall U : redexes, lift_r 0 U = U. Proof. (* Goal: forall U : redexes, @eq redexes (lift_r O U) U *) unfold lift_r in |- *; intro U; apply liftrecO. Qed. Lemma lift_rec_lift_rec : forall (U : redexes) (n p k i : nat), k <= i + n -> i <= k -> lift_rec_r (lift_rec_r U i n) k p = lift_rec_r U i (p + n). Proof. (* Goal: forall (U : redexes) (n p k i : nat) (_ : le k (Init.Nat.add i n)) (_ : le i k), @eq redexes (lift_rec_r (lift_rec_r U i n) k p) (lift_rec_r U i (Init.Nat.add p n)) *) simple induction U; simpl in |- *; intros. (* Var *) (* Goal: @eq redexes (Var (relocate (relocate n i n0) k p)) (Var (relocate n i (Init.Nat.add p n0))) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) unfold relocate in |- *; elim (test i n); intro P. (* Goal: @eq redexes (Var (if test k (Init.Nat.add n0 n) then Init.Nat.add p (Init.Nat.add n0 n) else Init.Nat.add n0 n)) (Var (Init.Nat.add (Init.Nat.add p n0) n)) *) (* Goal: @eq redexes (Var (if test k n then Init.Nat.add p n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) elim (test k (n0 + n)); intro Q. (* Goal: @eq redexes (Var (Init.Nat.add p (Init.Nat.add n0 n))) (Var (Init.Nat.add (Init.Nat.add p n0) n)) *) (* Goal: @eq redexes (Var (Init.Nat.add n0 n)) (Var (Init.Nat.add (Init.Nat.add p n0) n)) *) (* Goal: @eq redexes (Var (if test k n then Init.Nat.add p n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) rewrite plus_assoc_reverse; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add n0 n)) (Var (Init.Nat.add (Init.Nat.add p n0) n)) *) (* Goal: @eq redexes (Var (if test k n then Init.Nat.add p n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) absurd (k > n0 + n); trivial with arith. (* Goal: not (gt k (Init.Nat.add n0 n)) *) (* Goal: @eq redexes (Var (if test k n then Init.Nat.add p n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) apply le_not_gt; apply le_trans with (i + n0); trivial with arith. replace (i + n0) with (n0 + i); auto with arith; apply plus_le_compat_l; trivial with arith. (* Goal: @eq redexes (Var (if test k n then Init.Nat.add p n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) elim (test k n); intro Q; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) absurd (i > k). (* Goal: not (gt i k) *) (* Goal: gt i k *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) apply le_not_gt; trivial with arith. (* Goal: gt i k *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) n) (S k) p)) (Fun (lift_rec_r r (S i) (Init.Nat.add p n))) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i n) k p) (lift_rec_r (lift_rec_r r0 i n) k p)) (Ap b (lift_rec_r r i (Init.Nat.add p n)) (lift_rec_r r0 i (Init.Nat.add p n))) *) apply gt_le_trans with n; trivial with arith. (* Fun *) rewrite H; trivial with arith; simpl in |- *; apply le_n_S; trivial with arith. (* Ap *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) rewrite H; trivial with arith; rewrite H0; trivial with arith. Qed. Lemma lift_rec_lift : forall (U : redexes) (n p k i : nat), k <= n -> lift_rec_r (lift_r n U) k p = lift_r (p + n) U. Proof. (* Goal: forall (U : redexes) (n p k _ : nat) (_ : le k n), @eq redexes (lift_rec_r (lift_r n U) k p) (lift_r (Init.Nat.add p n) U) *) unfold lift_r in |- *; intros; rewrite lift_rec_lift_rec; trivial with arith. Qed. (* The three cases of substitution of U for (Var n) *) Lemma subst_eq : forall (U : redexes) (n : nat), subst_rec_r (Var n) U n = lift_r n U. Proof. (* Goal: forall (U : redexes) (n p : nat) (_ : gt p n), @eq redexes (subst_rec_r (Var n) U p) (Var n) *) simpl in |- *; unfold insert_Var in |- *. (* Goal: forall (U : redexes) (n : nat), @eq redexes match compare n n with | inleft (left l as s) => Var (Init.Nat.pred n) | inleft (right e as s) => lift_r n U | inright g => Var n end (lift_r n U) *) intros; elim (compare n n); intro P. (* Goal: @eq redexes (if P then Var (Init.Nat.pred n) else lift_r n U) (lift_r n U) *) (* Goal: @eq redexes (Var n) (lift_r n U) *) elim P; intro Q; simpl in |- *; trivial with arith. (* Goal: @eq redexes (Var n) (lift_r n U) *) absurd (n > n); trivial with arith. (* Goal: @eq redexes (Var n) (lift_r n U) *) absurd (n > n); trivial with arith. Qed. Lemma subst_gt : forall (U : redexes) (n p : nat), n > p -> subst_rec_r (Var n) U p = Var (pred n). Proof. (* Goal: forall (U : redexes) (n p : nat) (_ : gt p n), @eq redexes (subst_rec_r (Var n) U p) (Var n) *) simpl in |- *; unfold insert_Var in |- *. (* Goal: forall (U : redexes) (n p : nat) (_ : gt n p), @eq redexes match compare p n with | inleft (left l as s) => Var (Init.Nat.pred n) | inleft (right e as s) => lift_r p U | inright g => Var n end (Var (Init.Nat.pred n)) *) intros; elim (compare p n); intro P. (* Goal: @eq redexes (if P then Var (Init.Nat.pred n) else lift_r p U) (Var (Init.Nat.pred n)) *) (* Goal: @eq redexes (Var n) (Var (Init.Nat.pred n)) *) elim P; intro Q; trivial with arith. (* Goal: @eq redexes (lift_r p U) (Var (Init.Nat.pred n)) *) (* Goal: @eq redexes (Var n) (Var (Init.Nat.pred n)) *) absurd (n > p); trivial with arith; rewrite Q; trivial with arith. (* Goal: @eq redexes (Var n) (Var (Init.Nat.pred n)) *) absurd (n > p); auto with arith. Qed. Lemma subst_lt : forall (U : redexes) (n p : nat), p > n -> subst_rec_r (Var n) U p = Var n. Proof. (* Goal: forall (U : redexes) (n p : nat) (_ : gt p n), @eq redexes (subst_rec_r (Var n) U p) (Var n) *) simpl in |- *; unfold insert_Var in |- *. (* Goal: forall (U : redexes) (n p : nat) (_ : gt p n), @eq redexes match compare p n with | inleft (left l as s) => Var (Init.Nat.pred n) | inleft (right e as s) => lift_r p U | inright g => Var n end (Var n) *) intros; elim (compare p n); intro P; trivial with arith. (* Goal: @eq redexes (if P then Var (Init.Nat.pred n) else lift_r p U) (Var n) *) absurd (p > n); trivial with arith; elim P; intro Q; auto with arith. (* Goal: not (gt p n) *) rewrite Q; trivial with arith. Qed. (* Substitution lemma *) Lemma lift_rec_subst_rec : forall (U V : redexes) (k p n : nat), lift_rec_r (subst_rec_r V U p) (p + n) k = subst_rec_r (lift_rec_r V (S (p + n)) k) (lift_rec_r U n k) p. Proof. simple induction V. (* 2 Fun *) 2: simpl in |- *; intros; replace (S (p + n)) with (S p + n); trivial with arith. 2: elim H; trivial with arith. (* 3 Ap *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) 2: simpl in |- *; intros; elim H; elim H0; trivial with arith. (* 1 Var *) intros; simpl in |- *. unfold insert_Var, relocate in |- *. elim (compare p n); intro P. (* 1.1 P : {(gt n p)}+{p=n} *) elim P; intro P1. (* 1.1.1 P1 : (gt n p) *) cut (n = S (pred n)). 2: apply S_pred with p; trivial with arith. intro E; elim (test (S (p + n0)) n); intro Q. (* 1.1.1.1 Q : (le (S (plus p n0)) n) *) elim (compare p (k + n)); intro R. (* 1.1.1.1.1 R : {(lt p (plus k n))}+{p=(plus k n)} *) elim R; intro R1; simpl in |- *. (* 1.1.1.1.1.1 R1 : (lt p (plus k n)) *) (* Goal: @eq redexes (Var (relocate (relocate n i p) (Init.Nat.add p n0) k)) (Var (relocate (relocate n n0 k) i p)) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) unfold relocate in |- *. rewrite E; simpl in |- *. elim (test (p + n0) (pred n)); intro S. elim (plus_n_Sm k (pred n)); simpl in |- *; trivial with arith. absurd (p + n0 > pred n); trivial with arith. apply le_not_gt; apply le_S_n; elim E; trivial with arith. (* 1.1.1.1.1.2 R1 : p=(plus k n) *) absurd (n > p); trivial with arith. apply le_not_gt; rewrite R1; trivial with arith. (* 1.1.1.1.2 R : (gt p (plus k n)) *) absurd (p > n); auto with arith. (* Goal: gt i n *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add p (Init.Nat.add k n))) *) (* Goal: @eq redexes (Var (Init.Nat.add p n)) (Var (Init.Nat.add k n)) *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply gt_le_trans with (k + n); trivial with arith. (* 1.1.1.2 Q : (gt (S (plus p n0)) n) *) (* Goal: forall (n i k : nat) (_ : gt k i), @eq redexes (lift_rec_r (Var i) k n) (Var i) *) simpl in |- *; unfold relocate in |- *. elim (compare p n); intro R. (* 1.1.1.2.1 R : {(lt p n)}+{p=n} *) elim R; intro R1. (* 1.1.1.2.1.1 R1 : (lt p n) *) elim (test (p + n0) (pred n)); intro C. absurd (S (p + n0) > n); trivial with arith. apply le_not_gt; rewrite E; auto with arith. trivial with arith. (* 1.1.1.2.1.2 R1 : p=n *) absurd (n > p); trivial with arith. rewrite R1; trivial with arith. (* 1.1.1.2.2 R : (gt p n) *) (* Goal: @eq redexes (Var n) (Var (Init.Nat.pred n)) *) absurd (n > p); auto with arith. (* 1.1.2 P1 : p=n *) rewrite P1. elim (test (S (n + n0)) n); intro Q. (* 1.1.2.1 Q : (le (S (plus n n0)) n) *) absurd (S (n + n0) <= n); auto with arith. (* 1.1.2.2 Q : (gt (S (plus n n0)) n) *) elim (compare n n); intro R. (* 1.1.2.2.1 R : {(lt n n)}+{n=n} *) elim R; intro R1. (* 1.1.2.2.1.1 R1 : (lt n n) *) absurd (n < n); trivial with arith. (* 1.1.2.2.1.2 R1 : n=n *) apply lift_lift; trivial with arith. (* 1.1.2.2.2 R : (gt n n) *) (* Goal: @eq redexes (Var n) (lift_r n U) *) absurd (n > n); trivial with arith. (* 1.2 P : (gt p n) *) elim (test (S (p + n0)) n); intro Q. (* 1.2.1 Q : (le (S (plus p n0)) n) *) (* Goal: @eq redexes (Var n) (Var (Init.Nat.pred n)) *) absurd (n > p); auto with arith. apply gt_le_trans with (p + n0); auto with arith. (* 1.2.2 Q : (gt (S (plus p n0)) n) *) elim (compare p n); intro R. (* 1.2.2.1 R : {(lt p n)}+{p=n} *) elim R; intro R1. (* 1.2.2.1.1 R1 : (lt p n) *) absurd (p > n); auto with arith. (* 1.2.2.1.2 R1 : p=n *) absurd (p > n); trivial with arith. rewrite R1; trivial with arith. (* 1.2.2.2 R : (gt p n) *) apply lift_gt. apply le_gt_trans with p; trivial with arith. Qed. Lemma lift_subst : forall (U V : redexes) (k n : nat), lift_rec_r (subst_r U V) n k = subst_r (lift_rec_r U n k) (lift_rec_r V (S n) k). Proof. (* Goal: forall (U V : redexes) (k n : nat), @eq redexes (lift_rec_r (subst_r U V) n k) (subst_r (lift_rec_r U n k) (lift_rec_r V (S n) k)) *) unfold subst_r in |- *; intros. (* Goal: @eq redexes (lift_rec_r (subst_rec_r V U O) n k) (subst_rec_r (lift_rec_r V (S n) k) (lift_rec_r U n k) O) *) replace (S n) with (S (0 + n)). elim lift_rec_subst_rec; trivial with arith. simpl in |- *; trivial with arith. Qed. Lemma subst_rec_lift_rec1 : forall (U V : redexes) (n p k : nat), k <= n -> subst_rec_r (lift_rec_r U k p) V (p + n) = lift_rec_r (subst_rec_r U V n) k p. Proof. simple induction U; intros; simpl in |- *. (* Goal: @eq redexes (Fun (lift_rec_r r (S n) O)) (Fun r) *) (* Goal: @eq redexes (Ap b (lift_rec_r r n O) (lift_rec_r r0 n O)) (Ap b r r0) *) 2: rewrite plus_n_Sm; rewrite H; trivial with arith. 2: apply le_n_S; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) 2: rewrite H; trivial with arith; rewrite H0; trivial with arith. unfold relocate, insert_Var in |- *; elim (test k n); intro P. (* 1 P : (le k n) *) elim (compare n0 n); elim (compare (p + n0) (p + n)); intros Q R. (* 1.1 Q : {(lt (plus p n0) (plus p n))}+{(plus p n0)=(plus p n)} R : {(lt n0 n)}+{n0=n} *) elim Q; elim R; intros R1 Q1. cut (n = S (pred n)). 2: apply S_pred with n0; trivial with arith. intro E; rewrite lift_le. rewrite E; elim plus_n_Sm; simpl in |- *; trivial with arith. apply le_trans with n0; trivial with arith. apply gt_S_le; elim E; trivial with arith. absurd (n > n0). rewrite R1; trivial with arith. (* Goal: gt n0 n *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply plus_gt_reg_l with p; trivial with arith. absurd (p + n > p + n0); auto with arith. apply le_not_gt; rewrite Q1; trivial with arith. rewrite lift_rec_lift; trivial with arith. (* 1.2 Q : (gt (plus p n0) (plus p n)) R : {(lt n0 n)}+{n0=n} *) absurd (n0 > n). apply le_not_gt; elim R; intro S. apply gt_S_le; apply gt_trans with n; trivial with arith. rewrite S; trivial with arith. (* Goal: gt n0 n *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply plus_gt_reg_l with p; trivial with arith. elim Q; intro S. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); trivial with arith. (* Goal: gt n0 n *) (* Goal: forall (_ : gt i n) (_ : le n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var (if test i (Init.Nat.add k n) then Init.Nat.add p (Init.Nat.add k n) else Init.Nat.add k n)) *) (* Goal: forall (_ : le i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) (Init.Nat.add p n) then Init.Nat.add k (Init.Nat.add p n) else Init.Nat.add p n)) (Var (Init.Nat.add p n)) *) (* Goal: forall (_ : gt i n) (_ : gt n0 n), @eq redexes (Var (if test (Init.Nat.add p n0) n then Init.Nat.add k n else n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) apply gt_asym; apply plus_gt_reg_l with p; trivial with arith. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); trivial with arith. apply le_not_gt; replace n0 with n; trivial with arith. apply plus_reg_l with p; auto with arith. rewrite lift_le; trivial with arith. (* 2 P : (gt k n) *) elim (compare n0 n); intro Q. (* 2.1 Q : {(lt n0 n)}+{n0=n} *) absurd (n0 > n). apply le_not_gt; elim Q; intro R. apply gt_S_le; apply gt_trans with n; trivial with arith. rewrite R; trivial with arith. apply le_gt_trans with k; trivial with arith. (* 2.2 Q : (gt n0 n) *) elim (compare (p + n0) n); intro R. (* Goal: @eq redexes (Var (Init.Nat.add k n)) (Var n) *) (* Goal: @eq redexes (Fun (lift_rec_r (lift_rec_r r (S i) p) (S (Init.Nat.add p n)) k)) (Fun (lift_rec_r (lift_rec_r r (S n) k) (S i) p)) *) (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i p) (Init.Nat.add p n) k) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) absurd (n0 > n); trivial with arith. apply le_not_gt; elim R; intro S. apply le_trans with (p + n0); trivial with arith. apply gt_S_le; apply gt_trans with n; trivial with arith. elim S; trivial with arith. rewrite lift_gt; trivial with arith. Qed. Lemma subst_rec_lift1 : forall (U V : redexes) (n p : nat), subst_rec_r (lift_r p U) V (p + n) = lift_r p (subst_rec_r U V n). Proof. unfold lift_r in |- *; intros; rewrite subst_rec_lift_rec1; trivial with arith. Qed. Lemma subst_rec_lift_rec : forall (U V : redexes) (p q n : nat), q <= p + n -> n <= q -> subst_rec_r (lift_rec_r U n (S p)) V q = lift_rec_r U n p. Proof. simple induction U; intros; simpl in |- *. (* Goal: @eq redexes (Fun (lift_rec_r r (S n) O)) (Fun r) *) (* Goal: @eq redexes (Ap b (lift_rec_r r n O) (lift_rec_r r0 n O)) (Ap b r r0) *) 2: rewrite H; trivial with arith. 2: elim plus_n_Sm; simpl in |- *; apply le_n_S; trivial with arith. 2: apply le_n_S; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 i p) (Init.Nat.add p n) k)) (Ap b (lift_rec_r (lift_rec_r r n k) i p) (lift_rec_r (lift_rec_r r0 n k) i p)) *) 2: rewrite H; trivial with arith; rewrite H0; trivial with arith. unfold insert_Var, relocate in |- *; simpl in |- *. elim (test n0 n); intro P. (* 1 P : (le n0 n) *) elim (compare q (S (p + n))); intro Q. (* 1.1 Q : {(lt q (S (plus p n)))}+{q=(S (plus p n))} *) elim Q; intro Q1; simpl in |- *; trivial with arith. (* 1.1.1 Q1 : q=(S (plus p n)) *) absurd (q <= p + n0); trivial with arith; rewrite Q1; auto with arith. (* 1.1.2 Q1 : (gt q (S (plus p n))) *) absurd (q > S (p + n)); trivial with arith. apply le_not_gt; apply le_trans with (p + n); trivial with arith. apply le_trans with (p + n0); auto with arith. (* 2 P : (gt n0 n) *) elim (compare q n); intro Q; trivial with arith. (* 2.1 Q : {(lt n q)}+{q=n} *) elim Q; intro Q1; simpl in |- *; trivial with arith. (* 2.1.1 Q1 : (lt n q) *) absurd (n0 > q); auto with arith. apply gt_trans with n; trivial with arith. (* 2.1.2 Q1 : q=n *) absurd (n0 > q); auto with arith. rewrite Q1; trivial with arith. Qed. Lemma subst_rec_lift : forall (U V : redexes) (p q : nat), q <= p -> subst_rec_r (lift_r (S p) U) V q = lift_r p U. Proof. unfold lift_r in |- *; intros; rewrite subst_rec_lift_rec; trivial with arith. elim plus_n_O; trivial with arith. Qed. (* subst_rec_subst_rec *) Lemma subst_rec_subst_rec : forall (U V W : redexes) (n p : nat), subst_rec_r (subst_rec_r V U p) W (p + n) = subst_rec_r (subst_rec_r V W (S (p + n))) (subst_rec_r U W n) p. Proof. simple induction V. 2: simpl in |- *; intros; replace (S (p + n)) with (S p + n); trivial with arith. 2: elim H; trivial with arith. (* Goal: @eq redexes (Ap b (lift_rec_r (lift_rec_r r i j) (Init.Nat.add j i) k) (lift_rec_r (lift_rec_r r0 i j) (Init.Nat.add j i) k)) (Ap b (lift_rec_r r i (Init.Nat.add j k)) (lift_rec_r r0 i (Init.Nat.add j k))) *) 2: simpl in |- *; intros; elim H; elim H0; trivial with arith. unfold subst_rec_r at 2 4 in |- *; unfold insert_Var in |- *. intros n W i p; elim (compare p n); intro C. (* 1.1 C : {(lt p n)}+{p=n} *) elim C; intro D. (* 1.1.1 D : (lt p n) *) elim (compare (S (p + i)) n); intro P. (* 1.1.1.1 P : {(lt (S (plus p i)) n)}+{(S (plus p i))=n} *) elim P; intro P1. (* 1.1.1.1.1 P1 : (lt (S (plus p i)) n) *) rewrite subst_gt; auto with arith. rewrite subst_gt; auto with arith. apply gt_pred; apply gt_le_trans with (S (p + i)); auto with arith. (* 1.1.1.1.2 P1 : (S (plus p i))=n *) rewrite (subst_rec_lift W (subst_rec_r U W i) (p + i) p (le_plus_l p i)). replace (pred n) with (p + i). apply subst_eq. elim P1; simpl in |- *; trivial with arith. (* 1.1.1.1 P : (gt (S (plus p i)) n) *) rewrite subst_lt; trivial with arith. rewrite subst_gt; trivial with arith. apply gt_S_n; replace (S (pred n)) with n; trivial with arith. apply S_pred with p; trivial with arith. (* 1.1.2 D : p=n *) rewrite D; elim (compare (S (n + i)) n); intro P. (* 1.1.2.1 P : {(lt (S (plus n i)) n)}+{(S (plus n i))=n} *) absurd (n + i < n); auto with arith. elim P; intro Q. apply lt_trans with (S (n + i)); trivial with arith. (* Goal: not (gt p n) *) apply lt_S_n; rewrite Q; trivial with arith. (* 1.1.2.2 P : (gt (S (plus n i)) n) *) rewrite subst_eq. apply subst_rec_lift1. (* 1.2 C : (gt p n) *) rewrite subst_lt. elim (compare (S (p + i)) n); intro P. (* 1.2.1 P : {(lt (S (plus p i)) n)}+{(S (plus p i))=n} *) absurd (n < p); trivial with arith. apply lt_asym; elim P; intro Q. apply lt_trans with (S (p + i)); auto with arith. elim Q. apply le_lt_n_Sm; apply le_plus_l. (* 1.2.2 P : (gt (S (plus p i)) n) *) rewrite subst_lt; trivial with arith. apply le_gt_trans with p; trivial with arith. Qed. Lemma subst_rec_subst_0 : forall (U V W : redexes) (n : nat), subst_rec_r (subst_rec_r V U 0) W n = subst_rec_r (subst_rec_r V W (S n)) (subst_rec_r U W n) 0. Proof. (* Goal: forall (U V W : redexes) (n : nat), @eq redexes (subst_rec_r (subst_rec_r V U O) W n) (subst_rec_r (subst_rec_r V W (S n)) (subst_rec_r U W n) O) *) intros; pattern n at 1 3 in |- *. (* Goal: (fun n0 : nat => @eq redexes (subst_rec_r (subst_rec_r V U O) W n0) (subst_rec_r (subst_rec_r V W (S n)) (subst_rec_r U W n0) O)) n *) replace n with (0 + n). rewrite (subst_rec_subst_rec U V W n 0); trivial with arith. simpl in |- *; trivial with arith. Qed. (**************************) (* The Substitution Lemma *) (**************************) Lemma substitution : forall (U V W : redexes) (n : nat), subst_rec_r (subst_r U V) W n = subst_r (subst_rec_r U W n) (subst_rec_r V W (S n)). Proof. unfold subst_r in |- *; intros; apply subst_rec_subst_0; trivial with arith. Qed. (* Substitution preserves compatibility *) Lemma lift_rec_preserve_comp : forall U1 V1 : redexes, comp U1 V1 -> forall n m : nat, comp (lift_rec_r U1 m n) (lift_rec_r V1 m n). Proof. (* Goal: forall (U1 V1 U2 V2 : redexes) (_ : comp U1 V1) (_ : comp U2 V2) (n : nat), comp (subst_rec_r U1 U2 n) (subst_rec_r V1 V2 n) *) simple induction 1; simpl in |- *; auto with arith. Qed. Lemma subst_rec_preserve_comp : forall U1 V1 U2 V2 : redexes, comp U1 V1 -> comp U2 V2 -> forall n : nat, comp (subst_rec_r U1 U2 n) (subst_rec_r V1 V2 n). Proof. (* Goal: forall (U1 V1 U2 V2 : redexes) (_ : comp U1 V1) (_ : comp U2 V2) (n : nat), comp (subst_rec_r U1 U2 n) (subst_rec_r V1 V2 n) *) simple induction 1; simpl in |- *; auto with arith. intros n C n0; unfold insert_Var in |- *; elim (compare n0 n); trivial with arith. simple induction a; trivial with arith. intro; unfold lift_r in |- *; apply lift_rec_preserve_comp; trivial with arith. Qed. Lemma subst_preserve_comp : forall U1 V1 U2 V2 : redexes, comp U1 V1 -> comp U2 V2 -> comp (subst_r U2 U1) (subst_r V2 V1). Proof. intros; unfold subst_r in |- *; apply subst_rec_preserve_comp; trivial with arith. Qed. (* Substitution preserves regularity *) Lemma lift_rec_preserve_regular : forall U : redexes, regular U -> forall n m : nat, regular (lift_rec_r U m n). Proof. (* Goal: forall (U : redexes) (_ : regular U) (n m : nat), regular (lift_rec_r U m n) *) simple induction U; simpl in |- *; auto with arith. (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : if b then match r with | Var n => False | Fun r1 => and (regular r) (regular r0) | Ap b0 r1 r2 => False end else and (regular r) (regular r0)) (_ : regular V) (n : nat), if b then match subst_rec_r r V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) | Ap b0 r1 r2 => False end else and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) *) simple induction b; simple induction r; try contradiction. (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : match r with | Var n => False | Fun r1 => and (regular r) (regular r0) | Ap b r1 r2 => False end) (_ : regular V) (n : nat), match subst_rec_r r V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) | Ap b r1 r2 => False end) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), match subst_rec_r (Fun r) V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) | Ap b r1 r2 => False end *) (* Goal: forall (n : nat) (_ : forall (_ : regular (Var n)) (_ : regular V) (n0 : nat), regular (subst_rec_r (Var n) V n0)) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n0 : nat), regular (subst_rec_r r V n0)) (_ : and (regular (Var n)) (regular r)) (_ : regular V) (n0 : nat), and (regular (subst_rec_r (Var n) V n0)) (regular (subst_rec_r r V n0)) *) (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) simpl in |- *; intros; elim H2; auto with arith. (* Goal: forall (n : nat) (_ : forall (_ : regular (Var n)) (_ : regular V) (n0 : nat), regular (subst_rec_r (Var n) V n0)) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n0 : nat), regular (subst_rec_r r V n0)) (_ : and (regular (Var n)) (regular r)) (_ : regular V) (n0 : nat), and (regular (subst_rec_r (Var n) V n0)) (regular (subst_rec_r r V n0)) *) (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H1; auto with arith. (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H2; auto with arith. (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H3; auto with arith. Qed. Lemma subst_rec_preserve_regular : forall U V : redexes, regular U -> regular V -> forall n : nat, regular (subst_rec_r U V n). Proof. (* Goal: forall (U V : redexes) (_ : regular U) (_ : regular V) (n : nat), regular (subst_rec_r U V n) *) intros U V; elim U; simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : True) (_ : regular V) (n0 : nat), regular (insert_Var V n n0) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : if b then match r with | Var n => False | Fun r1 => and (regular r) (regular r0) | Ap b0 r1 r2 => False end else and (regular r) (regular r0)) (_ : regular V) (n : nat), if b then match subst_rec_r r V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) | Ap b0 r1 r2 => False end else and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) *) intros; unfold insert_Var in |- *; elim (compare n0 n). simple induction a; simpl in |- *; trivial with arith. intro; unfold lift_r in |- *; apply lift_rec_preserve_regular; trivial with arith. simpl in |- *; trivial with arith. (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : if b then match r with | Var n => False | Fun r1 => and (regular r) (regular r0) | Ap b0 r1 r2 => False end else and (regular r) (regular r0)) (_ : regular V) (n : nat), if b then match subst_rec_r r V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) | Ap b0 r1 r2 => False end else and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) *) simple induction b; simple induction r; try contradiction. (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : match r with | Var n => False | Fun r1 => and (regular r) (regular r0) | Ap b r1 r2 => False end) (_ : regular V) (n : nat), match subst_rec_r r V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n)) | Ap b r1 r2 => False end) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), match subst_rec_r (Fun r) V n with | Var n0 => False | Fun r1 => and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) | Ap b r1 r2 => False end *) (* Goal: forall (n : nat) (_ : forall (_ : regular (Var n)) (_ : regular V) (n0 : nat), regular (subst_rec_r (Var n) V n0)) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n0 : nat), regular (subst_rec_r r V n0)) (_ : and (regular (Var n)) (regular r)) (_ : regular V) (n0 : nat), and (regular (subst_rec_r (Var n) V n0)) (regular (subst_rec_r r V n0)) *) (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) simpl in |- *; intros; elim H2; auto with arith. (* Goal: forall (n : nat) (_ : forall (_ : regular (Var n)) (_ : regular V) (n0 : nat), regular (subst_rec_r (Var n) V n0)) (r : redexes) (_ : forall (_ : regular r) (_ : regular V) (n0 : nat), regular (subst_rec_r r V n0)) (_ : and (regular (Var n)) (regular r)) (_ : regular V) (n0 : nat), and (regular (subst_rec_r (Var n) V n0)) (regular (subst_rec_r r V n0)) *) (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H1; auto with arith. (* Goal: forall (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (_ : forall (_ : regular (Fun r)) (_ : regular V) (n : nat), regular (subst_rec_r (Fun r) V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular (Fun r)) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Fun r) V n)) (regular (subst_rec_r r0 V n)) *) (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H2; auto with arith. (* Goal: forall (b : bool) (r : redexes) (_ : forall (_ : forall (_ : regular r) (_ : regular V) (n : nat), regular (subst_rec_r r V n)) (r0 : redexes) (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (_ : and (regular r) (regular r0)) (_ : regular V) (n : nat), and (regular (subst_rec_r r V n)) (regular (subst_rec_r r0 V n))) (r0 : redexes) (_ : forall (_ : forall (_ : regular r0) (_ : regular V) (n : nat), regular (subst_rec_r r0 V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular r0) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r r0 V n)) (regular (subst_rec_r r1 V n))) (_ : forall (_ : regular (Ap b r r0)) (_ : regular V) (n : nat), regular (subst_rec_r (Ap b r r0) V n)) (r1 : redexes) (_ : forall (_ : regular r1) (_ : regular V) (n : nat), regular (subst_rec_r r1 V n)) (_ : and (regular (Ap b r r0)) (regular r1)) (_ : regular V) (n : nat), and (regular (subst_rec_r (Ap b r r0) V n)) (regular (subst_rec_r r1 V n)) *) intros; elim H3; auto with arith. Qed. Lemma subst_preserve_regular : forall U V : redexes, regular U -> regular V -> regular (subst_r U V). Proof. unfold subst_r in |- *; intros; apply subst_rec_preserve_regular; trivial with arith. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Simulation.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) (* Reduction of a term by a set of redexes *) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. Require Import Marks. Require Import Substitution. Require Import Residuals. (* Commuting mark and subst *) Lemma mark_lift_rec : forall (M : lambda) (n k : nat), lift_rec_r (mark M) k n = mark (lift_rec M k n). Proof. (* Goal: forall (N M : lambda) (n : nat), @eq redexes (subst_rec_r (mark M) (mark N) n) (mark (subst_rec M N n)) *) simple induction M; simpl in |- *; intros. (* Goal: @eq redexes (Var (relocate n k n0)) (Var (relocate n k n0)) *) (* Goal: @eq redexes (Fun (lift_rec_r (mark l) (S k) n)) (Fun (mark (lift_rec l (S k) n))) *) (* Goal: @eq redexes (Ap false (lift_rec_r (mark l) k n) (lift_rec_r (mark l0) k n)) (Ap false (mark (lift_rec l k n)) (mark (lift_rec l0 k n))) *) elim (test k n); simpl in |- *; intros; trivial. (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; trivial. (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; elim H0; trivial. Qed. Lemma mark_lift : forall (M : lambda) (n : nat), lift_r n (mark M) = mark (lift n M). Proof. (* Goal: forall (M : lambda) (n : nat), @eq redexes (lift_r n (mark M)) (mark (lift n M)) *) unfold lift in |- *; unfold lift_r in |- *; intros; apply mark_lift_rec. Qed. Lemma mark_subst_rec : forall (N M : lambda) (n : nat), subst_rec_r (mark M) (mark N) n = mark (subst_rec M N n). Proof. (* Goal: forall (N M : lambda) (n : nat), @eq redexes (subst_rec_r (mark M) (mark N) n) (mark (subst_rec M N n)) *) simple induction M; simpl in |- *; intros. (* Goal: @eq lambda (insert_Ref (unmark V) n n0) (unmark (insert_Var V n n0)) *) (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) unfold insert_Var, insert_Ref in |- *. (* Goal: @eq redexes match compare n0 n with | inleft (left l as s) => Var (Init.Nat.pred n) | inleft (right e as s) => lift_r n0 (mark N) | inright g => Var n end (mark match compare n0 n with | inleft (left l as s) => Ref (Init.Nat.pred n) | inleft (right e as s) => lift n0 N | inright g => Ref n end) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) elim (compare n0 n); intro H. (* Goal: @eq redexes (if H then Var (Init.Nat.pred n) else lift_r n0 (mark N)) (mark (if H then Ref (Init.Nat.pred n) else lift n0 N)) *) (* Goal: @eq redexes (Var n) (mark (Ref n)) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) elim H; intro H'. (* Goal: @eq redexes (Var n) (mark (Ref n)) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) simpl in |- *; trivial. (* Goal: @eq redexes (lift_r n0 (mark N)) (mark (lift n0 N)) *) (* Goal: @eq redexes (Var n) (mark (Ref n)) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) rewrite (mark_lift N n0); trivial. (* Goal: @eq redexes (Var n) (mark (Ref n)) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) simpl in |- *; trivial. (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; trivial. (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; elim H0; trivial. Qed. Lemma mark_subst : forall M N : lambda, subst_r (mark M) (mark N) = mark (subst M N). Proof. (* Goal: forall M N : lambda, @eq redexes (subst_r (mark M) (mark N)) (mark (subst M N)) *) unfold subst in |- *; unfold subst_r in |- *; intros; apply mark_subst_rec. Qed. (* residuals simulates par_red1 *) Lemma simulation : forall M M' : lambda, par_red1 M M' -> exists V : redexes, residuals (mark M) V (mark M'). Proof. (* Goal: forall (M M' : lambda) (_ : par_red1 M M'), @ex redexes (fun V : redexes => residuals (mark M) V (mark M')) *) simple induction 1; simpl in |- *; intros. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim H1; intros V1 P1. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim H3; intros V2 P2. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (Fun (mark M0)) (mark N)) V (mark (subst N' M'0))) *) (* Goal: @ex redexes (fun V : redexes => residuals (Var n) V (Var n)) *) (* Goal: @ex redexes (fun V : redexes => residuals (Fun (mark M0)) V (Fun (mark M'0))) *) (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) exists (Ap true (Fun V1) V2). (* Goal: residuals (Ap false (Fun (mark M0)) (mark N)) (Ap true (Fun V1) V2) (mark (subst N' M'0)) *) (* Goal: @ex redexes (fun V : redexes => residuals (Var n) V (Var n)) *) (* Goal: @ex redexes (fun V : redexes => residuals (Fun (mark M0)) V (Fun (mark M'0))) *) (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim mark_subst; auto. (* Goal: @ex redexes (fun V : redexes => residuals (Var n) V (Var n)) *) (* Goal: @ex redexes (fun V : redexes => residuals (Fun (mark M0)) V (Fun (mark M'0))) *) (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) exists (Var n); trivial. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim H1; intros V1 P1. (* Goal: @ex redexes (fun V : redexes => residuals (Fun (mark M0)) V (Fun (mark M'0))) *) (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) exists (Fun V1); auto. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim H1; intros V1 P1. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) elim H3; intros V2 P2. (* Goal: @ex redexes (fun V : redexes => residuals (Ap false (mark M0) (mark N)) V (Ap false (mark M'0) (mark N'))) *) exists (Ap false V1 V2); auto. Qed. (* Commuting unmark and subst *) Lemma unmark_lift_rec : forall (U : redexes) (n k : nat), lift_rec (unmark U) k n = unmark (lift_rec_r U k n). Proof. (* Goal: forall (V U : redexes) (n : nat), @eq lambda (subst_rec (unmark U) (unmark V) n) (unmark (subst_rec_r U V n)) *) simple induction U; simpl in |- *; intros. (* Goal: @eq lambda (Ref (relocate n k n0)) (Ref (relocate n k n0)) *) (* Goal: @eq lambda (Abs (lift_rec (unmark r) (S k) n)) (Abs (unmark (lift_rec_r r (S k) n))) *) (* Goal: @eq lambda (App (lift_rec (unmark r) k n) (lift_rec (unmark r0) k n)) (App (unmark (lift_rec_r r k n)) (unmark (lift_rec_r r0 k n))) *) elim (test k n); trivial. (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; trivial. (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; elim H0; trivial. Qed. Lemma unmark_lift : forall (U : redexes) (n : nat), lift n (unmark U) = unmark (lift_r n U). Proof. (* Goal: forall (U : redexes) (n : nat), @eq lambda (lift n (unmark U)) (unmark (lift_r n U)) *) unfold lift in |- *; unfold lift_r in |- *; intros; apply unmark_lift_rec. Qed. Lemma unmark_subst_rec : forall (V U : redexes) (n : nat), subst_rec (unmark U) (unmark V) n = unmark (subst_rec_r U V n). Proof. (* Goal: forall (V U : redexes) (n : nat), @eq lambda (subst_rec (unmark U) (unmark V) n) (unmark (subst_rec_r U V n)) *) simple induction U; simpl in |- *; intros. (* Goal: @eq lambda (insert_Ref (unmark V) n n0) (unmark (insert_Var V n n0)) *) (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) unfold insert_Var, insert_Ref in |- *. (* Goal: @eq redexes (Var n) (mark (Ref n)) *) (* Goal: @eq redexes (Fun (subst_rec_r (mark l) (mark N) (S n))) (Fun (mark (subst_rec l N (S n)))) *) (* Goal: @eq redexes (Ap false (subst_rec_r (mark l) (mark N) n) (subst_rec_r (mark l0) (mark N) n)) (Ap false (mark (subst_rec l N n)) (mark (subst_rec l0 N n))) *) elim (compare n0 n); intro H; simpl in |- *; trivial. (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; trivial. (* Goal: forall _ : @eq nat n0 n, @eq lambda (lift n0 (unmark V)) (unmark (lift_r n0 V)) *) (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) rewrite (unmark_lift V n0); trivial. (* Goal: @eq lambda (Abs (subst_rec (unmark r) (unmark V) (S n))) (Abs (unmark (subst_rec_r r V (S n)))) *) (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; trivial. (* Goal: @eq lambda (App (subst_rec (unmark r) (unmark V) n) (subst_rec (unmark r0) (unmark V) n)) (App (unmark (subst_rec_r r V n)) (unmark (subst_rec_r r0 V n))) *) elim H; elim H0; trivial. Qed. Lemma unmark_subst : forall U V : redexes, subst (unmark U) (unmark V) = unmark (subst_r U V). Proof. (* Goal: forall U V : redexes, @eq lambda (subst (unmark U) (unmark V)) (unmark (subst_r U V)) *) unfold subst in |- *; unfold subst_r in |- *; intros; apply unmark_subst_rec. Qed. Lemma completeness : forall U V W : redexes, residuals U V W -> par_red1 (unmark U) (unmark W). Proof. (* Goal: forall (U V W : redexes) (_ : residuals U V W), par_red1 (unmark U) (unmark W) *) simple induction 1; simpl in |- *; auto. (* Goal: forall (U1 V1 W1 : redexes) (_ : residuals U1 V1 W1) (_ : par_red1 (unmark U1) (unmark W1)) (U2 V2 W2 : redexes) (_ : residuals U2 V2 W2) (_ : par_red1 (unmark U2) (unmark W2)) (_ : bool), par_red1 (App (Abs (unmark U1)) (unmark U2)) (unmark (subst_r W2 W1)) *) intros; elim unmark_subst; auto. Qed. (**************************************************) (* Reduction of a lambda term by a set of redexes *) (**************************************************) Definition reduction (M : lambda) (U : redexes) (N : lambda) := residuals (mark M) U (mark N). Lemma reduction_function : forall (M N P : lambda) (U : redexes), reduction M U N -> reduction M U P -> N = P. Proof. (* Goal: forall (M N P : lambda) (U : redexes) (_ : reduction M U N) (_ : reduction M U P), @eq lambda N P *) unfold reduction in |- *; intros; cut (comp (mark N) (mark P)). intro; rewrite (inverse N); rewrite (inverse P); apply comp_unmark_eq; trivial. (* Goal: comp (mark N) (mark P) *) apply mutual_residuals_comp with U (mark M) (mark M); trivial. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Marks.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Terms. Require Import Reduction. Require Import Redexes. Require Import Test. (* Translation from terms to redexes *) Fixpoint mark (e : lambda) : redexes := match e with | Ref n => Var n | Abs M => Fun (mark M) | App M N => Ap false (mark M) (mark N) end. (* Reverse translation : erasing the marks *) Fixpoint unmark (e : redexes) : lambda := match e with | Var n => Ref n | Fun U => Abs (unmark U) | Ap b U V => App (unmark U) (unmark V) end. Lemma inverse : forall M : lambda, M = unmark (mark M). Proof. (* Goal: forall M : lambda, @eq lambda M (unmark (mark M)) *) simple induction M; simpl in |- *; trivial; simple induction 1; trivial. (* Goal: forall (l0 : lambda) (_ : @eq lambda l0 (unmark (mark l0))), @eq lambda (App l l0) (App l (unmark (mark l0))) *) simple induction 1; trivial. Qed. Lemma comp_unmark_eq : forall U V : redexes, comp U V -> unmark U = unmark V. Proof. (* Goal: forall (U V : redexes) (_ : comp U V), @eq lambda (unmark U) (unmark V) *) simple induction 1; simpl in |- *; trivial. (* Goal: forall (U V : redexes) (_ : comp U V) (_ : @eq lambda (unmark U) (unmark V)), @eq lambda (Abs (unmark U)) (Abs (unmark V)) *) (* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @eq lambda (unmark U1) (unmark V1)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @eq lambda (unmark U2) (unmark V2)) (_ : bool) (_ : bool), @eq lambda (App (unmark U1) (unmark U2)) (App (unmark V1) (unmark V2)) *) simple induction 2; trivial. (* Goal: forall (U V : redexes) (_ : comp U V) (_ : @eq lambda (unmark U) (unmark V)), @eq lambda (Abs (unmark U)) (Abs (unmark V)) *) (* Goal: forall (U1 V1 : redexes) (_ : comp U1 V1) (_ : @eq lambda (unmark U1) (unmark V1)) (U2 V2 : redexes) (_ : comp U2 V2) (_ : @eq lambda (unmark U2) (unmark V2)) (_ : bool) (_ : bool), @eq lambda (App (unmark U1) (unmark U2)) (App (unmark V1) (unmark V2)) *) simple induction 2; simple induction 2; trivial. Qed. (* The converse is true, but not needed in the rest of the development *)
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (* Test.v *) (****************************************************************************) (* Arithmetic tests *) Require Import Arith. (* Pattern-matching lemmas for comparing 2 naturals Similar to lemmas in Compare_dec *) Definition test : forall n m : nat, {n <= m} + {n > m}. Proof. (* Goal: forall (n m : nat) (_ : le n m), sumbool (lt n m) (@eq nat n m) *) simple induction n; simple induction m; simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : sumbool (le (S n0) n) (gt (S n0) n)), sumbool (le (S n0) (S n)) (gt (S n0) (S n)) *) intros m' H'; elim (H m'); auto with arith. Defined. (* Transparent test. *) Definition le_lt : forall n m : nat, n <= m -> {n < m} + {n = m}. Proof. (* Goal: forall (n m : nat) (_ : le n m), sumbool (lt n m) (@eq nat n m) *) simple induction n; simple induction m; simpl in |- *; auto with arith. (* Goal: forall (n : nat) (_ : forall _ : le (S n0) n, sumbool (lt (S n0) n) (@eq nat (S n0) n)) (_ : le (S n0) (S n)), sumbool (lt (S n0) (S n)) (@eq nat (S n0) (S n)) *) intros m' H1 H2; elim (H m'); auto with arith. Defined. (* Transparent le_lt. *) Definition compare : forall n m : nat, {n < m} + {n = m} + {n > m}. Proof. (* Goal: forall n m : nat, sumor (sumbool (lt n m) (@eq nat n m)) (gt n m) *) intros n m; elim (test n m); auto with arith. (* Goal: forall _ : le n m, sumor (sumbool (lt n m) (@eq nat n m)) (gt n m) *) left; apply le_lt; trivial with arith. Defined. (* Transparent compare. *)
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) (* Contribution to the Coq Library V6.3 (July 1999) *) (****************************************************************************) (* The Calculus of Inductive Constructions *) (* *) (* Projet Coq *) (* *) (* INRIA ENS-CNRS *) (* Rocquencourt Lyon *) (* *) (* Coq V5.10 *) (* Nov 25th 1994 *) (* *) (****************************************************************************) (****************************************************************************) (* Reduction.v *) (* *) (* Gerard Huet *) (* *) (* Developed in V5.8 January 1993 *) (* Ported to V5.10 January 1995 *) (****************************************************************************) Require Import Arith. Require Import Test. Require Import Terms. (* Beta reduction *) Inductive red1 : lambda -> lambda -> Prop := | beta : forall M N : lambda, red1 (App (Abs M) N) (subst N M) | abs_red : forall M N : lambda, red1 M N -> red1 (Abs M) (Abs N) | app_red_l : forall M1 N1 : lambda, red1 M1 N1 -> forall M2 : lambda, red1 (App M1 M2) (App N1 M2) | app_red_r : forall M2 N2 : lambda, red1 M2 N2 -> forall M1 : lambda, red1 (App M1 M2) (App M1 N2). (* Transitive closure of red1 *) Inductive red : lambda -> lambda -> Prop := | one_step_red : forall M N : lambda, red1 M N -> red M N | refl_red : forall M : lambda, red M M | trans_red : forall M N P : lambda, red M N -> red N P -> red M P. Lemma red_abs : forall M M' : lambda, red M M' -> red (Abs M) (Abs M'). Proof. (* Goal: forall (M N : lambda) (_ : red M N), par_red M N *) simple induction 1; intros. (* Goal: red (Abs M0) (Abs N) *) (* Goal: red (Abs M0) (Abs M0) *) (* Goal: red (Abs M0) (Abs P) *) apply one_step_red; apply abs_red; trivial. (* Goal: red (App N M0) (App N M0) *) (* Goal: red (App N0 M0) (App N0 P) *) apply refl_red. (* Goal: red (Abs M0) (Abs P) *) apply trans_red with (Abs N); trivial. Qed. Lemma red_appl : forall M M' : lambda, red M M' -> forall N : lambda, red (App M N) (App M' N). Proof. (* Goal: forall (M N : lambda) (_ : red M N), par_red M N *) simple induction 1; intros. (* Goal: red (App M0 N0) (App N N0) *) (* Goal: red (App M0 N) (App M0 N) *) (* Goal: red (App M0 N0) (App P N0) *) apply one_step_red; apply app_red_l; trivial. (* Goal: red (App N M0) (App N M0) *) (* Goal: red (App N0 M0) (App N0 P) *) apply refl_red. (* Goal: red (App M0 N0) (App P N0) *) apply trans_red with (App N N0); trivial. Qed. Lemma red_appr : forall M M' : lambda, red M M' -> forall N : lambda, red (App N M) (App N M'). Proof. (* Goal: forall (M N : lambda) (_ : red M N), par_red M N *) simple induction 1; intros. (* Goal: red (App N0 M0) (App N0 N) *) (* Goal: red (App N M0) (App N M0) *) (* Goal: red (App N0 M0) (App N0 P) *) apply one_step_red; apply app_red_r; trivial. (* Goal: red (App N M0) (App N M0) *) (* Goal: red (App N0 M0) (App N0 P) *) apply refl_red. (* Goal: red (App N0 M0) (App N0 P) *) apply trans_red with (App N0 N); trivial. Qed. Lemma red_app : forall M M' N N' : lambda, red M M' -> red N N' -> red (App M N) (App M' N'). Proof. (* Goal: forall (M M' N N' : lambda) (_ : red M M') (_ : red N N'), red (App M N) (App M' N') *) intros; apply trans_red with (App M' N). (* Goal: red (App M N) (App M' N) *) (* Goal: red (App M' N) (App M' N') *) apply red_appl; trivial. (* Goal: red (App M' N) (App M' N') *) apply red_appr; trivial. Qed. Lemma red_beta : forall M M' N N' : lambda, red M M' -> red N N' -> red (App (Abs M) N) (subst N' M'). Proof. (* Goal: forall (M M' N N' : lambda) (_ : red M M') (_ : red N N'), red (App (Abs M) N) (subst N' M') *) intros; apply trans_red with (App (Abs M') N'). (* Goal: red (App (Abs M) N) (App (Abs M') N') *) (* Goal: red (App (Abs M') N') (subst N' M') *) apply red_app; trivial. (* Goal: red (Abs M) (Abs M') *) (* Goal: red (App (Abs M') N') (subst N' M') *) apply red_abs; trivial. (* Goal: red (App (Abs M') N') (subst N' M') *) apply one_step_red; apply beta. Qed. (* Parallel beta reduction *) Inductive par_red1 : lambda -> lambda -> Prop := | par_beta : forall M M' : lambda, par_red1 M M' -> forall N N' : lambda, par_red1 N N' -> par_red1 (App (Abs M) N) (subst N' M') | ref_par_red : forall n : nat, par_red1 (Ref n) (Ref n) | abs_par_red : forall M M' : lambda, par_red1 M M' -> par_red1 (Abs M) (Abs M') | app_par_red : forall M M' : lambda, par_red1 M M' -> forall N N' : lambda, par_red1 N N' -> par_red1 (App M N) (App M' N'). Hint Resolve par_beta ref_par_red abs_par_red app_par_red. Lemma refl_par_red1 : forall M : lambda, par_red1 M M. Proof. (* Goal: forall M : lambda, par_red1 M M *) simple induction M; auto. Qed. Hint Resolve refl_par_red1. Lemma red1_par_red1 : forall M N : lambda, red1 M N -> par_red1 M N. Proof. (* Goal: forall (M N : lambda) (_ : red1 M N), par_red1 M N *) simple induction 1; auto. Qed. (* Multi-step parallel beta reduction *) Inductive par_red : lambda -> lambda -> Prop := | one_step_par_red : forall M N : lambda, par_red1 M N -> par_red M N | trans_par_red : forall M N P : lambda, par_red M N -> par_red N P -> par_red M P. (* Equivalence between reduction and parallel reduction *) Lemma red_par_red : forall M N : lambda, red M N -> par_red M N. Proof. (* Goal: forall (M N : lambda) (_ : red M N), par_red M N *) simple induction 1; intros. (* Goal: par_red M0 N0 *) (* Goal: par_red M0 M0 *) (* Goal: par_red M0 P *) apply one_step_par_red; apply red1_par_red1; trivial. (* Goal: par_red M0 M0 *) (* Goal: par_red M0 P *) apply one_step_par_red; auto. (* Goal: par_red M0 P *) apply trans_par_red with N0; trivial. Qed. Lemma par_red_red : forall M N : lambda, par_red M N -> red M N. Proof. simple induction 1. 2: intros; apply trans_red with N0; trivial. simple induction 1. intros; apply red_beta; trivial. (* Goal: red (App N M0) (App N M0) *) (* Goal: red (App N0 M0) (App N0 P) *) intros; apply refl_red. (* Goal: red (Abs M) (Abs M') *) (* Goal: red (App (Abs M') N') (subst N' M') *) intros; apply red_abs; trivial. (* Goal: red (App (Abs M) N) (App (Abs M') N') *) (* Goal: red (App (Abs M') N') (subst N' M') *) intros; apply red_app; trivial. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. (** Sets as pointed graphs ~~~~~~~~~~~~~~~~~~~~~~ In the following, we will interpret sets as pointed graphs, that is, as triples of the form (X, A, a) where : - X : Typ1 is the carrier (i.e. the small type of vertices); - A : (Rel X) is the edge (or local membership) relation; - a : X is the root. Naming conventions ~~~~~~~~~~~~~~~~~~ Since the PTS Fw.2 does not provide any pairing mechanism, we will introduce the three components of each pointed graph separately. Of course, this separation is error-prone, and to avoid confusions we will name components according to the following scheme: Pointed graph Vertices ------------- -------- (X, A, a) x, x', x0, x1, etc. (Y, B, b) y, y', y0, y1, etc. (Z, C, c) z, z', z0, z1, etc. etc. Moreover, a letter affected with a prime (such as x') will usually indicate that the vertex (or carrier, or relation) it denotes is in some sense an element of the corresponding unaffected letter. *) (********************************) (** * Equality as bisimilarity *) (********************************) (** Two pointed graphs (X, A, a) and (Y, B, b) are bisimilar if there exists a relation R:X->Y->Prop satisfying the following conditions: (BIS1) (x,x':X; y:Y) (A x' x)/\(R x y) -> (Ex y':Y | (B y' y)/\(R x' y')) (BIS2) (x,x':X; y:Y) (A x' x)/\(R x y) -> (Ex y':Y | (B y' y)/\(R x' y')) (BIS3) (R a b) Instead of defining this relation by the mean of standard logical connectives, we give an equivalent impredicative encoding for it in order to make the forthcoming proofs a little bit shorter. *) Definition EQV (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) : Prop := forall E : Prop, (forall R : X -> Y -> Prop, (forall (x x' : X) (y : Y), A x' x -> R x y -> ex2 Y (fun y' => B y' y) (fun y' => R x' y')) -> (forall (y y' : Y) (x : X), B y' y -> R x y -> ex2 X (fun x' => A x' x) (fun x' => R x' y')) -> R a b -> E) -> E. (** Here is the corresponding introduction rule: *) Lemma EQV_intro : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (R : X -> Y -> Prop), (forall (x x' : X) (y : Y), A x' x -> R x y -> ex2 Y (fun y' => B y' y) (fun y' => R x' y')) -> (forall (y y' : Y) (x : X), B y' y -> R x y -> ex2 X (fun x' => A x' x) (fun x' => R x' y')) -> R a b -> EQV X A a Y B b. Proof fun X A a Y B b R H1 H2 H3 E e => e R H1 H2 H3. (** It would be useless to define the corresponding elimination rule whose behaviour is obtained by using [Apply H] instead of [Elim H] in the following proof scripts. We first check that bisimilarity is an equivalence relation: *) Lemma EQV_refl : forall (X : Typ1) (A : Rel X) (a : X), EQV X A a X A a. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X), EQV X A a X A a *) intros X A a; apply EQV_intro with (fun x y => eq X x y). (* BIS 1 *) (* Goal: forall (x x' y : X) (_ : A x' x) (_ : eq X x y), ex2 X (fun y' : X => A y' y) (fun y' : X => eq X x' y') *) (* Goal: forall (y y' x : X) (_ : A y' y) (_ : eq X x y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq X x' y') *) (* Goal: eq X a a *) intros x x' y H1 H2; apply ex2_intro with x'. (* Goal: A x' y *) (* Goal: eq X x' x' *) (* Goal: forall (y y' x : X) (_ : A y' y) (_ : eq X x y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq X x' y') *) (* Goal: eq X a a *) apply H2; assumption. apply eq_refl. (* BIS 2 *) (* Goal: forall (y y' x : X) (_ : A y' y) (_ : eq X x y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq X x' y') *) (* Goal: eq X a a *) intros y y' x H1 H2; apply ex2_intro with y'. (* Goal: eq Y (f x0) (f x0) *) apply (eq_sym _ _ _ H2); assumption. apply eq_refl. (* BIS 3 *) (* Goal: eq Y (f x0) (f x0) *) apply eq_refl. Qed. Lemma EQV_sym : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a Y B b -> EQV Y B b X A a. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b), EQV Y B b X A a *) intros X A a Y B b H; apply H; clear H; intros R H1 H2 H3. (* Goal: EQV Y B b X A a *) apply EQV_intro with (fun y x => R x y); assumption. Qed. Lemma EQV_trans : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), EQV X A a Y B b -> EQV Y B b Z C c -> EQV X A a Z C c. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : EQV X A a Y B b) (_ : EQV Y B b Z C c), EQV X A a Z C c *) intros X A a Y B b Z C c H1 H4. (* Goal: EQV X A a Z C c *) apply H1; clear H1; intros R H1 H2 H3. (* Goal: EQV X A a Z C c *) apply H4; clear H4; intros S H4 H5 H6. (* Goal: EQV X A a Z C c *) apply EQV_intro with (fun x z => ex2 Y (fun y => R x y) (fun y => S y z)). (* BIS1 *) (* Goal: forall (x x' : X) (y : Z) (_ : A x' x) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 Z (fun y' : Z => C y' y) (fun y' : Z => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: forall (y y' : Z) (x : X) (_ : C y' y) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) intros x x' z H7 H; apply H; clear H; intros y H8 H9. (* Goal: ex2 Z (fun y' : Z => C y' z) (fun y' : Z => ex2 Y (fun y : Y => R x' y) (fun y : Y => S y y')) *) (* Goal: forall (y y' : Z) (x : X) (_ : C y' y) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) apply (H1 x x' y H7 H8); intros y' H10 H11. (* Goal: ex2 Z (fun y' : Z => C y' z) (fun y' : Z => ex2 Y (fun y : Y => R x' y) (fun y : Y => S y y')) *) (* Goal: forall (y y' : Z) (x : X) (_ : C y' y) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) apply (H4 y y' z H10 H9); intros z' H12 H13. (* Goal: ex2 Z (fun y' : Z => C y' z) (fun y' : Z => ex2 Y (fun y : Y => R x' y) (fun y : Y => S y y')) *) (* Goal: forall (y y' : Z) (x : X) (_ : C y' y) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) apply ex2_intro with z'. assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with y'; assumption. (* BIS2 *) (* Goal: forall (y y' : Z) (x : X) (_ : C y' y) (_ : ex2 Y (fun y0 : Y => R x y0) (fun y0 : Y => S y0 y)), ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y0 : Y => R x' y0) (fun y0 : Y => S y0 y')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) intros z z' x H7 H; apply H; clear H; intros y H8 H9. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y : Y => R x' y) (fun y : Y => S y z')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) apply (H5 z z' y H7 H9); intros y' H10 H11. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => ex2 Y (fun y : Y => R x' y) (fun y : Y => S y z')) *) (* Goal: ex2 Y (fun y : Y => R a y) (fun y : Y => S y c) *) apply (H2 y y' x H10 H8); intros x' H12 H13. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with x'. assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with y'; assumption. (* BIS3 *) (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with b; assumption. Qed. (** The following lemma states that the bisimilarity relation can be shifted one vertex down by following the edges of both local membership relations. *) Lemma EQV_shift : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a Y B b -> forall a' : X, A a' a -> ex2 Y (fun b' => B b' b) (fun b' => EQV X A a' Y B b'). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b) (a' : X) (_ : A a' a), ex2 Y (fun b' : Y => B b' b) (fun b' : Y => EQV X A a' Y B b') *) intros X A a Y B b H; eapply H; clear H; intros R H1 H2 H3. (* Goal: forall (a' : X) (_ : A a' a), ex2 Y (fun b' : Y => B b' b) (fun b' : Y => EQV X A a' Y B b') *) intros a' H4; apply (H1 a a' b H4 H3); intros b' H5 H6. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with b'. assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply EQV_intro with R; assumption. Qed. (******************************************) (** * Membership as shifted bisimilarity *) (******************************************) (** A pointed graph (X, A, a) represents an element of a pointed graph (Y, B, b) if there is a vertex b':Y one edge below the root b such that the pointed graphs (X, A, a) and (Y, B, b') are bisimilar. This relation is impredicatively encoded as follows: *) Definition ELT (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) : Prop := forall E : Prop, (forall b' : Y, B b' b -> EQV X A a Y B b' -> E) -> E. Lemma ELT_intro : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b b' : Y), B b' b -> EQV X A a Y B b' -> ELT X A a Y B b. Proof fun X A a Y B b b' H1 H2 E e => e b' H1 H2. (** Direct elements of a pointed graph (X, A, a) are simply the pointed graphs of the form (X, A, a') such that (A a' a), that is, the pointed graphs we obtain by shifting the root one edge downwards: *) Lemma ELT_direct : forall (X : Typ1) (A : Rel X) (a a' : X), A a' a -> ELT X A a' X A a. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a a' : X) (_ : A a' a), ELT X A a' X A a *) intros X A a a' H; apply ELT_intro with a'. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) assumption. apply EQV_refl. Qed. (** We now state the (left and right) compatibility of the membership relation w.r.t. the bisimilarity relation. Both compatibilities rely on the transitivity of the bisimilarity relation, and the right compatibility uses the EQV_shift lemma we proved above. *) Lemma ELT_compat_l : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), EQV X A a Y B b -> ELT Y B b Z C c -> ELT X A a Z C c. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : EQV X A a Y B b) (_ : ELT Y B b Z C c), ELT X A a Z C c *) intros X A a Y B b Z C c H1 H. (* Goal: ELT X A a Z C c *) apply H; clear H; intros c' H2 H3. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ELT_intro with c'. assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply EQV_trans with Y B b; assumption. Qed. Lemma ELT_compat_r : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), ELT X A a Y B b -> EQV Y B b Z C c -> ELT X A a Z C c. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : ELT X A a Y B b) (_ : EQV Y B b Z C c), ELT X A a Z C c *) intros X A a Y B b Z C c H. (* Goal: forall _ : EQV Y B b Z C c, ELT X A a Z C c *) eapply H; clear H; intros b' H1 H2 H3. (* Goal: ELT X A a Z C c *) apply (EQV_shift _ _ _ _ _ _ H3 b' H1); intros c' H4 H5. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ELT_intro with c'. assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply EQV_trans with Y B b'; assumption. Qed. (************************************) (** * Inclusion and extensionality *) (************************************) (** The inclusion relation is defined as expected: *) Definition SUB (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) : Prop := forall (Z : Typ1) (C : Rel Z) (c : Z), ELT Z C c X A a -> ELT Z C c Y B b. (** Inclusion is clearly reflexive and transitive: *) Lemma SUB_refl : forall (X : Typ1) (A : Rel X) (a : X), SUB X A a X A a. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : SUB X A a Y B b) (_ : SUB Y B b Z C c), SUB X A a Z C c *) unfold SUB in |- *; auto. Qed. Lemma SUB_trans : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), SUB X A a Y B b -> SUB Y B b Z C c -> SUB X A a Z C c. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : SUB X A a Y B b) (_ : SUB Y B b Z C c), SUB X A a Z C c *) unfold SUB in |- *; auto. Qed. (** We now state the extensionality property, which expresses that the inclusion relation is antisymmetric (thus being a partial ordering relation between sets). Equivalently, this property says that two pointed graphs are bisimilar when they have the same elements. *) Theorem extensionality : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), SUB X A a Y B b -> SUB Y B b X A a -> EQV X A a Y B b. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : SUB X A a Y B b) (_ : SUB Y B b X A a), EQV X A a Y B b *) intros X A a Y B b H1 H2. (* Give the bisimulation: *) apply EQV_intro with (fun x y => or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)). (* BIS1 *) (* Goal: forall (x x' : X) (y : Y) (_ : A x' x) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intros x x' y H3 H4; apply H4; clear H4; intro H4. (* BIS1, first case: x = a and y = b *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply H4; clear H4; intros H4 H5. (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) generalize (ELT_direct X A x x' H3); eapply (eq_sym _ _ _ H4). (* Goal: forall _ : ELT X A x' X A a, ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intro H6; apply (H1 _ _ _ H6); intros y' H7 H8. (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with y'. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply (eq_sym _ _ _ H5); assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply or_inr; assumption. (* BIS1, second case: (EQV X A x Y B y) *) (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply (EQV_shift _ _ _ _ _ _ H4 x' H3). (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 Y (fun y' : Y => B y' y) (fun y' : Y => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intros y' H5 H6; apply ex2_intro with y'. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) assumption. apply or_inr; assumption. (* BIS2 *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : or (and (eq X x a) (eq Y y b)) (EQV X A x Y B y)), ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intros y y' x H3 H4; apply H4; clear H4; intro H4. (* BIS2, first case: x = a and y = b *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply H4; clear H4; intros H4 H5. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) generalize (ELT_direct Y B y y' H3); eapply (eq_sym _ _ _ H5). (* Goal: forall _ : ELT Y B y' Y B b, ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intro H6; apply (H2 _ _ _ H6); intros x' H7 H8. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply (eq_sym _ _ _ H4); assumption. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply or_inr; apply EQV_sym; assumption. (* BIS2, second case: (EQV X A x Y B y) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply (EQV_shift _ _ _ _ _ _ (EQV_sym _ _ _ _ _ _ H4) y' H3). (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y')) *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) intros x' H5 H6; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) assumption. apply or_inr; apply EQV_sym; assumption. (* BIS3 *) (* Goal: eq Y (f x0) (f x0) *) apply or_inl; apply and_intro; apply eq_refl. Qed. (*******************) (** * Delocations *) (*******************) (** Let (X, A) and (Y, B) be two graphs. A delocation from (X, A) to (Y, B) is a function f : X->Y such that: 1. (x,x':X) (A x' x) -> (B (f x') (f x)) 2. (x:X; y':Y) (B y' (f x)) -> (Ex x':X | (A x' x) /\ y'=(f x')) Intuitively, a delocation is a morphism of graphs in which any edge of the target graph (Y, B) which points to an element of the image of f can be tracked back as an edge in the source graph via f. This notion is formalized as follows: *) Definition deloc (X : Typ1) (A : Rel X) (Y : Typ1) (B : Rel Y) (f : X -> Y) : Prop := and (forall x x' : X, A x' x -> B (f x') (f x)) (forall (x : X) (y' : Y), B y' (f x) -> ex2 X (fun x' => A x' x) (fun x' => eq Y y' (f x'))). (** The notion of delocation f:(X,A)->(Y,B) is interesting since it automatically induces a bisimulation from the pointed graph (X, A, x) to the pointed graph (Y, B, (f x)) for any vertex x:X in the source graph (X,A). This property is stated by the following lemma: *) Lemma EQV_deloc : forall (X : Typ1) (A : Rel X) (Y : Typ1) (B : Rel Y) (f : X -> Y), deloc X A Y B f -> forall x : X, EQV X A x Y B (f x). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (Y : Typ1) (B : Rel Y) (f : forall _ : X, Y) (_ : deloc X A Y B f) (x : X), EQV X A x Y B (f x) *) intros X A Y B f H. eapply H; clear H; intros H1 H2 x0. (* Goal: EQV X A x0 Y B (f x0) *) apply EQV_intro with (fun x y => eq Y y (f x)). (* BIS1 *) (* Goal: forall (x x' : X) (y : Y) (_ : A x' x) (_ : eq Y y (f x)), ex2 Y (fun y' : Y => B y' y) (fun y' : Y => eq Y y' (f x')) *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : eq Y y (f x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq Y y' (f x')) *) (* Goal: eq Y (f x0) (f x0) *) intros x x' y H3 H4; apply ex2_intro with (f x'). (* Goal: A x' x *) (* Goal: or (and (eq X x' a) (eq Y y' b)) (EQV X A x' Y B y') *) (* Goal: or (and (eq X a a) (eq Y b b)) (EQV X A a Y B b) *) apply (eq_sym _ _ _ H4); apply H1; assumption. (* Goal: eq Y (f x0) (f x0) *) apply eq_refl. (* BIS2 *) (* Goal: forall (y y' : Y) (x : X) (_ : B y' y) (_ : eq Y y (f x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq Y y' (f x')) *) (* Goal: eq Y (f x0) (f x0) *) intros y y' x H3 H4. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => eq Y y' (f x')) *) (* Goal: eq Y (f x0) (f x0) *) exact (H2 x y' (H4 (B y') H3)). (* BIS3 *) (* Goal: eq Y (f x0) (f x0) *) apply eq_refl. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. Definition PRED := forall X : Typ1, Rel X -> X -> Prop. Definition Compat (P : PRED) : Prop := forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a Y B b -> P X A a -> P Y B b. Definition SELECT (X : Typ1) (A : Rel X) (a : X) (P : PRED) : Rel (opt X) := fun z' z : opt X => forall E : Prop, (forall x x' : X, eq (opt X) z (some X x) -> eq (opt X) z' (some X x') -> A x' x -> E) -> (forall x' : X, eq (opt X) z' (some X x') -> eq (opt X) z (none X) -> A x' a -> P X A x' -> E) -> E. Lemma SELECT_in : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (x x' : X), A x' x -> SELECT X A a P (some X x') (some X x). Proof fun X A a P x x' H E e _ => e x x' (eq_refl (opt X) (some X x)) (eq_refl (opt X) (some X x')) H. Lemma SELECT_rt : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (x' : X), A x' a -> P X A x' -> SELECT X A a P (some X x') (none X). Proof fun X A a P x' H1 H2 E _ e => e x' (eq_refl (opt X) (some X x')) (eq_refl (opt X) (none X)) H1 H2. Lemma SELECT_deloc : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED), deloc X A (opt X) (SELECT X A a P) (some X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (P : PRED), deloc X A (opt X) (SELECT X A a P) (some X) *) intros X A a P; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : X) (_ : A x' x), SELECT X A a P (some X x') (some X x) *) (* Goal: forall (x : X) (y' : opt X) (_ : SELECT X A a P y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) exact (SELECT_in X A a P). (* Deloc 2 (case distinction *) (* Goal: forall (x : X) (y' : opt X) (_ : SELECT X A a P y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros x z' H; apply H; clear H. (* Deloc 2, case 1 *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) (some X x) (some X x0)) (_ : eq (opt X) z' (some X x')) (_ : A x' x0), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) z' (some X x'0)) *) (* Goal: forall (x' : X) (_ : eq (opt X) z' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' a) (_ : P X A x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) z' (some X x'0)) *) intros x0 x' H1 H2 H3; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: eq (opt X) z' (some X x') *) (* Goal: forall (x' : X) (_ : eq (opt X) z' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' a) (_ : P X A x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) z' (some X x'0)) *) apply (eq_sym _ _ _ (eq_some_some X x x0 H1)); assumption. (* Goal: P X A x' *) assumption. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (x' : X) (_ : eq (opt X) z' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' a) (_ : P X A x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) z' (some X x'0)) *) intros x' H1 H2 H3 H4; apply (eq_some_none X x H2). Qed. Lemma SELECT_eqv : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (x : X), EQV X A x (opt X) (SELECT X A a P) (some X x). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (x : X), EQV X A x (opt X) (SELECT X A a P) (some X x) *) intros X A a P x; apply EQV_deloc; apply SELECT_deloc. Qed. Lemma selection_intro : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED), Compat P -> forall (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b X A a -> P Y B b -> ELT Y B b (opt X) (SELECT X A a P) (none X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (_ : Compat P) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b X A a) (_ : P Y B b), ELT Y B b (opt X) (SELECT X A a P) (none X) *) intros X A a P H1 Y B b H H2; apply H; clear H; intros x' H3 H4. (* Goal: ELT Y B b (opt X) (SELECT X A a P) (none X) *) apply ELT_intro with (some X x'). (* Goal: SELECT X A a P (some X x') (none X) *) (* Goal: EQV Y B b (opt X) (SELECT X A a P) (some X x') *) apply SELECT_rt; [ assumption | exact (H1 _ _ _ _ _ _ H4 H2) ]. (* Goal: EQV Y B b (opt X) (SELECT X A a P) (some X x') *) apply EQV_trans with X A x'; [ assumption | apply SELECT_eqv ]. Qed. Lemma selection_elim : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED), Compat P -> forall (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (opt X) (SELECT X A a P) (none X) -> and (ELT Y B b X A a) (P Y B b). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (_ : Compat P) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b (opt X) (SELECT X A a P) (none X)), and (ELT Y B b X A a) (P Y B b) *) intros X A a P H1 Y B b H; apply H; clear H. (* Goal: forall (b' : opt X) (_ : SELECT X A a P b' (none X)) (_ : EQV Y B b (opt X) (SELECT X A a P) b'), and (ELT Y B b X A a) (P Y B b) *) intros z' H H2; apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (opt X) (none X) (some X x)) (_ : eq (opt X) z' (some X x')) (_ : A x' x), and (ELT Y B b X A a) (P Y B b) *) (* Goal: forall (x' : X) (_ : eq (opt X) z' (some X x')) (_ : eq (opt X) (none X) (none X)) (_ : A x' a) (_ : P X A x'), and (ELT Y B b X A a) (P Y B b) *) intros x x' H3 H4 H5; apply (eq_none_some X x H3). (* Case 2 *) (* Goal: forall (x' : X) (_ : eq (opt X) z' (some X x')) (_ : eq (opt X) (none X) (none X)) (_ : A x' a) (_ : P X A x'), and (ELT Y B b X A a) (P Y B b) *) intros x' H3 H4 H5 H6; apply and_intro. (* Case 2, first conclusion *) (* Goal: P X A x' *) apply ELT_intro with x'. assumption. (* Goal: P X A x' *) apply EQV_trans with (opt X) (SELECT X A a P) z'. assumption. (* Goal: EQV (opt X) (SELECT X A a P) z' X A x' *) (* Goal: P Y B b *) apply (eq_sym _ _ _ H3); apply EQV_sym; apply SELECT_eqv. (* Case 2, second conclusion *) (* Goal: P Y B b *) apply H1 with X A x'. (* Goal: EQV X A x' Y B b *) (* Goal: P X A x' *) apply EQV_trans with (opt X) (SELECT X A a P) z'. (* Goal: EQV X A x' (opt X) (SELECT X A a P) z' *) (* Goal: EQV (opt X) (SELECT X A a P) z' Y B b *) (* Goal: P X A x' *) apply (eq_sym _ _ _ H3); apply SELECT_eqv. (* Goal: P X A x' *) apply EQV_sym; assumption. assumption. Qed. Theorem selection : forall (X : Typ1) (A : Rel X) (a : X) (P : PRED), Compat P -> forall (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (SELECT X A a P) (none X)) (and (ELT Y B b X A a) (P Y B b)). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (_ : Compat P) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (SELECT X A a P) (none X)) (and (ELT Y B b X A a) (P Y B b)) *) intros X A a P H1 Y B b; unfold iff in |- *; apply and_intro. (* Goal: P X A x' *) intro; apply selection_elim; assumption. (* Goal: P X A x' *) intro H; apply H; intros; apply selection_intro; assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. Definition UNION (X : Typ1) (A : Rel X) (a : X) (z' z : opt X) := forall E : Prop, (forall x x' : X, eq (opt X) z' (some X x') -> eq (opt X) z (some X x) -> A x' x -> E) -> (forall x x' : X, eq (opt X) z' (some X x') -> eq (opt X) z (none X) -> A x' x -> A x a -> E) -> E. Lemma UNION_in : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> UNION X A a (some X x') (some X x). Proof fun X A a x x' H E e _ => e x x' (eq_refl (opt X) (some X x')) (eq_refl (opt X) (some X x)) H. Lemma UNION_rt : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> A x a -> UNION X A a (some X x') (none X). Proof fun X A a x x' H1 H2 E _ e => e x x' (eq_refl (opt X) (some X x')) (eq_refl (opt X) (none X)) H1 H2. Lemma UNION_deloc : forall (X : Typ1) (A : Rel X) (a : X), deloc X A (opt X) (UNION X A a) (some X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X), deloc X A (opt X) (UNION X A a) (some X) *) intros X A a; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : X) (_ : A x' x), UNION X A a (some X x') (some X x) *) (* Goal: forall (x : X) (y' : opt X) (_ : UNION X A a y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) exact (UNION_in X A a). (* Deloc 2 *) (* Goal: forall (x : X) (y' : opt X) (_ : UNION X A a y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros x y' H; apply H; clear H. (* Case distinction *) (* Deloc 2, case 1 *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (some X x0)) (_ : A x' x0), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) intros x0 x' H1 H2 H3; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) apply (eq_sym _ _ _ (eq_some_some _ _ _ H2)); assumption. (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) assumption. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) intros x0 x' H1 H2 H3 H4; apply (eq_some_none _ _ H2). Qed. Lemma UNION_eqv : forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (opt X) (UNION X A a) (some X x). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (opt X) (UNION X A a) (some X x) *) intros X A a x; apply EQV_deloc; apply UNION_deloc. Qed. Lemma union_intro : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), ELT Y B b Z C c -> ELT Z C c X A a -> ELT Y B b (opt X) (UNION X A a) (none X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : ELT Y B b Z C c) (_ : ELT Z C c X A a), ELT Y B b (opt X) (UNION X A a) (none X) *) intros X A a Y B b Z C c H H'. (* Goal: ELT Y B b (opt X) (UNION X A a) (none X) *) apply H'; clear H'; intros x H1 H2. (* Goal: ELT Y B b (opt X) (UNION X A a) (none X) *) apply (ELT_compat_r _ _ _ _ _ _ _ _ _ H H2); clear H; intros x' H3 H4. (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) apply ELT_intro with (some X x'). apply UNION_rt with x; assumption. (* Goal: EQV Y B b (opt X) (UNION X A a) (some X x') *) apply EQV_trans with X A x'; [ assumption | apply UNION_eqv ]. Qed. Lemma union_elim : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (opt X) (UNION X A a) (none X) -> exG (fun Z C c => and (ELT Y B b Z C c) (ELT Z C c X A a)). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b (opt X) (UNION X A a) (none X)), exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) intros X A a Y B b H; apply H; clear H; intros z H H1. (* Goal: exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) apply H; clear H. (* Case distinction *) (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (opt X) z (some X x')) (_ : eq (opt X) (none X) (some X x)) (_ : A x' x), exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) (* Goal: forall (x x' : X) (_ : eq (opt X) z (some X x')) (_ : eq (opt X) (none X) (none X)) (_ : A x' x) (_ : A x a), exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) intros x x' H2 H3 H4; apply (eq_none_some _ _ H3). (* Case 2 *) (* Goal: forall (x x' : X) (_ : eq (opt X) z (some X x')) (_ : eq (opt X) (none X) (none X)) (_ : A x' x) (_ : A x a), exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) intros x x' H2 H3 H4 H5. (* Goal: exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)) *) apply exG_intro with (opt X) (UNION X A a) (some X x). (* Goal: ELT Y B b (opt X) (UNION X A a) (some X x) *) (* Goal: ELT (opt X) (UNION X A a) (some X x) X A a *) apply and_intro. apply ELT_intro with (some X x'). (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) apply UNION_in; assumption. apply H2; assumption. (* Goal: ELT (opt X) (UNION X A a) (some X x) X A a *) apply ELT_compat_l with X A x. apply EQV_sym; apply UNION_eqv. (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) apply ELT_direct; assumption. Qed. Lemma union : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (UNION X A a) (none X)) (exG (fun Z C c => and (ELT Y B b Z C c) (ELT Z C c X A a))). Proof. (* Goal: and (ELT Y B b (opt X) (UNION X A a) (some X x)) (ELT (opt X) (UNION X A a) (some X x) X A a) *) intros X A a Y B b; unfold iff in |- *; apply and_intro. (* Direct implication *) (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) intro; apply union_elim; assumption. (* Converse implication *) (* Goal: forall _ : exG (fun (Z : Typ1) (C : Rel Z) (c : Z) => and (ELT Y B b Z C c) (ELT Z C c X A a)), ELT Y B b (opt X) (UNION X A a) (none X) *) intro H; apply H; clear H; intros Z C c H. (* Goal: ELT Y B b (opt X) (UNION X A a) (none X) *) apply H; clear H; intros H1 H2. (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) y' (some X x')) (_ : eq (opt X) (some X x) (none X)) (_ : A x' x0) (_ : A x0 a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) apply union_intro with Z C c; assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. (** To define the type of natural numbers, we introduce an extra universe Typ0 *below* the universe Typ1 (so that we are now working in the PTS lambda-omega.3). Another possibility would be to consider an axiomatized type of natural numbers (as in the author's LICS submission). *) Definition Typ0 : Typ1 := Type. (*******************************************) (** * The type of Church numerals in Typ1 *) (*******************************************) (** ** Definition of natural numbers **) (** Notice that the following definition is *predicative*, and the dependent product ranging over all X:Typ0 builds a type in the next universe Typ1. In practice, this "predicativisation" of the type of natural numbers induces some minor changes in the implementation of the predecessor function. *) Definition nat : Typ1 := forall X : Typ0, X -> (X -> X) -> X. Definition O : nat := fun X x f => x. Definition S (n : nat) : nat := fun X x f => f (n X x f). (** A natural number is `well-formed' if it is in the smallest class containing zero and closed under the successor function. *) Definition wf_nat (n : nat) : Prop := forall P : nat -> Prop, P O -> (forall p : nat, P p -> P (S p)) -> P n. (** ** The predecessor function **) (** For any type X : Typ0, we define the pseudo-square (sqr X) : Typ0 and the constructor (pair X) : X->X->(sqr X) by setting: *) Definition sqr (X : Typ0) : Typ0 := (X -> X -> X) -> X. Definition pair (X : Typ0) (x y : X) : sqr X := fun f => f x y. (** The corresponding projections *) Definition fst (X : Typ0) (p : sqr X) : X := p (fun x _ => x). Definition snd (X : Typ0) (p : sqr X) : X := p (fun _ y => y). (** enjoy the expected definitional equalities: (fst X (pair X x y)) = x and (snd X (pair X x y)) = y. *) (** Now, consider an arbitrary function f : X->X. From this function, we define a function (step X f) : (sqr X)->(sqr X) that maps the pair (x, y) to the pair (y, (f y)) by setting: *) Definition step (X : Typ0) (f : X -> X) (p : sqr X) : sqr X := pair X (snd X p) (f (snd X p)). (** If we iterate the function (step X f) from an arbitrary pair of the form (x, x), we obtain (step X f)^0 (x, x) = (x, x) (step X f)^1 (x, x) = (x, (f x)) (step X f)^2 (x, x) = ((f x), (f (f x)) ... (step X f)^n (x, x) = ((f ... (f x) ...), (f ... (f x) ...)) ^^^^^^^^ ^^^^^^^^ n-1 times n times By extracting the first component of the result and abstracting it w.r.t. the variables X:Typ0, x:X and f:X->X, we thus obtain the predecessor of Church numeral n. This is how the predecessor function is implemented: *) Definition pred (n : nat) : nat := fun X x f => fst X (n (sqr X) (pair X x x) (step X f)). (** We easily check the following definitional equalities: *) Lemma pred_O : eq nat (pred O) O. Proof eq_refl nat O. Lemma pred_SO : eq nat (pred (S O)) O. Proof eq_refl nat O. (** The following equality is really definitional! "I can see it, but I don't believe it"... *) Lemma pred_SSn : forall n : nat, eq nat (pred (S (S n))) (S (pred (S n))). Proof fun n => eq_refl nat (pred (S (S n))). (** From this, we prove that the predecessor cancels a previous application of the successor function (by induction) *) Lemma pred_S : forall n : nat, wf_nat n -> eq nat (pred (S n)) n. Proof. (* Goal: forall (n : nat) (_ : wf_nat n), eq nat (pred (S n)) n *) intros n Hn; apply Hn; clear Hn n. (* Base case *) (* Goal: eq nat (pred (S O)) O *) (* Goal: forall (p : nat) (_ : eq nat (pred (S p)) p), eq nat (pred (S (S p))) (S p) *) apply pred_O. (* Inductive case *) (* Goal: forall (p : nat) (_ : eq nat (pred (S p)) p), eq nat (pred (S (S p))) (S p) *) intros n H; pattern n at 2 in |- *. (* Goal: (fun n0 : nat => eq nat (pred (S (S n))) (S n0)) n *) apply H; apply pred_SSn. Qed. (*******************************) (** * Deriving Peano's axioms *) (*******************************) (** ** First axiom of Peano **) Lemma wf_nat_O : wf_nat O. Proof fun P HO HS => HO. (** ** Second axiom of Peano **) Lemma wf_nat_S : forall n : nat, wf_nat n -> wf_nat (S n). Proof fun n H P HO HS => HS n (H P HO HS). (** ** Third axiom of Peano **) Lemma eq_S_O : forall n : nat, wf_nat n -> eq nat (S n) O -> bot. Proof fun n _ H => H (fun p => p Prop bot (fun _ => top)) top_intro. Lemma eq_O_S : forall n : nat, wf_nat n -> eq nat O (S n) -> bot. Proof fun n _ H => H (fun p => p Prop top (fun _ => bot)) top_intro. (** Note that in the proofs of the two lemmas above, the assumption (wf_nat n) is not used. *) (** ** Fourth axiom of Peano **) Lemma eq_S_S : forall n : nat, wf_nat n -> forall p : nat, wf_nat p -> eq nat (S n) (S p) -> eq nat n p. Proof. (* Goal: forall (n : nat) (_ : wf_nat n) (p : nat) (_ : wf_nat p) (_ : eq nat (S n) (S p)), eq nat n p *) intros n Hn p Hp H. (* Goal: eq nat n p *) apply (pred_S n Hn). (* Goal: eq nat (pred (S n)) p *) apply (pred_S p Hp). (* Goal: eq nat (S m) (S m) *) (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) apply H; apply eq_refl. Qed. (** ** Fifth axiom of Peano **) Lemma nat_ind : forall P : nat -> Prop, P O -> (forall p : nat, wf_nat p -> P p -> P (S p)) -> forall n : nat, wf_nat n -> P n. Proof. (* Goal: forall (P : forall _ : nat, Prop) (_ : P O) (_ : forall (p : nat) (_ : wf_nat p) (_ : P p), P (S p)) (n : nat) (_ : wf_nat n), P n *) intros P HO HS n Hn. (* Goal: P n *) apply (and_snd (wf_nat n) (P n)). (* Goal: and (wf_nat n) (P n) *) apply Hn; clear Hn n. (* Base case *) (* Goal: and (wf_nat O) (P O) *) (* Goal: forall (p : nat) (_ : and (wf_nat p) (P p)), and (wf_nat (S p)) (P (S p)) *) apply and_intro; [ exact wf_nat_O | assumption ]. (* Inductive case *) (* Goal: forall (p : nat) (_ : and (wf_nat p) (P p)), and (wf_nat (S p)) (P (S p)) *) intros n H; apply H; clear H. (* Goal: forall (_ : wf_nat n) (_ : P n), and (wf_nat (S n)) (P (S n)) *) intros H1 H2; apply and_intro. (* Goal: wf_nat (S n) *) (* Goal: P (S n) *) apply wf_nat_S; assumption. (* Goal: P (S n) *) apply HS; assumption. Qed. Lemma nat_ind' : forall n : nat, wf_nat n -> forall P : nat -> Prop, P O -> (forall p : nat, wf_nat p -> P p -> P (S p)) -> P n. Proof fun n Hn P HO HS => nat_ind P HO HS n Hn. (****************) (** * Ordering *) (****************) Definition le (n m : nat) : Prop := forall P : nat -> Prop, P n -> (forall p : nat, P p -> P (S p)) -> P m. (** This relation is reflexive and transitive, and closed under the successor function. Notice that these lemmas do not rely on the well-formedness assumption: *) Lemma le_refl : forall n : nat, le n n. Proof fun n P H _ => H. Lemma le_trans : forall n1 n2 n3 : nat, le n1 n2 -> le n2 n3 -> le n1 n3. Proof fun n1 n2 n3 H1 H2 P Hn1 HS => H2 P (H1 P Hn1 HS) HS. Lemma le_S : forall n m : nat, le n m -> le n (S m). Proof fun n m H P Hn HS => HS m (H P Hn HS). (** The successor of a natural number cannot be less than or equal to zero: *) Lemma le_Sn_O : forall n : nat, le (S n) O -> bot. Proof fun n H => H (fun k => k Prop bot (fun _ => top)) top_intro (fun _ _ => top_intro). (** Inversion lemma for (le n m): *) Lemma le_inv : forall n m : nat, le n m -> or (eq nat n m) (ex nat (fun k => and (le n k) (eq nat m (S k)))). Proof. (* Goal: forall (n m : nat) (_ : le n m), or (eq nat n m) (ex nat (fun k : nat => and (le n k) (eq nat m (S k)))) *) intros n m H; apply H; clear H m. (* Goal: or (eq nat n n) (ex nat (fun k : nat => and (le n k) (eq nat n (S k)))) *) (* Goal: forall (p : nat) (_ : or (eq nat n p) (ex nat (fun k : nat => and (le n k) (eq nat p (S k))))), or (eq nat n (S p)) (ex nat (fun k : nat => and (le n k) (eq nat (S p) (S k)))) *) apply or_inl; apply eq_refl. (* Goal: forall (p : nat) (_ : or (eq nat n p) (ex nat (fun k : nat => and (le n k) (eq nat p (S k))))), or (eq nat n (S p)) (ex nat (fun k : nat => and (le n k) (eq nat (S p) (S k)))) *) intros m H; apply H; clear H; intro H. (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) apply or_inr; apply ex_intro with m; apply and_intro. (* Goal: eq nat (S m) (S m) *) (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) apply H; apply le_refl. apply H; apply eq_refl. (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) apply H; clear H; intros k H; apply H; clear H; intros H1 H2. (* Goal: or (eq nat n (S m)) (ex nat (fun k : nat => and (le n k) (eq nat (S m) (S k)))) *) apply or_inr; apply ex_intro with (S k); apply and_intro. (* Goal: le n (S k) *) (* Goal: eq nat (S m) (S (S k)) *) apply le_S; assumption. apply H2; apply eq_refl. Qed. Lemma le_n_Sm : forall n : nat, wf_nat n -> forall m : nat, wf_nat m -> le n (S m) -> or (le n m) (eq nat n (S m)). Proof. (* Goal: forall (n : nat) (_ : wf_nat n) (m : nat) (_ : wf_nat m) (_ : lt n (S m)), or (lt n m) (eq nat n m) *) intros n Hn m Hm H. (* Goal: or (le n m) (eq nat n (S m)) *) apply (le_inv n (S m) H); clear H; intro H. (* Goal: or (le n m) (eq nat n (S m)) *) (* Goal: or (le n m) (eq nat n (S m)) *) apply or_inr; assumption. (* Goal: or (le n m) (eq nat n (S m)) *) apply H; clear H; intros k H. (* Goal: or (le n m) (eq nat n (S m)) *) apply H; clear H; intros H1 H2. (* Goal: or (le n m) (eq nat n (S m)) *) generalize (le_trans _ _ _ Hn H1). (* Goal: forall _ : le O k, or (le n m) (eq nat n (S m)) *) intro Hk; change (wf_nat k) in Hk. (* Goal: or (le n m) (eq nat n (S m)) *) apply (eq_sym _ _ _ (eq_S_S m Hm k Hk H2)). (* Goal: or (lt n m) (eq nat n m) *) (* Goal: or (lt n m) (eq nat n m) *) apply or_inl; assumption. Qed. (** ** Strict ordering **) Definition lt (n m : nat) : Prop := le (S n) m. Lemma lt_n_Sn : forall n : nat, lt n (S n). Proof fun n => le_refl (S n). Lemma lt_S : forall n m : nat, lt n m -> lt n (S m). Proof fun n m => le_S (S n) m. Lemma lt_n_O : forall n : nat, lt n O -> bot. Proof le_Sn_O. Lemma lt_n_Sm : forall n : nat, wf_nat n -> forall m : nat, wf_nat m -> lt n (S m) -> or (lt n m) (eq nat n m). Proof. (* Goal: forall (n : nat) (_ : wf_nat n) (m : nat) (_ : wf_nat m) (_ : lt n (S m)), or (lt n m) (eq nat n m) *) intros n Hn m Hm H. (* Goal: or (lt n m) (eq nat n m) *) apply (le_n_Sm (S n) (wf_nat_S n Hn) m Hm H); clear H; intro H. (* Goal: or (lt n m) (eq nat n m) *) (* Goal: or (lt n m) (eq nat n m) *) apply or_inl; assumption. apply or_inr; apply eq_S_S; assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. (** Let (X, A, a) and (Y, B, b) be two pointed graphs (with X,Y : Typ1). The unordered pair formed by the sets represented by these pointed graphs is itself represented by the pointed graph ((sum X Y), (PAIR X A a Y B b), (out X Y)) whose edge relation (PAIR X A a Y B b) : (Rel (sum X Y)) is defined by the following four clauses : 1. Delocate A in the new graph via (inl X Y): if (A x' x), then (PAIR X A a Y B b (inl X Y x') (inl X Y x)) 2. Delocate B in the new graph via (inr X Y): if (B y' y), then (PAIR X A a Y B b (inr X Y y') (inr X Y y)) 3. Connect the (image of the) root a to the new root (out X Y): (PAIR X A a Y B b (inl X Y a) (out X Y)) 4. Connect the (image of the) root b to the new root (out X Y): (PAIR X A a Y B b (inr X Y b) (out X Y)) As usual, we define this relation by a direct impredicative encoding: *) Definition PAIR (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (z' z : sum X Y) := forall E : Prop, (forall x x' : X, eq (sum X Y) z (inl X Y x) -> eq (sum X Y) z' (inl X Y x') -> A x' x -> E) -> (forall y y' : Y, eq (sum X Y) z (inr X Y y) -> eq (sum X Y) z' (inr X Y y') -> B y' y -> E) -> (eq (sum X Y) z' (inl X Y a) -> eq (sum X Y) z (out X Y) -> E) -> (eq (sum X Y) z' (inr X Y b) -> eq (sum X Y) z (out X Y) -> E) -> E. (** The introduction rules corresponding to the 4 clauses of the definition of (PAIR X A a Y B b) are the following: *) Lemma PAIR_in1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (x x' : X), A x' x -> PAIR X A a Y B b (inl X Y x') (inl X Y x). Proof fun X A a Y B b x x' H E H1 H2 H3 H4 => H1 x x' (eq_refl (sum X Y) (inl X Y x)) (eq_refl (sum X Y) (inl X Y x')) H. Lemma PAIR_in2 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b y y' : Y), B y' y -> PAIR X A a Y B b (inr X Y y') (inr X Y y). Proof fun X A a Y B b y y' H E H1 H2 H3 H4 => H2 y y' (eq_refl (sum X Y) (inr X Y y)) (eq_refl (sum X Y) (inr X Y y')) H. Lemma PAIR_rt1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), PAIR X A a Y B b (inl X Y a) (out X Y). Proof fun X A a Y B b E H1 H2 H3 H4 => H3 (eq_refl (sum X Y) (inl X Y a)) (eq_refl (sum X Y) (out X Y)). Lemma PAIR_rt2 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), PAIR X A a Y B b (inr X Y b) (out X Y). Proof fun X A a Y B b E H1 H2 H3 H4 => H4 (eq_refl (sum X Y) (inr X Y b)) (eq_refl (sum X Y) (out X Y)). (** We first check that the left injection (inl X Y) : X -> (sum X Y) is a delocation, and deduce that the pointed graphs (X, A, a) and ((sum X Y), (PAIR X A a Y B b), (inl X Y a)) are bisimilar. *) Lemma PAIR_deloc1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), deloc X A (sum X Y) (PAIR X A a Y B b) (inl X Y). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), deloc Y B (sum X Y) (PAIR X A a Y B b) (inr X Y) *) intros X A a Y B b; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : X) (_ : A x' x), PAIR X A a Y B b (inl X Y x') (inl X Y x) *) (* Goal: forall (x : X) (y' : sum X Y) (_ : PAIR X A a Y B b y' (inl X Y x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) y' (inl X Y x')) *) exact (PAIR_in1 X A a Y B b). (* Deloc 2 (case distinction) *) (* Goal: forall (x : X) (y' : sum X Y) (_ : PAIR X A a Y B b y' (inl X Y x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) y' (inl X Y x')) *) intros x z' H; apply H; clear H. (* Deloc 2, case 1 *) (* Goal: forall (x0 x' : X) (_ : eq (sum X Y) (inl X Y x) (inl X Y x0)) (_ : eq (sum X Y) z' (inl X Y x')) (_ : A x' x0), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (sum X Y) z' (inl X Y x'0)) *) (* Goal: forall (y y' : Y) (_ : eq (sum X Y) (inl X Y x) (inr X Y y)) (_ : eq (sum X Y) z' (inr X Y y')) (_ : B y' y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) intros x0 x' H1 H2 H3; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: eq (sum X Y) z' (inl X Y x') *) (* Goal: forall (y y' : Y) (_ : eq (sum X Y) (inl X Y x) (inr X Y y)) (_ : eq (sum X Y) z' (inr X Y y')) (_ : B y' y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) apply (eq_sym _ _ _ (eq_inl_inl X Y x x0 H1)); assumption. (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) assumption. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (y y' : Y) (_ : eq (sum X Y) (inl X Y x) (inr X Y y)) (_ : eq (sum X Y) z' (inr X Y y')) (_ : B y' y), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) intros y y' H1 H2 H3. (* Goal: ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) apply (eq_inl_inr X Y x y H1). (* Deloc 2, case 3 (absurd) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) intros H1 H2; apply (eq_inl_out X Y x H2). (* Deloc 2, case 4 (absurd) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inl X Y x) (out X Y)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X Y) z' (inl X Y x')) *) intros H1 H2; apply (eq_inl_out X Y x H2). Qed. Lemma PAIR_eqv1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a (sum X Y) (PAIR X A a Y B b) (inl X Y a). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a (sum X Y) (PAIR X A a Y B b) (inl X Y a) *) intros; apply EQV_deloc; apply PAIR_deloc1. Qed. (** The same for the right injection (inr X Y) : Y -> (sum X Y). *) Lemma PAIR_deloc2 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), deloc Y B (sum X Y) (PAIR X A a Y B b) (inr X Y). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), deloc Y B (sum X Y) (PAIR X A a Y B b) (inr X Y) *) intros X A a Y B b; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : Y) (_ : B x' x), PAIR X A a Y B b (inr X Y x') (inr X Y x) *) (* Goal: forall (x : Y) (y' : sum X Y) (_ : PAIR X A a Y B b y' (inr X Y x)), ex2 Y (fun x' : Y => B x' x) (fun x' : Y => eq (sum X Y) y' (inr X Y x')) *) exact (PAIR_in2 X A a Y B b). (* Deloc 2 (case distinction) *) (* Goal: forall (x : Y) (y' : sum X Y) (_ : PAIR X A a Y B b y' (inr X Y x)), ex2 Y (fun x' : Y => B x' x) (fun x' : Y => eq (sum X Y) y' (inr X Y x')) *) intros y z' H; apply H; clear H. (* Deloc 2, case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (sum X Y) (inr X Y y) (inl X Y x)) (_ : eq (sum X Y) z' (inl X Y x')) (_ : A x' x), ex2 Y (fun x'0 : Y => B x'0 y) (fun x'0 : Y => eq (sum X Y) z' (inr X Y x'0)) *) (* Goal: forall (y0 y' : Y) (_ : eq (sum X Y) (inr X Y y) (inr X Y y0)) (_ : eq (sum X Y) z' (inr X Y y')) (_ : B y' y0), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) intros x x' H1 H2 H3; apply (eq_inr_inl X Y x y H1). (* Deloc 2, case 2 *) (* Goal: forall (y0 y' : Y) (_ : eq (sum X Y) (inr X Y y) (inr X Y y0)) (_ : eq (sum X Y) z' (inr X Y y')) (_ : B y' y0), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inl X Y a)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) intros y0 y' H1 H2 H3; apply ex2_intro with y'. (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) apply (eq_sym _ _ _ (eq_inr_inr X Y y y0 H1)); assumption. (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) assumption. (* Deloc 2, case 3 (absurd) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) intros H1 H2; apply (eq_inr_out X Y y H2). (* Deloc 2, case 4 (absurd) *) (* Goal: forall (_ : eq (sum X Y) z' (inr X Y b)) (_ : eq (sum X Y) (inr X Y y) (out X Y)), ex2 Y (fun x' : Y => B x' y) (fun x' : Y => eq (sum X Y) z' (inr X Y x')) *) intros H1 H2; apply (eq_inr_out X Y y H2). Qed. Lemma PAIR_eqv2 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV Y B b (sum X Y) (PAIR X A a Y B b) (inr X Y b). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV Y B b (sum X Y) (PAIR X A a Y B b) (inr X Y b) *) intros; apply EQV_deloc; apply PAIR_deloc2. Qed. (** From PAIR_eqv1 and PAIR_eqv2, we easily get that the pointed graphs (X, A, a) and (Y, B, b) are elements of the unordered pair. *) Lemma pairing_intro1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT X A a (sum X Y) (PAIR X A a Y B b) (out X Y). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT X A a (sum X Y) (PAIR X A a Y B b) (out X Y) *) intros X A a Y B b; apply ELT_intro with (inl X Y a). (* Goal: PAIR X A a Y B b (inl X Y a) (out X Y) *) (* Goal: EQV X A a (sum X Y) (PAIR X A a Y B b) (inl X Y a) *) apply PAIR_rt1. apply PAIR_eqv1. Qed. Lemma pairing_intro2 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) intros X A a Y B b; apply ELT_intro with (inr X Y b). (* Goal: PAIR X A a Y B b (inr X Y b) (out X Y) *) (* Goal: EQV Y B b (sum X Y) (PAIR X A a Y B b) (inr X Y b) *) apply PAIR_rt2. apply PAIR_eqv2. Qed. (** And conversely, (X, A, a) and (Y, B, b) are the only elements of the pair, up to bisimulation. *) Lemma pairing_elim : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y) -> or (EQV Z C c X A a) (EQV Z C c Y B b). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z) (_ : ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) intros X A a Y B b Z C c H. (* Goal: or (EQV Z C c X A a) (EQV Z C c Y B b) *) apply H; clear H; intros c' H H1. (* Goal: or (EQV Z C c X A a) (EQV Z C c Y B b) *) apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (sum X Y) (out X Y) (inl X Y x)) (_ : eq (sum X Y) c' (inl X Y x')) (_ : A x' x), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (y y' : Y) (_ : eq (sum X Y) (out X Y) (inr X Y y)) (_ : eq (sum X Y) c' (inr X Y y')) (_ : B y' y), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (_ : eq (sum X Y) c' (inl X Y a)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (_ : eq (sum X Y) c' (inr X Y b)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) intros x x' H2 H3 H4; apply (eq_out_inl X Y x H2). (* Case 2 (absurd) *) (* Goal: forall (y y' : Y) (_ : eq (sum X Y) (out X Y) (inr X Y y)) (_ : eq (sum X Y) c' (inr X Y y')) (_ : B y' y), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (_ : eq (sum X Y) c' (inl X Y a)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (_ : eq (sum X Y) c' (inr X Y b)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) intros y y' H2 H3 H4; apply (eq_out_inr X Y y H2). (* Case 3 *) (* Goal: forall (_ : eq (sum X Y) c' (inl X Y a)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) (* Goal: forall (_ : eq (sum X Y) c' (inr X Y b)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) intros H2 H3; apply or_inl. (* Goal: EQV Z C c X A a *) (* Goal: forall (_ : eq (sum X Y) c' (inr X Y b)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) apply EQV_trans with (sum X Y) (PAIR X A a Y B b) (inl X Y a). (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) apply H2; assumption. apply EQV_sym; apply PAIR_eqv1. (* Case 4 *) (* Goal: forall (_ : eq (sum X Y) c' (inr X Y b)) (_ : eq (sum X Y) (out X Y) (out X Y)), or (EQV Z C c X A a) (EQV Z C c Y B b) *) intros H2 H3; apply or_inr. (* Goal: EQV Z C c Y B b *) apply EQV_trans with (sum X Y) (PAIR X A a Y B b) (inr X Y b). (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) apply H2; assumption. apply EQV_sym; apply PAIR_eqv2. Qed. (** By collecting the last three lemmas, we obtain the desired result: *) Theorem pairing : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), iff (ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y)) (or (EQV Z C c X A a) (EQV Z C c Y B b)). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), iff (ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y)) (or (EQV Z C c X A a) (EQV Z C c Y B b)) *) intros; unfold iff in |- *; apply and_intro. (* Forward implication *) (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) intro; apply pairing_elim; assumption. (* Backward implication: case distinction *) (* Goal: forall _ : or (EQV Z C c X A a) (EQV Z C c Y B b), ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y) *) intro H; apply H; clear H; intro H. (* First case *) (* Goal: ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y) *) (* Goal: ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y) *) apply ELT_compat_l with X A a. (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) assumption. apply pairing_intro1. (* Second case *) (* Goal: ELT Z C c (sum X Y) (PAIR X A a Y B b) (out X Y) *) apply ELT_compat_l with Y B b. (* Goal: EQV Z C c Y B b *) (* Goal: ELT Y B b (sum X Y) (PAIR X A a Y B b) (out X Y) *) assumption. apply pairing_intro2. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. Require Import IZF_nat. (*************) (** * Zero *) (*************) (** In set theory, zero is implemented as the empty set. As a pointed graph, we can take any (non-empty) carrier and any root, with an empty edge relation: *) Definition unit : Typ1 := forall X : Typ0, X -> X. Definition id : unit := fun X x => x. Definition ZERO : Rel unit := fun _ _ => bot. Lemma ZERO_elim : forall (X : Typ1) (A : Rel X) (a : X), ELT X A a unit ZERO id -> bot. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (_ : ELT X A a unit ZERO id), bot *) intros X A a H; apply H. (* Goal: forall (b' : unit) (_ : ZERO b' id) (_ : EQV X A a unit ZERO b'), bot *) intros b' H1 H2; exact H1. Qed. (*******************************) (** * The successor function *) (*******************************) (** In set theory, the successor of von Neumann numeral n is encoded as the set n U {n}, whose existence follows from the pairing axiom (used twice) and the union axiom, that have been already derived in the files "IZF_pair.v" and "IZF_union.v". However, it is simpler to give here a direct implementation of the successor as follows. Formally, the successor of a given pointed graph (X, A, a) is represented as the pointed graph ((opt X), (SUCC X A a), (none X)) whose edge relation is defined by the following three clauses: 1. Delocate A in the new graph via (some X): if (A x' x), then (SUCC X A a (some X x') (some X x)) 2. Connect the image of any direct element of the old root a:X to the new root: if (A x a), then (SUCC X A a (some X x) (none X)) 3. Connect the old root to the new root: (SUCC X A a (some X a) (none X)). As usual, we use a second-order encoding to define this relation. *) Definition SUCC (X : Typ1) (A : Rel X) (a : X) : Rel (opt X) := fun z' z => forall E : Prop, (forall x x' : X, eq (opt X) z (some X x) -> eq (opt X) z' (some X x') -> A x' x -> E) -> (forall x' : X, eq (opt X) z (none X) -> eq (opt X) z' (some X x') -> A x' a -> E) -> (eq (opt X) z (none X) -> eq (opt X) z' (some X a) -> E) -> E. Lemma SUCC_in : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> SUCC X A a (some X x') (some X x). Proof fun X A a x x' H E H1 _ _ => H1 x x' (eq_refl (opt X) (some X x)) (eq_refl (opt X) (some X x')) H. Lemma SUCC_rt1 : forall (X : Typ1) (A : Rel X) (a x' : X), A x' a -> SUCC X A a (some X x') (none X). Proof fun X A a x' H E _ H2 _ => H2 x' (eq_refl (opt X) (none X)) (eq_refl (opt X) (some X x')) H. Lemma SUCC_rt2 : forall (X : Typ1) (A : Rel X) (a : X), SUCC X A a (some X a) (none X). Proof fun X A a E _ _ H3 => H3 (eq_refl (opt X) (none X)) (eq_refl (opt X) (some X a)). Lemma SUCC_deloc : forall (X : Typ1) (A : Rel X) (a : X), deloc X A (opt X) (SUCC X A a) (some X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X), deloc X A (opt X) (SUCC X A a) (some X) *) intros X A a; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : X) (_ : A x' x), SUCC X A a (some X x') (some X x) *) (* Goal: forall (x : X) (y' : opt X) (_ : SUCC X A a y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros; apply SUCC_in; assumption. (* Deloc 2 *) (* Goal: forall (x : X) (y' : opt X) (_ : SUCC X A a y' (some X x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros x y' H; apply H; clear H. (* Deloc 2, case 1 *) (* Goal: forall (x0 x' : X) (_ : eq (opt X) (some X x) (some X x0)) (_ : eq (opt X) y' (some X x')) (_ : A x' x0), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) (* Goal: forall (x' : X) (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X x')) (_ : A x' a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) (* Goal: forall (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X a)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros x0 x' H1 H2 H3; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: eq (opt X) y' (some X x') *) (* Goal: forall (x' : X) (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X x')) (_ : A x' a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) (* Goal: forall (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X a)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) apply (eq_sym _ _ _ (eq_some_some X x x0 H1)); assumption. (* Goal: P (opt nat) OMEGA (some nat n) *) assumption. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (x' : X) (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X x')) (_ : A x' a), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (opt X) y' (some X x'0)) *) (* Goal: forall (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X a)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros x' H1 H2 H3; apply (eq_some_none _ _ H1). (* Deloc 2, case 3 (absurd) *) (* Goal: forall (_ : eq (opt X) (some X x) (none X)) (_ : eq (opt X) y' (some X a)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (opt X) y' (some X x')) *) intros H1 H2; apply (eq_some_none _ _ H1). Qed. Lemma SUCC_eqv : forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (opt X) (SUCC X A a) (some X x). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (opt X) (SUCC X A a) (some X x) *) intros X A a x; apply EQV_deloc; apply SUCC_deloc. Qed. Lemma SUCC_intro1 : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b X A a -> ELT Y B b (opt X) (SUCC X A a) (none X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b X A a), ELT Y B b (opt X) (SUCC X A a) (none X) *) intros X A a Y B b H; apply H; clear H; intros a' H1 H2. (* Goal: P (opt nat) OMEGA (some nat n) *) apply ELT_intro with (some X a'). apply SUCC_rt1; assumption. (* Goal: P (opt nat) OMEGA (some nat n) *) apply EQV_trans with X A a'. assumption. apply SUCC_eqv. Qed. Lemma SUCC_intro2 : forall (X : Typ1) (A : Rel X) (a : X), ELT X A a (opt X) (SUCC X A a) (none X). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X), ELT X A a (opt X) (SUCC X A a) (none X) *) intros X A a; apply ELT_intro with (some X a). (* Goal: EQV X A a (opt X) (SUCC X A a) (some X a) *) apply SUCC_rt2. apply SUCC_eqv. Qed. Lemma SUCC_elim : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (opt X) (SUCC X A a) (none X) -> or (ELT Y B b X A a) (EQV Y B b X A a). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b (opt X) (SUCC X A a) (none X)), or (ELT Y B b X A a) (EQV Y B b X A a) *) intros X A a Y B b H; apply H; clear H. (* Goal: forall (b' : opt X) (_ : SUCC X A a b' (none X)) (_ : EQV Y B b (opt X) (SUCC X A a) b'), or (ELT Y B b X A a) (EQV Y B b X A a) *) intros z' H H1; apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (opt X) (none X) (some X x)) (_ : eq (opt X) z' (some X x')) (_ : A x' x), or (ELT Y B b X A a) (EQV Y B b X A a) *) (* Goal: forall (x' : X) (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X x')) (_ : A x' a), or (ELT Y B b X A a) (EQV Y B b X A a) *) (* Goal: forall (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X a)), or (ELT Y B b X A a) (EQV Y B b X A a) *) intros x x' H2 H3 H4; apply (eq_none_some _ _ H2). (* Case 2 *) (* Goal: forall (x' : X) (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X x')) (_ : A x' a), or (ELT Y B b X A a) (EQV Y B b X A a) *) (* Goal: forall (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X a)), or (ELT Y B b X A a) (EQV Y B b X A a) *) intros x' H2 H3 H4; apply or_inl; apply ELT_intro with x'. (* Goal: P (opt nat) OMEGA (some nat n) *) assumption. (* Goal: EQV Y B b X A x' *) (* Goal: forall (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X a)), or (ELT Y B b X A a) (EQV Y B b X A a) *) apply EQV_trans with (opt X) (SUCC X A a) (some X x'). (* Goal: P (opt nat) OMEGA (some nat n) *) apply H3; assumption. apply EQV_sym; apply SUCC_eqv. (* Case 3 *) (* Goal: forall (_ : eq (opt X) (none X) (none X)) (_ : eq (opt X) z' (some X a)), or (ELT Y B b X A a) (EQV Y B b X A a) *) intros H2 H3; apply or_inr. (* Goal: EQV Y B b X A a *) apply EQV_trans with (opt X) (SUCC X A a) (some X a). (* Goal: P (opt nat) OMEGA (some nat n) *) apply H3; assumption. apply EQV_sym; apply SUCC_eqv. Qed. Lemma successor : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (SUCC X A a) (none X)) (or (ELT Y B b X A a) (EQV Y B b X A a)). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (SUCC X A a) (none X)) (or (ELT Y B b X A a) (EQV Y B b X A a)) *) intros X A a Y B b; unfold iff in |- *. (* Goal: and (forall _ : ELT Y B b (opt X) (SUCC X A a) (none X), or (ELT Y B b X A a) (EQV Y B b X A a)) (forall _ : or (ELT Y B b X A a) (EQV Y B b X A a), ELT Y B b (opt X) (SUCC X A a) (none X)) *) apply and_intro; intro H. (* Direct implication (elim) *) (* Goal: P (opt nat) OMEGA (some nat n) *) apply SUCC_elim; assumption. (* Converse implication (intro1,2) *) (* Goal: ELT Y B b (opt X) (SUCC X A a) (none X) *) apply H; clear H; intro H. (* Goal: P (opt nat) OMEGA (some nat n) *) apply SUCC_intro1; assumption. (* Goal: ELT Y B b (opt X) (SUCC X A a) (none X) *) apply ELT_compat_l with X A a. (* Goal: P (opt nat) OMEGA (some nat n) *) assumption. apply SUCC_intro2. Qed. Lemma SUCC_compat : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a Y B b -> EQV (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y). Proof. cut (forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), EQV X A a Y B b -> SUB (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y)). (* Goal: forall (_ : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b), SUB (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y)) (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b), EQV (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y) *) (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b), SUB (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y) *) intros H X A a Y B b H1; apply extensionality. (* Goal: P (opt nat) OMEGA (some nat n) *) apply H; assumption. apply H; apply EQV_sym; assumption. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : EQV X A a Y B b), SUB (opt X) (SUCC X A a) (none X) (opt Y) (SUCC Y B b) (none Y) *) unfold SUB in |- *; intros X A a Y B b H Z C c H1. (* Goal: ELT Z C c (opt Y) (SUCC Y B b) (none Y) *) apply (SUCC_elim X A a Z C c H1); clear H1; intro H1. (* Goal: P (opt nat) OMEGA (some nat n) *) apply SUCC_intro1; apply ELT_compat_r with X A a; assumption. (* Goal: ELT Z C c (opt Y) (SUCC Y B b) (none Y) *) apply ELT_compat_l with Y B b. (* Goal: P (opt nat) OMEGA (some nat n) *) apply EQV_trans with X A a; assumption. (* Goal: ELT (opt nat) OMEGA (some nat n) (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat (S n)) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply SUCC_intro2. Qed. (**************************************) (** * The set of von Neuman numerals *) (**************************************) (** The set omega of von Neumann numerals is represented as the pointed graph ((opt nat), OMEGA, (none nat)) whose edge relation OMEGA : (Rel (opt nat)) is defined by the following two clauses: 1. Delocation of the strict ordering "lt" if (wf_nat n), (wf_nat m) and (lt n m), then (OMEGA (some nat n) (some nat m)) 2. Connecting wf_nat's to the new root: if (wf_nat n), then (OMEGA (some nat n) (none nat)). As usual, we define it via a second-order encoding: *) Definition OMEGA : Rel (opt nat) := fun z' z => forall E : Prop, (forall n n' : nat, eq (opt nat) z (some nat n) -> eq (opt nat) z' (some nat n') -> wf_nat n -> wf_nat n' -> lt n' n -> E) -> (forall n' : nat, eq (opt nat) z (none nat) -> eq (opt nat) z' (some nat n') -> wf_nat n' -> E) -> E. (** The corresponding constructors are the following: *) Lemma OMEGA_in : forall n : nat, wf_nat n -> forall m : nat, wf_nat m -> lt n m -> OMEGA (some nat n) (some nat m). Proof fun n Hn m Hm H E H1 _ => H1 m n (eq_refl (opt nat) (some nat m)) (eq_refl (opt nat) (some nat n)) Hm Hn H. Lemma OMEGA_rt : forall n : nat, wf_nat n -> OMEGA (some nat n) (none nat). Proof fun n Hn E _ H2 => H2 n (eq_refl (opt nat) (none nat)) (eq_refl (opt nat) (some nat n)) Hn. (** The pointed graph ((opt nat), OMEGA, (some nat O)) is bisimilar to the pointed graph (unit ZERO id) that represents the empty set. This is done by extensionality. *) Lemma OMEGA_ZERO : EQV (opt nat) OMEGA (some nat O) unit ZERO id. Proof. (* Goal: EQV (opt nat) OMEGA (some nat O) unit ZERO id *) apply extensionality; unfold SUB in |- *; intros X A a H. (* Direct inclusion *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply H; clear H; intros z H H1; apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (n n' : nat) (_ : eq (opt nat) (some nat O) (some nat n)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n) (_ : wf_nat n') (_ : lt n' n), ELT X A a unit ZERO id *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat O) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a unit ZERO id *) (* Goal: ELT X A a (opt nat) OMEGA (some nat O) *) intros n m H2 H3 Hn Hm H4. (* Goal: ELT X A a unit ZERO id *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat O) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a unit ZERO id *) (* Goal: ELT X A a (opt nat) OMEGA (some nat O) *) generalize (eq_sym _ _ _ (eq_some_some _ _ _ H2)); intro H5. (* Goal: ELT X A a unit ZERO id *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat O) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a unit ZERO id *) (* Goal: ELT X A a (opt nat) OMEGA (some nat O) *) apply (lt_n_O m (H5 (lt m) H4)). (* Case 2 (absurd) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat O) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a unit ZERO id *) (* Goal: ELT X A a (opt nat) OMEGA (some nat O) *) intros n H2 H3 Hn; apply (eq_some_none _ _ H2). (* Converse inclusion *) (* Goal: ELT X A a (opt nat) OMEGA (some nat O) *) apply H; clear H; intros u H H1; apply H. Qed. (** Inductive case: for any n:nat such that (wf_nat n), the pointed graph ((opt nat), OMEGA, (some nat (S n))) is bisimilar to the successor of the pointed graph ((opt nat), OMEGA, (some nat n)). Again, this is done by extensionality. *) Lemma OMEGA_SUCC : forall n : nat, wf_nat n -> EQV (opt nat) OMEGA (some nat (S n)) (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)). Proof. (* Goal: EQV (opt nat) OMEGA (some nat O) unit ZERO id *) intros n Hn; apply extensionality; unfold SUB in |- *; intros X A a H. (* Direct inclusion *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply H; clear H; intros z H H1; apply H; clear H. (* Case 1 *) (* Goal: forall (n0 n' : nat) (_ : eq (opt nat) (some nat n) (some nat n0)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n0) (_ : wf_nat n') (_ : lt n' n0), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) intros n0 m H H2 Hn0 Hm H3. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) generalize (eq_sym _ _ _ (eq_some_some _ _ _ H)); clear H; intro H. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) generalize (H (lt m) H3); clear H H3 Hn0 n0; intro H3. (* Case 1: Case disjunction on (lt m (S n)) *) (* Goal: ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat (S n)) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply (lt_n_Sm m Hm n Hn H3); clear H3; intro H3. (* Case 1a: (lt m n) *) (* Goal: ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat (S n)) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply SUCC_intro1; apply ELT_intro with (some nat m). (* Goal: P (opt nat) OMEGA (some nat n) *) exact (OMEGA_in m Hm n Hn H3). apply H2; assumption. (* Case 1b: (eq nat m n) *) (* Goal: ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat (S n)) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply ELT_compat_l with (opt nat) OMEGA (some nat n). (* Goal: P (opt nat) OMEGA (some nat n) *) apply H3; apply H2; assumption. apply SUCC_intro2. (* Case 2 (absurd) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) intros m H H2 Hm; apply (eq_some_none _ _ H). (* Converse inclusion *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply (SUCC_elim _ _ _ _ _ _ H); clear H; intro H. (* Case 1 *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply H; clear H; intros z H H1; apply H; clear H. (* Case 1a *) (* Goal: forall (n0 n' : nat) (_ : eq (opt nat) (some nat n) (some nat n0)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n0) (_ : wf_nat n') (_ : lt n' n0), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) intros n0 m H H2 Hn0 Hm H3. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) generalize (eq_sym _ _ _ (eq_some_some _ _ _ H)); clear H; intro H. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) generalize (H (lt m) H3); clear H H3 Hn0 n0; intro H3. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply ELT_intro with (some nat m). (* Goal: OMEGA (some nat m) (some nat (S n)) *) (* Goal: EQV X A a (opt nat) OMEGA (some nat m) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) exact (OMEGA_in m Hm (S n) (wf_nat_S n Hn) (lt_S m n H3)). (* Goal: P (opt nat) OMEGA (some nat n) *) apply H2; assumption. (* Case 1b (absurd) *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (some nat n) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) intros m H H2 Hm; apply (eq_some_none _ _ H). (* Case 2 *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) apply ELT_intro with (some nat n). (* Goal: OMEGA (some nat n) (some nat (S n)) *) (* Goal: EQV X A a (opt nat) OMEGA (some nat n) *) exact (OMEGA_in n Hn (S n) (wf_nat_S n Hn) (lt_n_Sn n)). (* Goal: P (opt nat) OMEGA (some nat n) *) assumption. Qed. (** ** The axiom of infinity **) (** The set denoted by the pointed graph ((opt nat), OMEGA, (none nat)) contains zero (i.e. the empty set)... *) Theorem omega_zero : ELT unit ZERO id (opt nat) OMEGA (none nat). Proof. (* Goal: ELT unit ZERO id (opt nat) OMEGA (none nat) *) apply ELT_intro with (some nat O). (* Goal: OMEGA (some nat O) (none nat) *) (* Goal: EQV unit ZERO id (opt nat) OMEGA (some nat O) *) exact (OMEGA_rt O wf_nat_O). (* Goal: EQV unit ZERO id (opt nat) OMEGA (some nat O) *) (* Goal: P unit ZERO id *) (* Goal: forall (p : nat) (_ : wf_nat p) (_ : P (opt nat) OMEGA (some nat p)), P (opt nat) OMEGA (some nat (S p)) *) apply EQV_sym; exact OMEGA_ZERO. Qed. (** ... and is closed under successor: *) Theorem omega_succ : forall (X : Typ1) (A : Rel X) (a : X), ELT X A a (opt nat) OMEGA (none nat) -> ELT (opt X) (SUCC X A a) (none X) (opt nat) OMEGA (none nat). Proof. (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) (* Goal: ELT X A a (opt nat) OMEGA (some nat (S n)) *) intros X A a H; apply H; clear H; intros z H H1; apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (n n' : nat) (_ : eq (opt nat) (none nat) (some nat n)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n) (_ : wf_nat n') (_ : lt n' n), P X A a *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (none nat) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), P X A a *) intros n m H H2 Hn Hm H3; apply (eq_none_some _ _ H). (* Case 2 *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (none nat) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), ELT (opt X) (SUCC X A a) (none X) (opt nat) OMEGA (none nat) *) intros n H0 H Hn; apply ELT_intro with (some nat (S n)). (* Goal: OMEGA (some nat (S n)) (none nat) *) (* Goal: EQV (opt X) (SUCC X A a) (none X) (opt nat) OMEGA (some nat (S n)) *) exact (OMEGA_rt (S n) (wf_nat_S n Hn)). apply EQV_trans with (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)). (* Goal: P (opt nat) OMEGA (some nat n) *) apply SUCC_compat; apply H; assumption. (* Goal: P (opt nat) OMEGA (some nat n) *) apply EQV_sym; apply OMEGA_SUCC; assumption. Qed. (** And we now check the induction principle on omega: *) Require Import IZF_select. (* For PRED and Compat *) Theorem omega_ind : (* If P is a compatible predicate such that: *) forall P : PRED, Compat P -> (* 1. P holds for zero *) P unit ZERO id -> (* 2. If P holds for an element of omega, then P holds for the successor of this element *) (forall (X : Typ1) (A : Rel X) (a : X), ELT X A a (opt nat) OMEGA (none nat) -> P X A a -> P (opt X) (SUCC X A a) (none X)) -> (* Then: P holds for any element of omega *) forall (X : Typ1) (A : Rel X) (a : X), ELT X A a (opt nat) OMEGA (none nat) -> P X A a. Proof. (* Goal: forall (P : PRED) (_ : Compat P) (_ : P unit ZERO id) (_ : forall (X : Typ1) (A : Rel X) (a : X) (_ : ELT X A a (opt nat) OMEGA (none nat)) (_ : P X A a), P (opt X) (SUCC X A a) (none X)) (X : Typ1) (A : Rel X) (a : X) (_ : ELT X A a (opt nat) OMEGA (none nat)), P X A a *) intros P HP HO HS X A a H; apply H; clear H. (* Goal: forall (b' : opt nat) (_ : OMEGA b' (none nat)) (_ : EQV X A a (opt nat) OMEGA b'), P X A a *) intros z H H1; apply H; clear H. (* Case 1 (absurd) *) (* Goal: forall (n n' : nat) (_ : eq (opt nat) (none nat) (some nat n)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n) (_ : wf_nat n') (_ : lt n' n), P X A a *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (none nat) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), P X A a *) intros n m H H2 Hn Hm H3; apply (eq_none_some _ _ H). (* Case 2 *) (* Goal: forall (n' : nat) (_ : eq (opt nat) (none nat) (none nat)) (_ : eq (opt nat) z (some nat n')) (_ : wf_nat n'), P X A a *) intros n H0 H Hn; clear H0. (* Goal: P X A a *) apply (HP _ _ _ _ _ _ (EQV_sym _ _ _ _ _ _ H1)). (* Goal: P (opt nat) OMEGA z *) apply (eq_sym _ _ _ H); clear H H1 a A X z. (* Perform induction on n:nat *) (* Goal: P (opt nat) OMEGA (some nat n) *) apply (nat_ind' n Hn); clear Hn n. (* Basic case *) (* Goal: P (opt nat) OMEGA (some nat O) *) (* Goal: forall (p : nat) (_ : wf_nat p) (_ : P (opt nat) OMEGA (some nat p)), P (opt nat) OMEGA (some nat (S p)) *) apply HP with unit ZERO id. (* Goal: P (opt nat) OMEGA (some nat n) *) apply EQV_sym; exact OMEGA_ZERO. assumption. (* Inductive case *) (* Goal: forall (p : nat) (_ : wf_nat p) (_ : P (opt nat) OMEGA (some nat p)), P (opt nat) OMEGA (some nat (S p)) *) intros n Hn Hind. apply HP with (opt (opt nat)) (SUCC (opt nat) OMEGA (some nat n)) (none (opt nat)). (* Goal: P (opt nat) OMEGA (some nat n) *) apply EQV_sym; apply OMEGA_SUCC; assumption. (* Goal: P (opt nat) OMEGA (some nat n) *) apply HS. apply ELT_direct; apply OMEGA_rt; assumption. (* Goal: P (opt nat) OMEGA (some nat n) *) assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. (** Let (X, A, a) be a pointed graph. The powerset of the set represented by this pointed graph is itself represented by the pointed graph ((sum X X->Prop), (POWER X A a), (out X X->Prop)) whose edge relation (POWER X A a) : (Rel (sum X X->Prop)) is defined by the following 3 clauses: 1. Delocating A into the powerset: if (A x' x), then (POWER X A a (inl X X->Prop x') (inl X X->Prop x)) 2. Connecting each vertex x':X such that (A x' a) to all the predicates p : X->Prop such that (p x'): if (A x' a) and (p x'), then (POWER X A a (inl X X->Prop x') (inr X X->Prop p)) 3. Connecting all the predicates p : X->Prop to the new root: (POWER X A a (inr X X->Prop p) (out X X->Prop)). This relation is impredicatively encoded as follows: *) Definition POWER (X : Typ1) (A : Rel X) (a : X) (z' z : sum X (X -> Prop)) := forall E : Prop, (forall x x' : X, eq (sum X (X -> Prop)) z' (inl X (X -> Prop) x') -> eq (sum X (X -> Prop)) z (inl X (X -> Prop) x) -> A x' x -> E) -> (forall (x' : X) (p : X -> Prop), eq (sum X (X -> Prop)) z' (inl X (X -> Prop) x') -> eq (sum X (X -> Prop)) z (inr X (X -> Prop) p) -> A x' a -> p x' -> E) -> (forall p : X -> Prop, eq (sum X (X -> Prop)) z' (inr X (X -> Prop) p) -> eq (sum X (X -> Prop)) z (out X (X -> Prop)) -> E) -> E. (** Introduction rules corresponding to the clauses: *) Lemma POWER_in1 : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> POWER X A a (inl X (X -> Prop) x') (inl X (X -> Prop) x). Proof fun X A a x x' H E e _ _ => e x x' (eq_refl (sum X (X -> Prop)) (inl X (X -> Prop) x')) (eq_refl (sum X (X -> Prop)) (inl X (X -> Prop) x)) H. Lemma POWER_in2 : forall (X : Typ1) (A : Rel X) (a x' : X) (p : X -> Prop), A x' a -> p x' -> POWER X A a (inl X (X -> Prop) x') (inr X (X -> Prop) p). Proof fun X A a x' p H1 H2 E _ e _ => e x' p (eq_refl (sum X (X -> Prop)) (inl X (X -> Prop) x')) (eq_refl (sum X (X -> Prop)) (inr X (X -> Prop) p)) H1 H2. Lemma POWER_rt : forall (X : Typ1) (A : Rel X) (a : X) (p : X -> Prop), POWER X A a (inr X (X -> Prop) p) (out X (X -> Prop)). Proof fun X A a p E _ _ e => e p (eq_refl (sum X (X -> Prop)) (inr X (X -> Prop) p)) (eq_refl (sum X (X -> Prop)) (out X (X -> Prop))). (** We now prove that the left injection (inl X X->Prop) is a delocation from (X, A) to ((sum X X->Prop), (POWER X A a)), and deduce the expected property of bisimilarity. *) Lemma POWER_deloc : forall (X : Typ1) (A : Rel X) (a : X), deloc X A (sum X (X -> Prop)) (POWER X A a) (inl X (X -> Prop)). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X), deloc X A (sum X (forall _ : X, Prop)) (POWER X A a) (inl X (forall _ : X, Prop)) *) intros X A a; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x x' : X) (_ : A x' x), POWER X A a (inl X (forall _ : X, Prop) x') (inl X (forall _ : X, Prop) x) *) (* Goal: forall (x : X) (y' : sum X (forall _ : X, Prop)) (_ : POWER X A a y' (inl X (forall _ : X, Prop) x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) exact (POWER_in1 X A a). (* Deloc 2 (case distinction) *) (* Goal: forall (x : X) (y' : sum X (forall _ : X, Prop)) (_ : POWER X A a y' (inl X (forall _ : X, Prop) x)), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) intros x y' H; apply H; clear H. (* Deloc 2, case 1 *) (* Goal: forall (x0 x' : X) (_ : eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (inl X (forall _ : X, Prop) x0)) (_ : A x' x0), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x'0)) *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x'0)) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (out X (forall _ : X, Prop))), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) intros x0 x' H1 H2 H3; apply ex2_intro with x'. (* Goal: A x' x *) (* Goal: eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x') *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x'0)) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (out X (forall _ : X, Prop))), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) apply (eq_sym _ _ _ (eq_inl_inl X (X -> Prop) x x0 H2)); assumption. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) assumption. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ex2 X (fun x'0 : X => A x'0 x) (fun x'0 : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x'0)) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (out X (forall _ : X, Prop))), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) intros x' p H1 H2 H3 H4; apply (eq_inl_inr X (X -> Prop) x p H2). (* Deloc 2, case 3 (absurd) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) y' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x) (out X (forall _ : X, Prop))), ex2 X (fun x' : X => A x' x) (fun x' : X => eq (sum X (forall _ : X, Prop)) y' (inl X (forall _ : X, Prop) x')) *) intros p H1 H2; apply (eq_inl_out X (X -> Prop) x H2). Qed. Lemma POWER_eqv : forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (sum X (X -> Prop)) (POWER X A a) (inl X (X -> Prop) x). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (sum X (forall _ : X, Prop)) (POWER X A a) (inl X (forall _ : X, Prop) x) *) intros X A a x; apply EQV_deloc; apply POWER_deloc. Qed. (** Moreover, any subset of (X, A, a) is bisimilar to a pointed graph of the form ((sum X X->Prop), (POWER X A a), (inr X X->Prop) p) for a suitable predicate p : X->Prop. *) Lemma POWER_subset_eqv : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), SUB Y B b X A a -> EQV Y B b (sum X (X -> Prop)) (POWER X A a) (inr X (X -> Prop) (fun x' => and (A x' a) (ELT X A x' Y B b))). Proof. (* We reason by extensionality: *) (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : SUB Y B b X A a), EQV Y B b (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) *) intros X A a Y B b H1; apply extensionality. (* Inclusion (SUB Y B b (sum ...) (POWER ...) (inr ... p)) *) (* Goal: SUB Y B b (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) unfold SUB in |- *; intros Z C c H2. (* Goal: ELT Z C c (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) apply (H1 Z C c H2); intros x' H3 H4. (* Goal: ELT Z C c (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) apply ELT_intro with (inl X (X -> Prop) x'). (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply POWER_in2. assumption. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply and_intro. assumption. (* Goal: ELT X A x' Y B b *) (* Goal: EQV Z C c (sum X (forall _ : X, Prop)) (POWER X A a) (inl X (forall _ : X, Prop) x') *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) apply ELT_compat_l with Z C c. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply EQV_sym; assumption. assumption. (* Goal: EQV Z C c (sum X (forall _ : X, Prop)) (POWER X A a) (inl X (forall _ : X, Prop) x') *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) apply EQV_trans with X A x'. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) assumption. apply POWER_eqv; assumption. (* Inclusion (SUB (sum ...) (POWER ...) (inr ... p) Y B b) *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) unfold SUB in |- *; intros Z C c H2; apply H2; clear H2. (* Goal: forall (b' : sum X (forall _ : X, Prop)) (_ : POWER X A a b' (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b)))) (_ : EQV Z C c (sum X (forall _ : X, Prop)) (POWER X A a) b'), ELT Z C c Y B b *) intros z H2 H3; apply H2; clear H2. (* Case distinction *) (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x'0 : X => and (A x'0 a) (ELT X A x'0 Y B b))) (inl X (forall _ : X, Prop) x)) (_ : A x' x), ELT Z C c Y B b *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x'0 : X => and (A x'0 a) (ELT X A x'0 Y B b))) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ELT Z C c Y B b *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) (out X (forall _ : X, Prop))), ELT Z C c Y B b *) intros x x' H4 H5 H6; apply (eq_inr_inl _ _ _ _ H5). (* Case 2 *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x'0 : X => and (A x'0 a) (ELT X A x'0 Y B b))) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ELT Z C c Y B b *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) (out X (forall _ : X, Prop))), ELT Z C c Y B b *) intros x' p H4 H5 H6 H7; generalize (eq_inr_inr _ _ _ _ H5); intro H8. (* Goal: ELT Z C c Y B b *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) (out X (forall _ : X, Prop))), ELT Z C c Y B b *) generalize (eq_sym _ _ _ H8 (fun q => q x') H7); clear H8; intro H8. (* Goal: ELT Z C c Y B b *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) (out X (forall _ : X, Prop))), ELT Z C c Y B b *) apply H8; clear H8; intros H8 H9; apply ELT_compat_l with X A x'. (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply EQV_trans with (sum X (X -> Prop)) (POWER X A a) (inl X (X -> Prop) x'). (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply H4; assumption. apply EQV_sym; apply POWER_eqv. assumption. (* Case 3 (absurd) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) (out X (forall _ : X, Prop))), ELT Z C c Y B b *) intros p H4 H5; apply (eq_inr_out _ _ _ H5). Qed. (** From this, we deduce the introduction rule of the powerset: *) Lemma powerset_intro : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), SUB Y B b X A a -> ELT Y B b (sum X (X -> Prop)) (POWER X A a) (out X (X -> Prop)). Proof. intros X A a Y B b H; apply ELT_intro with (inr X (X -> Prop) (fun x' => and (A x' a) (ELT X A x' Y B b))). (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply POWER_rt. apply POWER_subset_eqv; assumption. Qed. (** And the elimination rule comes easily: *) Lemma powerset_elim : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (sum X (X -> Prop)) (POWER X A a) (out X (X -> Prop)) -> SUB Y B b X A a. Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (_ : ELT Y B b (sum X (forall _ : X, Prop)) (POWER X A a) (out X (forall _ : X, Prop))), SUB Y B b X A a *) intros X A a Y B b H; apply H; clear H. (* Goal: forall (b' : sum X (forall _ : X, Prop)) (_ : POWER X A a b' (out X (forall _ : X, Prop))) (_ : EQV Y B b (sum X (forall _ : X, Prop)) (POWER X A a) b'), SUB Y B b X A a *) intros z H1 H2; apply H1; clear H1. (* Case distinction *) (* Case 1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (inl X (forall _ : X, Prop) x)) (_ : A x' x), SUB Y B b X A a *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), SUB Y B b X A a *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (out X (forall _ : X, Prop))), SUB Y B b X A a *) intros x x' H3 H4 H5; apply (eq_out_inl _ _ _ H4). (* Case 2 (absurd) *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), SUB Y B b X A a *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (out X (forall _ : X, Prop))), SUB Y B b X A a *) intros x' p H3 H4 H5 H6; apply (eq_out_inr _ _ _ H4). (* Case 3 *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) (out X (forall _ : X, Prop)) (out X (forall _ : X, Prop))), SUB Y B b X A a *) unfold SUB in |- *; intros p H3 H4 Z C c H5. (* Goal: ELT Z C c X A a *) apply (ELT_compat_r _ _ _ _ _ _ _ _ _ H5 H2). (* Goal: forall (b' : sum X (forall _ : X, Prop)) (_ : POWER X A a b' z) (_ : EQV Z C c (sum X (forall _ : X, Prop)) (POWER X A a) b'), ELT Z C c X A a *) intros z' H6 H7; apply H6; clear H6. (* Case 3-1 (absurd) *) (* Goal: forall (x x' : X) (_ : eq (sum X (forall _ : X, Prop)) z' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) z (inl X (forall _ : X, Prop) x)) (_ : A x' x), ELT Z C c X A a *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ELT Z C c X A a *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) intros x x' H8 H9 H10. (* Goal: ELT Z C c X A a *) (* Goal: forall (x' : X) (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inl X (forall _ : X, Prop) x')) (_ : eq (sum X (forall _ : X, Prop)) z (inr X (forall _ : X, Prop) p)) (_ : A x' a) (_ : p x'), ELT Z C c X A a *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply (eq_inl_inr _ _ _ _ (eq_trans _ _ _ _ (eq_sym _ _ _ H9) H3)). (* Case 3-2 *) (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) intros x' p0 H8 H9 H10 H11; apply ELT_intro with x'. assumption. (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply EQV_trans with (sum X (X -> Prop)) (POWER X A a) (inl X (X -> Prop) x'). (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) apply H8; assumption. apply EQV_sym; apply POWER_eqv. (* Case 3-3 (absurd) *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) intros p0 H8 H9. (* Goal: ELT Z C c X A a *) apply (eq_inr_out _ _ _ (eq_trans _ _ _ _ (eq_sym _ _ _ H3) H9)). Qed. (** From this, we can conclude: *) Theorem powerset : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (sum X (X -> Prop)) (POWER X A a) (out X (X -> Prop))) (SUB Y B b X A a). Proof. (* Goal: and (A x' a) (ELT X A x' Y B b) *) (* Goal: EQV Z C c (sum X (forall _ : X, Prop)) (POWER X A a) (inl X (forall _ : X, Prop) x') *) (* Goal: SUB (sum X (forall _ : X, Prop)) (POWER X A a) (inr X (forall _ : X, Prop) (fun x' : X => and (A x' a) (ELT X A x' Y B b))) Y B b *) intros X A a Y B b; unfold iff in |- *; apply and_intro. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) intro; apply powerset_elim; assumption. (* Goal: A x' a *) (* Goal: EQV Z C c X A x' *) (* Goal: forall (p : forall _ : X, Prop) (_ : eq (sum X (forall _ : X, Prop)) z' (inr X (forall _ : X, Prop) p)) (_ : eq (sum X (forall _ : X, Prop)) z (out X (forall _ : X, Prop))), ELT Z C c X A a *) intro; apply powerset_intro; assumption. Qed.
(* This program is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) (* as published by the Free Software Foundation; either version 2.1 *) (* of the License, or (at your option) any later version. *) (* *) (* This program is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU Lesser General Public *) (* License along with this program; if not, write to the Free *) (* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *) (* 02110-1301 USA *) Require Import IZF_logic. Require Import IZF_base. (***************************************************) (** * The intuitionistic Hilbert epsilon operator *) (***************************************************) (** The following axioms mimick (a specialized version of) the intuitionistic Hilbert epsilon operator described in the author's LICS'03 submitted paper. *) (** We first introduce a type of codes, that could be defined as a primitive type of natural numbers by following the paper. But since the actual structure of its inhabitants will never be used in the forthcoming proofs, we prefer to keep it abstract. *) Axiom Code : Typ1. (* We could set Code := nat. *) (** We now introduce a specialized version of the epsilon operator described in the paper. This version only works for predicates over the (large) type Typ1, which is sufficent for what we want to prove (i.e. the collection scheme). *) Axiom eps : (Typ1 -> Prop) -> Code -> Typ1. (** The following axiom states that if a predicate P : Typ1->Prop holds for some type X : Typ1, then there exists a code c : Code such that P holds for (eps P c). Technically, this axiom shows that we can always replace an existential statement over a large type (i.e. Typ1) by an existential statement over a small type (i.e. Code), which is crucial for interpreting the collection scheme. *) Axiom choice : forall P : Typ1 -> Prop, exT P -> ex Code (fun c => P (eps P c)). (*********************************************) (** * An implementation of a super-powerset *) (*********************************************) (** On a fixed small type Z, we can build several pointed graphs of the form (Z, A, a), whose two extra parameters A and a range over (Rel Z) and Z respectively. But since the cartesian product (Rel Z) * Z is itself a small type, it is not difficult to build a variant of the powerset (foo, FOO, foo_rt) that contains all the pointed graphs of the form (Z, A, a), that is, a pointed graph (called the "super-powerset" of Z) such that (Z, A, a) \in (foo, FOO, foo_rt) for any edge relation A : (Rel A) and for any root a : Z. In what follows, we propose to achieve this construction, but in a more general setting. For that, instead of considering a small type Z : Typ1, we will rather consider a family of small types Z : X->Y->Typ1 indexed by the inhabitants of two given small types X, Y : Typ1, and from these parameters, we propose to build a pointed graph ((foo X Y Z), (FOO X Y Z), (foo_rt X Y Z)) such that ((Z x y), A, a) \in ((foo X Y Z), (FOO X Y Z), (foo_rt X Y Z)) for any x : X, y : Y, A : (Rel (Z x y)) and a : (Z x y). Intuitively, this pointed graph represents the union of the super-powersets associated to the carriers (Z x y) when x and y range over the small types X and Y respectively. *) (** ** Building the carrier of the super-powerset **) (** The carrier (foo X Y Z) of the super-powerset associated to a given family of small types Z : X->Y->Typ1 indexed by two small types X and Y would be naturally defined in Coq as follows: Inductive foo [X,Y:Typ1; Z:X->Y->Typ1] : Typ1 := | foo_in : (x:X; y:Y)(Rel (Z x y))->(Z x y)->(foo X Y Z) | foo_rt : (foo X Y Z). Intuitively, this type is the disjoint union of the cartesian products (Rel (Z x y)) * (Z x y) where x and y range over X and Y respectively, plus an extra element (foo_rt X Y Z) that will be used as the new root. In our framework, this inductive definition is easily mimicked as follows: *) Definition foo (X Y : Typ1) (Z : X -> Y -> Typ1) : Typ1 := (forall (x : X) (y : Y), Rel (Z x y) -> Z x y -> Prop) -> Prop. Definition foo_in (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y) : foo X Y Z := fun f => f x y R z. Definition foo_rt (X Y : Typ1) (Z : X -> Y -> Typ1) : foo X Y Z := fun _ => bot. (** It is then easy to check the expected property of non-confusion holds for the constructors foo_in and foo_rt: *) Lemma eq_foo_in_rt : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z) -> bot. Proof fun X Y Z x y R z e => e (fun u => u (fun _ _ _ _ => top)) top_intro. Lemma eq_foo_rt_in : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), eq (foo X Y Z) (foo_rt X Y Z) (foo_in X Y Z x y R z) -> bot. Proof fun X Y Z x y R z e => e (fun u => u (fun _ _ _ _ => top) -> bot) (fun p => p) top_intro. (** On the other hand, proving the injectivity of the constructor (foo_in X Y Z) : (x:X; y:Y)(Rel (Z x y))->(Z x y)->(foo X Y Z) (of arity 4) is a little bit more tricky, since the types of its last two arguments actually depend on the values of its first two arguments. (This is the same problem as for the dependent pair.) For this reason, we express the injectivity of the constructor (foo_in X Y Z) by using a dependent equality which is close to John Major's equality: *) Lemma eq_foo_in_in : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x1 x2 : X) (y1 y2 : Y) (R1 : Rel (Z x1 y1)) (R2 : Rel (Z x2 y2)) (z1 : Z x1 y1) (z2 : Z x2 y2), (* Equality of the images... *) eq (foo X Y Z) (foo_in X Y Z x1 y1 R1 z1) (foo_in X Y Z x2 y2 R2 z2) (* ... implies dependent equality: *) -> forall P : forall (x : X) (y : Y), Rel (Z x y) -> Z x y -> Prop, P x1 y1 R1 z1 -> P x2 y2 R2 z2. Proof fun X Y Z x1 x2 y1 y2 R1 R2 z1 z2 H P p => H (fun f => f P) p. (** This kind of equality is actually sufficent for proving the expected delocation property (cf Lemma FOO_deloc below). *) (** ** Building the edge relation of the super-powerset **) (** The edge relation (FOO X Y Z) : (Rel (foo X Y Z)) of the super-powerset of the family of small types Z : X->Y->Typ1 is defined by the following clauses: 1. (Delocation of pointed graph structures:) For any x:X and y:Y, for any relation R:(Rel (Z x y)) and for any pair of vertices z,z':(Z x y), (R z' z) implies (FOO X Y Z (foo_in X Y Z x y R z') (foo_in X Y Z x y R z)) 2. (Connecting vertices to the new root:) For any x:X and y:Y, for any relation R:(Rel (Z x y)) and for any vertex z:(Z x y), then (FOO X Y Z (foo_in X Y Z x y R z) (foo_rt X Y Z)). Formally, we define this relation as follows: *) Definition FOO (X Y : Typ1) (Z : X -> Y -> Typ1) (u' u : foo X Y Z) : Prop := forall E : Prop, (forall (x : X) (y : Y) (R : Rel (Z x y)) (z' z : Z x y), eq (foo X Y Z) u' (foo_in X Y Z x y R z') -> eq (foo X Y Z) u (foo_in X Y Z x y R z) -> R z' z -> E) -> (forall (x : X) (y : Y) (R : Rel (Z x y)) (z' : Z x y), eq (foo X Y Z) u' (foo_in X Y Z x y R z') -> eq (foo X Y Z) u (foo_rt X Y Z) -> E) -> E. (** Both clauses are given by the following constructors: *) Lemma FOO_in : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z' z : Z x y), R z' z -> FOO X Y Z (foo_in X Y Z x y R z') (foo_in X Y Z x y R z). Proof fun X Y Z x y R z' z H E H1 H2 => H1 x y R z' z (eq_refl (foo X Y Z) (foo_in X Y Z x y R z')) (eq_refl (foo X Y Z) (foo_in X Y Z x y R z)) H. Lemma FOO_rt : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z' : Z x y), FOO X Y Z (foo_in X Y Z x y R z') (foo_rt X Y Z). Proof fun X Y Z x y R z' E H1 H2 => H2 x y R z' (eq_refl (foo X Y Z) (foo_in X Y Z x y R z')) (eq_refl (foo X Y Z) (foo_rt X Y Z)). (** We now prove that for any x:X, y:Y and R:(Rel (Z x y)), the function (foo_in X Y Z x y R) : (Z x y)->(foo X Y Z) induces a delocation from the graph ((Z x y), R) to the graph ((foo X Y Z), (FOO x y z)). *) Lemma FOO_deloc : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)), deloc (Z x y) R (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R). Proof. (* Goal: forall (X Y : Typ1) (Z : forall (_ : X) (_ : Y), Typ1) (x : X) (y : Y) (R : Rel (Z x y)), deloc (Z x y) R (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R) *) intros X Y Z x y R; unfold deloc in |- *; apply and_intro. (* Deloc 1 *) (* Goal: forall (x0 x' : Z x y) (_ : R x' x0), FOO X Y Z (foo_in X Y Z x y R x') (foo_in X Y Z x y R x0) *) (* Goal: forall (x0 : Z x y) (y' : foo X Y Z) (_ : FOO X Y Z y' (foo_in X Y Z x y R x0)), ex2 (Z x y) (fun x' : Z x y => R x' x0) (fun x' : Z x y => eq (foo X Y Z) y' (foo_in X Y Z x y R x')) *) intros; apply FOO_in; assumption. (* Deloc 2 *) (* Goal: forall (x0 : Z x y) (y' : foo X Y Z) (_ : FOO X Y Z y' (foo_in X Y Z x y R x0)), ex2 (Z x y) (fun x' : Z x y => R x' x0) (fun x' : Z x y => eq (foo X Y Z) y' (foo_in X Y Z x y R x')) *) intros z f' H; apply H; clear H. (* Deloc 2, case 1 *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' z0 : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_in X Y Z x0 y0 R0 z0)) (_ : R0 z' z0), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z)), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) intros x0 y0 R0 z0' z0 H2 H3 H4; apply (eq_sym _ _ _ H2). (* Goal: ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) (foo_in X Y Z x0 y0 R0 z0') (foo_in X Y Z x y R x')) *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z)), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) generalize z0' H4; clear H2 H4 f' z0'. (* Use dependent equality: *) (* Goal: forall (z0' : Z x0 y0) (_ : R0 z0' z0), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) (foo_in X Y Z x0 y0 R0 z0') (foo_in X Y Z x y R x')) *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z)), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) apply (eq_foo_in_in X Y Z x x0 y y0 R R0 z z0 H3). (* Goal: forall (z0' : Z x y) (_ : R z0' z), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) (foo_in X Y Z x y R z0') (foo_in X Y Z x y R x')) *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z)), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) intros z' H4; apply ex2_intro with z'. (* Goal: R X' A' a' Y B b *) assumption. apply eq_refl. (* Deloc 2, case 2 (absurd) *) (* Goal: forall (x0 : X) (y0 : Y) (R0 : Rel (Z x0 y0)) (z' : Z x0 y0) (_ : eq (foo X Y Z) f' (foo_in X Y Z x0 y0 R0 z')) (_ : eq (foo X Y Z) (foo_in X Y Z x y R z) (foo_rt X Y Z)), ex2 (Z x y) (fun x' : Z x y => R x' z) (fun x' : Z x y => eq (foo X Y Z) f' (foo_in X Y Z x y R x')) *) intros x0 y0 R0 z0' H1 H2; apply (eq_foo_in_rt _ _ _ _ _ _ _ H2). Qed. (** And from the latter result, we derive the expected property of bisimilarity: *) Lemma FOO_eqv : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z). Proof. (* Goal: forall (X Y : Typ1) (Z : forall (_ : X) (_ : Y), Typ1) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) intros; apply EQV_deloc; apply FOO_deloc. Qed. (** Finally, we show that our super-powerset meets its specification: *) Lemma FOO_elt : forall (X Y : Typ1) (Z : X -> Y -> Prop) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), ELT (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_rt X Y Z). Proof. (* Goal: forall (X Y : Typ1) (Z : forall (_ : X) (_ : Y), Prop) (x : X) (y : Y) (R : Rel (Z x y)) (z : Z x y), ELT (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_rt X Y Z) *) intros X Y Z x y R z. (* Goal: ELT (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_rt X Y Z) *) apply ELT_intro with (foo_in X Y Z x y R z). (* Goal: FOO X Y Z (foo_in X Y Z x y R z) (foo_rt X Y Z) *) (* Goal: EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) apply FOO_rt. apply FOO_eqv. Qed. (******************************************************) (** * Compatible relations and the collection scheme *) (******************************************************) (** ** Binary relations **) (** The type of binary relations over pointed graphs: *) Definition REL : Typ2 := forall X : Typ1, Rel X -> X -> forall Y : Typ1, Rel Y -> Y -> Prop. (** And the corresponding (left and right) compatibility properties: *) Definition LCOMPAT (R : REL) : Prop := forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), EQV X A a Y B b -> R Y B b Z C c -> R X A a Z C c. Definition RCOMPAT (R : REL) : Prop := forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), R X A a Y B b -> EQV Y B b Z C c -> R X A a Z C c. (** It is convenient to define a relativized form (exG_rel X A a P) of the existential quantifier on the class of pointed graphs, that expresses that the predicate P holds for some element of the pointed graph (X, A, a). *) Definition exG_rel (X : Typ1) (A : Rel X) (a : X) (P : forall Y : Typ1, Rel Y -> Y -> Prop) := forall E : Prop, (forall (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b X A a -> P Y B b -> E) -> E. Lemma exG_rel_intro : forall (X : Typ1) (A : Rel X) (a : X) (P : forall Y : Typ1, Rel Y -> Y -> Prop) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b X A a -> P Y B b -> exG_rel X A a P. Proof fun X A a P Y B b H1 H2 E f => f Y B b H1 H2. (** ** The collection scheme **) (** Let (X, A, a) be a pointed graph and R a binary relation over the class of pointed graph (that we suppose compatible) such that each element of the pointed graph (X, A, a) is related to at least one pointed graph via the relation R. Since the elements of (X, A, a) are (up to a bisimulation) the pointed graphs of the form (X, A, x) where x : X is a vertex such that (A x a), our assumption can be reformulated as for any x : X such that (A x a), there exists a pointed graph (Y, B, b) such that (R X A x Y B b). (Of course, the equivalence of both formulations relies on the compatibility of R with respect to its first argument). Now, let us consider the family of small types (coll_fam X A a R) : X->Code->Typ1 defined by using the choice operator "eps" as follows: *) Definition coll_fam (X : Typ1) (A : Rel X) (a : X) (R : REL) (x : X) : Code -> Typ1 := eps (fun Y => ex (Rel Y) (fun B => ex Y (fun b => R X A x Y B b))). (** (Notice that the definition of (coll_fam X A a R) actually does not depend on the root a : X of the pointed graph (X, A, a).) By construction, the family of small types (coll_fam X A a R) is such that for any x : X, if there exists a pointed graph (Y, B, b) which is related to (X, A, x) via R, then there is a code c : Code such that (coll_fam X A a R x c) is the carrier of one of such pointed graphs, that is, such that (R X A x (coll_fam X A a R x c) B b) for some edge relation B and some root b on the carrier given by (coll_fam X A a R x c). It is now clear that if we take the super-powerset of the family (coll_fam X A a R) : X->Code->Typ1, we obtain a pointed graph that meets the specification of the collection scheme. Formally, the desired pointed graph ((coll X A a R), (COLL X A a R), (coll_rt X A a R)) is defined as follows: *) Definition coll (X : Typ1) (A : Rel X) (a : X) (R : REL) : Typ1 := foo X Code (coll_fam X A a R). Definition COLL (X : Typ1) (A : Rel X) (a : X) (R : REL) : Rel (coll X A a R) := FOO X Code (coll_fam X A a R). Definition coll_rt (X : Typ1) (A : Rel X) (a : X) (R : REL) : coll X A a R := foo_rt X Code (coll_fam X A a R). (** (Notice that the components of this pointed graph actually do not depend on the root a : X of the pointed graph (X, A, a).) It is now a simple exercise to check that the pointed graph we have built meets the specification of the collection scheme: *) Theorem collection : forall (X : Typ1) (A : Rel X) (a : X) (R : REL), LCOMPAT R -> RCOMPAT R -> (forall (X' : Typ1) (A' : Rel X') (a' : X'), ELT X' A' a' X A a -> exG (fun Y' B' b' => R X' A' a' Y' B' b')) -> forall (X' : Typ1) (A' : Rel X') (a' : X'), ELT X' A' a' X A a -> exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun Y' B' b' => R X' A' a' Y' B' b'). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (R : REL) (_ : LCOMPAT R) (_ : RCOMPAT R) (_ : forall (X' : Typ1) (A' : Rel X') (a' : X') (_ : ELT X' A' a' X A a), exG (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b')) (X' : Typ1) (A' : Rel X') (a' : X') (_ : ELT X' A' a' X A a), exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) intros X A a R HL HR H0 X' A' a' H1. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) apply H1; clear H1; intros x H1 H2. (* Perform a cut *) (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) cut (exT (fun Y => ex (Rel Y) (fun B => ex Y (fun b => R X A x Y B b)))). (* Main premise *) (* Goal: forall _ : exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))), exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) intro H; apply (choice _ H); clear H; intros c H. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply H; clear H; intros B H; change (Rel (coll_fam X A a R x c)) in B. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply H; clear H; intros b H3; change (coll_fam X A a R x c) in b. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) change (R X A x (coll_fam X A a R x c) B b) in H3. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply exG_rel_intro with (coll_fam X A a R x c) B b. (* Goal: ELT (coll_fam X A a R x c) B b (coll X A a R) (COLL X A a R) (coll_rt X A a R) *) (* Goal: R X' A' a' (coll_fam X A a R x c) B b *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply ELT_intro with (foo_in X Code (coll_fam X A a R) x c B b). (* Goal: FOO X Y Z (foo_in X Y Z x y R z) (foo_rt X Y Z) *) (* Goal: EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) unfold COLL, coll_rt in |- *; apply FOO_rt. (* Goal: EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) unfold coll, COLL in |- *; apply FOO_eqv. (* Goal: R X' A' a' Y B b *) apply HL with X A x; assumption. (* Argument *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply (H0 X A x (ELT_direct X A a x H1)); intros Y B b H3. (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply exT_intro with Y. (* Goal: ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b)) *) apply ex_intro with B. (* Goal: ex Y (fun b : Y => R X A x Y B b) *) apply ex_intro with b. (* Goal: R X' A' a' Y B b *) assumption. Qed. (** In fact, our super-powerset meets a slightly stronger statement (but still classically equivalent) which is the following: *) Theorem collection2 : forall (X : Typ1) (A : Rel X) (a : X) (R : REL), LCOMPAT R -> RCOMPAT R -> forall (X' : Typ1) (A' : Rel X') (a' : X'), ELT X' A' a' X A a -> exG (fun Y' B' b' => R X' A' a' Y' B' b') -> exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun Y' B' b' => R X' A' a' Y' B' b'). Proof. (* Goal: forall (X : Typ1) (A : Rel X) (a : X) (R : REL) (_ : LCOMPAT R) (_ : RCOMPAT R) (X' : Typ1) (A' : Rel X') (a' : X') (_ : ELT X' A' a' X A a) (_ : exG (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b')), exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) intros X A a R HL HR X' A' a' H H1. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) apply H; clear H; intros x H2 H3. (* Perform a cut *) (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) cut (exT (fun Y => ex (Rel Y) (fun B => ex Y (fun b => R X A x Y B b)))). (* Main premise *) (* Goal: forall _ : exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))), exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) intro H; apply (choice _ H); clear H; intros c H. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply H; clear H; intros B H; change (Rel (coll_fam X A a R x c)) in B. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply H; clear H; intros b H4; change (coll_fam X A a R x c) in b. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) change (R X A x (coll_fam X A a R x c) B b) in H4. (* Goal: exG_rel (coll X A a R) (COLL X A a R) (coll_rt X A a R) (fun (Y' : Typ1) (B' : Rel Y') (b' : Y') => R X' A' a' Y' B' b') *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply exG_rel_intro with (coll_fam X A a R x c) B b. (* Goal: ELT (coll_fam X A a R x c) B b (coll X A a R) (COLL X A a R) (coll_rt X A a R) *) (* Goal: R X' A' a' (coll_fam X A a R x c) B b *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply ELT_intro with (foo_in X Code (coll_fam X A a R) x c B b). (* Goal: FOO X Y Z (foo_in X Y Z x y R z) (foo_rt X Y Z) *) (* Goal: EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) unfold COLL, coll_rt in |- *; apply FOO_rt. (* Goal: EQV (Z x y) R z (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R z) *) unfold coll, COLL in |- *; apply FOO_eqv. (* Goal: R X' A' a' Y B b *) apply HL with X A x; assumption. (* Argument *) (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply H1; clear H1; intros Y B b H1. (* Goal: exT (fun Y : Typ1 => ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b))) *) apply exT_intro with Y. (* Goal: ex (Rel Y) (fun B : Rel Y => ex Y (fun b : Y => R X A x Y B b)) *) apply ex_intro with B. (* Goal: ex Y (fun b : Y => R X A x Y B b) *) apply ex_intro with b. (* Goal: R X A x Y B b *) apply HL with X' A' a'. (* Goal: R X' A' a' Y B b *) apply EQV_sym; assumption. (* Goal: R X' A' a' Y B b *) assumption. Qed.